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

From |
"Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu> |

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

Subject |
st: RE: zoom in on a Kaplan-Meier plot (display only a subset of the time axis) |

Date |
Wed, 1 Oct 2008 15:33:04 -0700 |

I tried this using _t and using t, and both gave me a zoomed in graph. The first part of the graph was identically equal to 1. uSING tmax and tmin I got the subset you want. I'll send it off line to you. Tony Peter A. Lachenbruch Department of Public Health Oregon State University Corvallis, OR 97330 Phone: 541-737-3832 FAX: 541-737-4001 -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jacob Wegelin Sent: Wednesday, October 01, 2008 1:51 PM To: statalist@hsphsun2.harvard.edu Subject: st: zoom in on a Kaplan-Meier plot (display only a subset of the time axis) Is there a way to create a Kaplan-Meier plot that is "zoomed in" on a subset of the time axis? To make this concrete: It is easy to create a twoway plot that is "zoomed in" on a portion of the axes, for instance: clear set seed 5 set obs 30 gen ID=_n gen x=invnormal(uniform()) gen y= -2 * x + invnormal(uniform()) twoway (scatter y x , aspectratio(1)) twoway (scatter y x if x<1/2 & x>0, aspectratio(1)) /* The second plot "zooms in" on the first. But what if we have survival data? The second sts graph command below does *not* do what I want; it creates a subset of the data and builds a Kaplan-Meier plot afresh using that subset. Is there any straightforward way to make a "zoomed-in" Kaplan-Meier plot? /* clear set seed 5 set obs 30 gen ID=_n gen t=exp(uniform()) - 1 stset t sts graph sts graph if t > 0.5 & t < 0.8 Thanks for any ideas Jacob A. Wegelin jwegelin@vcu.edu Assistant Professor Department of Biostatistics Virginia Commonwealth University 730 East Broad Street Room 3006 P. O. Box 980032 Richmond VA 23298-0032 U.S.A. http://www.people.vcu.edu/~jwegelin * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: zoom in on a Kaplan-Meier plot (display only a subset of the timeaxis)***From:*Jacob Wegelin <jwegelin@vcu.edu>

- Prev by Date:
**Re: st: Test for trend in surveys** - Next by Date:
**RE: st: graph bar and/or catplot** - Previous by thread:
**st: zoom in on a Kaplan-Meier plot (display only a subset of the timeaxis)** - Next by thread:
**Re: st: zoom in on a Kaplan-Meier plot (display only a subset of the timeaxis)** - Index(es):

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