[R] cumulative survival/number of deaths after weighting using survey::svykm()

s@ski@@grob m@iii@g oii quickii@e@ch s@ski@@grob m@iii@g oii quickii@e@ch
Wed Aug 3 08:37:28 CEST 2022

Hey guys.
I have a question.
I drew a weighted Kaplan-Meier survival plot using the survey::svykm() function, like this:
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!

	[[alternative HTML version deleted]]

More information about the R-help mailing list