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 <[email protected]>
To   [email protected]
Subject   RE: st: RE: summarizing several analyses in one graph
Date   Thu, 21 Sep 2006 14:55:47 -0700

Very helpful. I appreciate your input very much.

At 02:55 PM 9/21/2006, you wrote:
First, have you tried -search-?  It can point you in the right direction.

For example -search legend- brings up (with a hyperlink):

[G]     legend_option  . . . . . . . . . . . Option for specifying legend
        (help legend_option)

For these questions,
1.  legend(off) will suppress the legend.

2. There is an option within -xtitle()- called -margin()- that will increase
the space around a textbox.

With these options you would have:

input str6 method es lci uci
    Cox   .89   .86   .99
    MSM   1.2   .95   1.5
 Pscore   .31   .22   .51
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( 1 "Cox" 2 "MSM" 3 "Pscore" , angle(h)) ///
 || scatter meth es, msize(medlarge) legend(off)

3.  This is not really programming - all we are doing is calling two graph
command, -twoway rcap- and -scatter-.

There are several sources to learn Stata programming:

1. Net courses, which Kevin Crow ([email protected]) just announced two
upcoming courses

2. User manual, Programming Guide, and Maximum Likelihood Estimation with

3. The Stata Journal, especially the columns "Speaking Stata" by Nick Cox
and "Mata Matter" by Bill Gould.

4. The Statalist

5. The recent Stata Press books "An Introduction to Modern Econometrics
Using Stata" by Kit Baum and "Data Analysis Using Stata" by Ulrich Kohler
and Frauke Kreuter both contain a chapter on basic Stata programming.

You might also find this recent thread useful:


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Michael McCulloch
> Sent: Thursday, September 21, 2006 4:21 PM
> To: [email protected]
> Subject: Re: st: RE: summarizing several analyses in one graph
> 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

*   For searches and help try:

Best wishes,


Michael McCulloch
Pine Street Clinic
124 Pine Street, San Anselmo, CA 94960-2674
tel     415.407.1357
fax     415.485.1065
email:  [email protected]

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index