Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: ytitle suboption -valuelabel-: how to label using the text from a variable


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: RE: ytitle suboption -valuelabel-: how to label using the text from a variable
Date   Sat, 21 Oct 2006 08:01:40 -0700

Thank you Scott! Works perfectly!
Michael

At 07:57 AM 10/19/2006, you wrote:

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Michael McCulloch
> Sent: Thursday, October 19, 2006 9:21 AM
> To: [email protected]
> Subject: st: ytitle suboption -valuelabel-: how to label using the text
> from a variable
>
> Roger, I'm sorry I wasn't clear in my question.
> Now I realize that what I would like to do is label each of the -rcap-
> whisker bars from the graph below with the text contained in a variable
> <idstr>.

<snip>

Do you mean something like this?

clear
input str6 method es lci uci
    Cox   .89   .86   .99
    MSM   1.2   .95   1.5
 Pscore   .31   .22   .51
 end
 l
 gen pos = 6
 replace pos = 12 if meth == "Cox"
encode method, gen(meth)

twoway rcap lci uci meth, horizontal msize(huge) ///
xtitle(Hazard Ratio and 95% Confidence Interval, margin(0 0 0 5)) ///
ytitle(Analysis Method) ylabel(none)  ///
 || scatter meth es, msize(medlarge) legend(off) ///
 || scatter meth es, mlabel(meth) mlabsize(large) ///
 mlabvpos(pos) mlabgap(2) msymbol(none)


Scott



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

Best wishes,
Michael


____________________________________

Michael McCulloch
Pine Street Clinic
124 Pine Street, San Anselmo, CA 94960-2674
tel     415.407.1357
fax     415.485.1065
email:  [email protected]
web:    www.pinest.org
        www.pinestreetfoundation.org





*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index