Hi statalist!
I would like to make birth cohorts (5 years gap and above 25 years old adult).
I have age and birth year (variable age, byear) in my data.
My attempt was,
code:
gen cohort1=(age>=25 & age<30)
gen cohort2=(age>=30 & age<35)
gen cohort3=(age>=35 & age<40)
.
.
.
Is there any other way to make cohorts?
I will use this cohorts for difference in difference analysis.
Thank you for your help in advance.
Related Posts with Birth Cohorts
Weak instrument test for ivprobit with clustering?Hello, I am seeking advice about how to run a weak instrument test after estimating an ivprobit mode…
Count the number of unique observation conditional on variableHi Statlist users, I am currently having an issue counting the unique number of observation conditi…
Defining value labels based on varlistDear all, I am writing a program which at the beginning I define a varlist: syntax varlist (min=3 n…
matrix operation not foundDear All, I need some advice on how to deal with an error: matrix operation not found I get th…
Poisson and Negative Binomial Distribution and Stata CodesDear Stata Forum, My question relates more with the theory of Poisson and Negative Binomial Poisson…
Subscribe to:
Post Comments (Atom)
0 Response to Birth Cohorts
Post a Comment