Pyy-Martikainen Marjo
2006-Jan-02 13:52 UTC
[R] Variance of expected survival based on a Cox model with frailty
Dear R users, I am interested in the expected survival probabilities of an "example person", calculated on the basis of a Cox model with shared frailty. The example person has covariate values equal to zero and a frailty term equal to its expected value. I calculate the expected survival probabilities in the following way: fit1=coxph(...) base1=basehaz(fit1,centered=F) surv1=exp(-base1$hazard). Then I would like to calculate the variance of the expected survival probability but it seems to be a bit tricky. Has anybody calculated the variance of expected survival probability and willing to share the code? Thank you in advance for any help. Marjo Pyy-Martikainen