Hi all,
If I have data of 100 firms for 10 years with three variables; and I want to make a dummy variable equal to 1 for the firm if the value of variable x1 in year1 or year2 or year3 not equal to zero; how do I do it?
Probably I need something like: by id, gen boom=1 if x12000 !=0 | x12001 !=0 | x12002 !=0, but obviously there is no variable x!2000 etc. Thank you for your help.
Abdan
Related Posts with Creating dummy based on variable value in subset year
Dummy variables - how to determine significanceDear experts, I have a panel data set with 77 variables and about 68,184 observations for the years…
How to automate output file names for multiple esttab command?Hi All! I am currently running, let's just say 400 variations of, esttab command (from estout SSC; …
quaids elasticity calculationwhat is the difference between the following in estimating expenditure elasticity in QUAIDS 1. esta…
Convergence in SEMI was having trouble getting a multiple indicators, multiple causes model to converge, so I simplifi…
Combining TablesI have 4 different summary statistics (proportion) tables. I need to report all the results in one t…
Subscribe to:
Post Comments (Atom)
0 Response to Creating dummy based on variable value in subset year
Post a Comment