Statalist The Stata Listserver


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

Re: st: RE: summarizing several analyses in one graph


From   Michael McCulloch <mm@pinest.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: summarizing several analyses in one graph
Date   Thu, 21 Sep 2006 14:21:09 -0700

Works beautifully, Scott!
Three short questions, if I may:
1. How can I suppress the legend, which now shows: <capped bar> "lci/uci" <red dot> "meth".
2. Can the xtitle be made to sit lower down? It bumps up against the x-axis label numbers.
3. Is this Stata programming language? Where can I learn how to write such elegent code? Right now, I'm only at the "do-file" level.
Thank you very much,
Michael

At 02:06 PM 9/21/2006, you wrote:


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Michael McCulloch
> Sent: Thursday, September 21, 2006 1:07 AM
> To: Statalist
> Subject: st: summarizing several analyses in one graph


<snip>

> GOAL:
> I wish to display them in the following format:
> Each method of analysis as a capped horizontal line as wide as the
> confidence interval, with effect size as a circle.
> The y-axis labeled with the name of the method, e.g. Cox .

How about 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
 encode method, gen(meth)
twoway rcap lci uci meth, horizontal msize(huge) ///
xtitle(Hazard Ratio and 95% Confidence Interval) ///
ytitle(Analysis Method) ///
ylabel( 1 "Cox" 2 "MSM" 3 "Pscore" , angle(h)) ///
 || scatter meth es, msize(medlarge)


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:  mm@pinest.org
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index