[R] actuarial prevalence plots
Scott.Williams at petermac.org
Sun Jan 29 23:06:20 CET 2006
I am trying to produce a series of plots showing the prevalence of a
condition, which is subject to censoring. In most cases the condition is
temporary and resolves with time. I would like to use the method of Pepe
et al Stat Med 1991; 413-421 - essentially the prevalence is the
Kaplan-Meier prob[having the condition at time t] - KM prob[recovery by
time t] (also divided by 1-KM[death by t], although death is not an
issue with this data).
I can easily produce the relevant actuarial data for either the
condition or recovery using survfit(eg survfit_cond$time ,
survfit_cond$surv, survfit_rec$time, survfit_rec$surv). I then have to
calculate (survfit_cond$surv-survfit_rec$surv) at each event time point.
Can anyone help me with an easy method to implement this? Or suggest an
easier method? I cant find a similar method after searching the
contributed packages (it doesn't appear to fit a recurrent events
problem). I have code for manual KM calculations, but the only method my
basic programming skills come up with seems tedious.
Thanks in advance
Dr. Scott Williams
Peter MacCallum Cancer Centre
More information about the R-help