-- begin included message ---
Dear useRs,
I'm trying to estimate the proportion of individuals with a without a certain 
recurring ailment at several times points. The data are of the survival type, 
with "start"-"stop" dates and whether the individual had the ailment in that 
interval. 
Some cases are observed until database closure and some died or are lost to 
followup. The interest is not on death. I have tries using "coxph" and "cph" as
.
.
.
----- end included ---

 The simple solution is to use survfit
 
> fit <- survfit(Surv(start, stop, sick) ~1, data=test.data)
> plot(fit, fun='cumhaz')
> summary(fit, times=seq(0, 128, by=16))
 
  
  You do not say whether the subjects can have mutliple episodes.  If so, then 
the standard errors above will by underestimates and one needs to do compute a 
jackknife variance.  If each subject can have at most one episode then the 
above 
will be correct.  Using coxph + frailty + survfit does not address the problem; 
the survival curve function is not yet intellegent enough for that.
  Note that the cumulative hazard = -log(survival) is an estimate of the mean 
number of events M(t) per subject,  whereas the survival curve S(t) is an 
estimate of Pr(0 events by time t).
  
        Terry Therneau

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to