Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: My stata won't -tab- with my value labels - why?


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: My stata won't -tab- with my value labels - why?
Date   Sat, 10 Sep 2011 11:50:13 +0200

There is one thing I would like to point out in José Maria's code.

Note that you cannot label system missing values (ie. .). Labels may
only be associated with extended missing values (i.e. .a, .b, ...,
.z). Thus, you should code

label define labelname 0 "male" 1 "female" .a "missing"

rather than

label define labelname 0 "male" 1 "female" . "missing"

if you want your missing values to be labeled.

Best
Daniel

---
José Maria wrote

I think that is missing the name of the label and, after label define
and before tab fem, the command to "glue" the label in your variable:

label define labelname 0 "male" 1 "female" . "missing"
label values female labelname
tab fem, sort mis

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index