Hey guys, I have a question.
I drew a weighted Kaplan-Meier survival plor using the survey::svykm() function, like this:
library(survey) data(pbc, package="survival") pbc$randomized <- with(pbc, !is.na(trt) & trt>0) biasmodel <- glm(randomized~age*edema,data=pbc) pbc$randprob <- fitted(biasmodel) dpbc<-svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized)) s2 <-svykm(Surv(time,status==1) ~ sex, design = dpbc)
Now I would like to calculate the survival rates and number of deaths after x months similar to what I would get when using
summary(s2, times = 320 on a survfit object. Does anybody know how I can extract these values?
Many thanks in advance!