Wittner, Ben, Ph.D.
2010-Mar-30 12:49 UTC
[R] Paik, et al., NEJM, 2004, Fig. 4, rate of event at 10 years as a function of covariate
Does anyone know how to make a plot like Fig. 4 of Paik, et al., New England Journal of Medicine, Dec. 30, 2004? Given survival data and a covariate, they plot a curve giving "Rate of Distant Recurrence at 10 Yr (% of patients)" on the y-axis versus the covariate on the x-axis. They also plot curves giving a 95% confidence interval. Thanks very much. -Ben The information in this e-mail is intended only for the ...{{dropped:11}}
Frank E Harrell Jr
2010-Mar-30 13:16 UTC
[R] Paik, et al., NEJM, 2004, Fig. 4, rate of event at 10 years as a function of covariate
Wittner, Ben, Ph.D. wrote:> Does anyone know how to make a plot like Fig. 4 of Paik, et al., New England > Journal of Medicine, Dec. 30, 2004? > > Given survival data and a covariate, they plot a curve giving "Rate of Distant > Recurrence at 10 Yr (% of patients)" on the y-axis versus the covariate on the > x-axis. They also plot curves giving a 95% confidence interval. > > Thanks very much. > > -Ben > > >Such a plot is easy to do with the rms package if using a Cox or accelerated failure time model, e.g. require(rms) dd <- datadist(mydata); options(datadist='dd') f <- cph(Surv(rtime, event) ~ rcs(covariate,4) + sex + ..., x=TRUE, y=TRUE) # restricted cubic spline with 4 knots plot(Predict(f, covariate, sex, time=10)) # separate curves for male and female; omit sex to make one curve; add age=50 to predict for a 50 year old -- Frank E Harrell Jr Professor and Chairman School of Medicine Department of Biostatistics Vanderbilt University
Possibly Parallel Threads
- analyzing suvival data using splines (a.k.a., piecewise log-hazard-ratio models)
- plot of survival probability vs. covariate
- Converting PROC NLMIXED code to NLME
- ISOdate/ISOdatetime performance suggestions, other date/time questions
- isdst warning when rounding a range of time data: fix or suppress?