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

From |
Nita Forouhi <nf250@medschl.cam.ac.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: RE: yscale/range to plot |

Date |
Wed, 9 Mar 2005 09:19:36 -0000 |

thanks very much Angus - that is very helpful Nita -----Original Message----- From: Angus Campbell [mailto:a.campbell@unimelb.edu.au] Sent: 09 March 2005 03:11 To: statalist@hsphsun2.harvard.edu Subject: st: RE: RE: yscale/range to plot Nita, You can also make -sts graph- automatically scale the y-axis to show just the range covering your Kaplan-Meir curve with the command: sts graph, ylabel(minmax) If you would then like to adjust the scale, you can add the suffix ...yscale(range(0.8 1)). But you still can't use -yscale- on its own; it must follow -ylabel(minmax)-. I couldn't find information on -ylabel(minmax)- in Stata help, but it has been previously mentioned in StataList - I had exactly the same problem last year. Best wishes, Angus ------------------------------- Dr Angus Campbell The Mackinnon Project Faculty of Veterinary Science, University of Melbourne 250 Princes Highway Werribee, Vic, 3030 >Date: Mon, 7 Mar 2005 12:37:59 -0000 >From: "David Harrison" <david.harrison@icnarc.org> >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:nf250@medschl.cam.ac.uk] >Sent: 07 March 2005 12:20 >To: 'statalist@hsphsun2.harvard.edu' >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/

- Prev by Date:
**st: RE: RE: RE: yscale/range to plot** - Next by Date:
**st: RE: RE: juhn-murphy-pierce decomposition** - Previous by thread:
**st: RE: RE: RE: yscale/range to plot** - Next by thread:
**st: replacement of missing values [was: RE: Help]** - Index(es):

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