Plot of Kaplan-Meier curve inconsistent with generated statistics
Clash Royale CLAN TAG#URR8PPP
Plot of Kaplan-Meier curve inconsistent with generated statistics
I am plotting a Kaplan-Meier (KM) curve for the readmission data which is available in the R package frailtypack. I used these simple codes which stratifies the curve by sex variable:
library(survival)
library(frailtypack)
data(readmission)
readmission
sobj<-Surv(readmission$time,readmission$event==1)
km.plot <- survfit(sobj ~readmission$sex, data = readmission)
km.plot
plot(km.plot,lty=c(1,2),lwd=2)
legend(x="bottomleft",lty=c(1,2),lwd=2, legend=c("Male","Female"))
The data is on recurrent events (i.e. subjects have multiple failure times). The output from "km.plot" tells me that there are substantial censored event times for both males and females. Under this I expect the KM curves to level-off to non-zero survival probabilities but that of the female goes zero. I still get this when I produce the plot for only the first event times, neglecting subsequent ones.
I think something is probably wrong with my code but finding it hard to figure it out. I greatly appreciate any help on this
1 Answer
1
Do NOT create Surv-objects outside the regression arguments, and DO use column names without reference to the dataframes. The violation of those two practices in your code will prevent the ‘predict’ and ‘plot’ methods from knowing where to access the data elements using the terms attributes in the model objects.
The question of the shape of the curve: If the last event is a death then the K-M curve will drop to zero.
And please explain why you think a K-M curve would be meaningful with “repeated events”?
If you are looking for recurrence free intervals then time would start at first event and “death” would occur at the second event and the time would be the difference in times. Any subsequent events would be suppressed.
– 42-
Aug 14 at 7:57
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thanks for clarification. I think K-M curve can be used to examine the recurrence free rate over time. In this case the survival probabilities can be interpreted as recurrence free probabilities.
– T Richard
Aug 13 at 6:05