Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Label values problem


From   "Paul O'Brien" <paul.obrien@afe2.org.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Label values problem
Date   Thu, 19 Feb 2004 21:03:22 +0000

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/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index