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
creating change variables in panel-structureDear Statalists, I am currently working on my master thesis with Paneldata from the German Socioeco…
Heckman two step modelDear Stata Users, I am attempting to apply the two step Heckman model, with a Tobit regression as f…
average annual growth rates in panel dataDear all, I am currently working with a panel dataset, where I have country and year as indicators,…
Reshape - variable names currently as valuesI have problems with data structure and would like to reshape into wide. Currently I have the name o…
Fighting spaghetti: some small devices using linkplotA common kind of question on Statalist concerns plotting multiple time series. Spaghetti -- tangled …
Subscribe to:
Post Comments (Atom)
0 Response to Labelling groups
Post a Comment