Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: yscale/range to plot


From   Nita Forouhi <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: yscale/range to plot
Date   Mon, 7 Mar 2005 12:58:42 -0000

Many thanks - that works fine

Nita



-----Original Message-----
From: David Harrison [mailto:[email protected]]
Sent: 07 March 2005 12:38
To: [email protected]
Subject: st: RE: yscale/range to plot


The -range()- option will never reduce the range of the axis, only expand it
(see help axis_scale_options).

In the case of -sts graph-, if your Kaplan-Meier curves do not go below .8
then you may be able to get the behaviour you want by changing the
-ylabel()- option, e.g.

sysuse cancer
stset studytime, f(died)
sts graph
more
sts graph, yla(.25(.25)1)

If you want to restrict the range so that some of the curve is not visible,
you will need to use -sts gen- to generate the full curve and then plot only
the bit you want using a standard twoway graph.

Hope this helps,

David

-----Original Message-----
From: Nita Forouhi [mailto:[email protected]]
Sent: 07 March 2005 12:20
To: '[email protected]'
Subject: st: yscale/range to plot


Would anyone know how to re-set the y axis on a Kaplan Meir curve, so the
survival probability starts at say 0.8 instead of at 0?

I tried the command (below) but nothing visibly happened that was different
- ie the graph for sts graph, by(xvar) looked the same, ie started at 0 for
y axis, as when i tried the yscale and range commands as below

sts graph, by(xvar) ysc(r(0.8 1.0))

(and when i tried it in a standard y vs x twoway scatter graph, nothing
happened to the y-scale either - eg
twoway scatter y x, ysc(r(15 50)) where y might be something like BMI say,
and I only wanted to plot BMI on y axis from 15 to 50 say)

Most grateful for any pointers on re-setting the scale/range to plot.

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



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