I have five variables that all take on values 0, 1, or 2. I want to create a new variable that equals 1 if the five variables only take on values 0 or 1, excluding 2. What would that look like?
Related Posts with egen anycount
- Hansen issuewhy i am not getting Hansen statistics? the command is as follows xtabond2 fg_ta l.fg_ta size age ia…
- Capture change in one variable while different variable is constantDear Statalisters, I am working with a longitudinal dataset. I'm trying to create a variable to cap…
- calculating distance in StataDear All, I would like to know how I can calculate distance in stata between two cities in a country…
- Plotting marginal effects of interactions (containing factor variables) with the grinter commandHello, I am stuck at plotting the marginal effect of the factor variable i.Left_right_placement reg…
- tabm and percentagesHello, This is a question that has come up after my last couple posts on the Statalist and is now a…
Subscribe to:
Post Comments (Atom)
0 Response to egen anycount
Post a Comment