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 on April 23, and its replacement, statalist.org is already up and running.


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

st: Removing the overall variable label and using only variable value in sts graph


From   Tim Evans <Tim.Evans@wmciu.nhs.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: Removing the overall variable label and using only variable value in sts graph
Date   Fri, 24 Feb 2012 09:13:53 +0000

Hi all,,

I'm using Stata 11.2 and am creating and exporting some Kaplan Maier curves but I want to drop the variable label from the legend in my sts graph so that I only have the value rather than both.

For instance, if I run the following code:

webuse drug2
sts graph, by(drug)

I end up with a legend that shows drug = 0 and drug = 1

What I would like to do is drop the 'drug' and return only 0 or 1. There are many reasons for this, not least because if I have more than a few values in the variable, the legend becomes a little unwieldy and I also entitle the graph so that its clear what I'm graphing.

I've had a search around on Google but don't seem to be able to find exactly what I want. So any help gratefully received.

Best wishes

Tim
_DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.


*
*   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