Can someone please tell me why this is an invalid syntax and I can't label my age groups please?
gen agegroups = 0
replace agegroups = 06 if CAGE >=0 & CAGE <=6
replace agegroups = 12 if CAGE >=5 & CAGE <=12
replace agegroups = 18 if CAGE >=11 & CAGE <=18
replace agegroups = 24 if CAGE >=17 & CAGE <=24
replace agegroups = 30 if CAGE >=23 & CAGE <=30
replace agegroups = 36 if CAGE >=29 & CAGE <=37
label define agegroups 6 “0-6 months” 12 “7-12 months” 18 "13-18 months" 24 "19-24 months" "25-30 months 36 "31-36 months"
label values agegroups agegroups
tab age groups
Many thanks
Related Posts with Labelling groups
Annual and Monthly Stock PricesDear All Hope you are well. I am working on some share prices and I would really appreciate some h…
Issues with unbalanced Panel DataHello everyone: I have a few questions concerning the choices I have to make with respect to unbala…
Maximum value for each quarterDear all, I'm stuck with something that I think you may help me : ) I have a data set on a monthly b…
Logit estimation - Margins - not estimableDear forum members, I face the following issue. I am running a logit regression on survey data (ind…
Lead and Lag Variables in RegressionsHi All I have an example of a regression model with leads and lags, and I was wondering if I am cor…
Subscribe to:
Post Comments (Atom)
0 Response to Labelling groups
Post a Comment