[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: summarizing several analyses in one graph
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
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 (firstname.lastname@example.org) just announced two
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@example.com [mailto:owner-
> firstname.lastname@example.org] On Behalf Of Michael McCulloch
> Sent: Thursday, September 21, 2006 4:21 PM
> To: email@example.com
> 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-
> 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,
* For searches and help try: