[R] Weighted Kaplan-Meier estimates with R (with confidence intervals)?

rm rm at wippies.se
Mon Mar 25 10:47:26 CET 2013


As part of a research paper, I would like to draw both weighted and
unweighted Kaplan-Meier estimates, the weight being the ’importance’ of the
each project to the mass of projects whose survival I’m trying to estimate.

I know that the function survfit in the package survival accepts weights and
produces confidence intervals. However, I suspect that the confidence
intervals may not be correct. The reason why I suspect this is that
depending on how I define the weights, I get very different confidence
intervals, e.g.

require(survival) 
s <- Surv(c(50,100),c(1,1)) 
sf <- survfit(s~1,weights=c(1,2)) 
plot(sf) 

vs.

require(survival) 
s <- Surv(c(50,100),c(1,1)) 
sf <- survfit(s~1,weights=c(100,200)) 
plot(sf)

Any suggestions would be more than welcome!




--
View this message in context: http://r.789695.n4.nabble.com/Weighted-Kaplan-Meier-estimates-with-R-with-confidence-intervals-tp4662360.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list