Displaying 1 result from an estimated 1 matches for "survfit1".
Did you mean:
survfit
2011 Apr 05
0
frailty
...' package.
The following model with the function R ?coxph? was fitted:
modx <- coxph(Surv(to_stroke, stroke) ~ age + sbp + dbp + sex +
frailty(center,distribution = "gamma", method='aic'), data=datax)
Then I get survival (eg to 10 years) for the mean of the covariates:
survfit1 <- survfit(modx)
timesele<- 3652.25
tab <- as.data.frame(cbind(survfit1$time, survfit1$surv))
names(tab) <- c("time", "surv")
meansurv <- tab[tab$time==max(tab$time[tab$time<timesele]), ]$surv
?survfit.coxph? allows the entry of 'newdata' with the char...