in your "label values" statement, you refer to "agecatv" which is undefined
Rich
Paul O'Brien wrote:
Can someone explain my error please. agecat is not accepting the value
labels.
......
. gen agecat=recode(age, 16, 20,25,30,35,40,45,50,55,60,65,70,75,80)
(100 missing values generated)
. label define agecat 16 "<16" 20 "16-19" 25 "20-24" 30 "25-29" 35
"30-34" 40 "35-39" 45 "40-44" 50 "45-
> 49" 55 "50-54" 60 "55-59" 65 "60-64" 70 "65-69" 75 "70-74" 80 "75-79"
. label values agecat agecatv
. list in 1
Observation 1
age 20.08487 ... agecat 25
......
Also, any reason for using value labels over replace?
Thanks
Dr Paul O'Brien
Westside Contraceptive Services
Raymede Clinic, Exmoor St, London
W10 6DZ
020 8962 4450 - tel
020 8962 4451 - fax
07900 495 118 - mob
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/