Bookmark and Share

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]

st: 'Re-ordering' the labels of a variable


From   "Karen Wright" <[email protected]>
To   <[email protected]>
Subject   st: 'Re-ordering' the labels of a variable
Date   Thu, 25 Mar 2010 10:30:34 +0000

Dear All,

I have a diagnosis (string) variable which can take the value: B, A, H, S, Q or I.  Stata (10.0) cleverly changes this order to an alphabetical order, however this does not make sense when trying to display a simple histogram of the distribution.  I would like to force stata to display them in my original order as it is sensible when considering the ordering of the diagnosis catergories.

I could do this by changing the string to a numeric variable but I thought there might be a better way around this?

Karen  


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index