Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: Understanding Factor variables - is order significant ?
From
Richard Williams <[email protected]>
To
[email protected]
Subject
RE: st: Understanding Factor variables - is order significant ?
Date
Thu, 27 May 2010 10:43:54 -0400
At 10:38 AM 5/27/2010, Feiveson, Alan H. (JSC-SK311) wrote:
The trouble with -encode- is that it puts the levels in alphabetical
order. So in the L, M, H case you would get H = 1, L = 2, M = 3. To
get around this you would have to define a label by hand and assign
it to the string variable.
Al F.
True, but as Nick points out you would have the same problem with
factor variables. One way or another you have to do a little extra
work to get the codes in the order you want if they aren't in that
order already.
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/