I want to construct a life table for some event of interest. See below for an example:
I'm trying to do this with survival
R package: https://cran.r-project.org/web/packages/survival/survival.pdf.
library(survival)
surv <- Surv(veteran$time, veteran$status)
km <- survfit(surv~trt, data = veteran)
summary(km, censored = TRUE)
Notice that I specified censored = TRUE. Specifying this option should make the censoring times included in the output.
It prints time, n.risk, n.event, survival, std.err, lower 95% CI, and upper 95% CI. However, it doesn't print n.exit.censored as expected. I'm trying to figure out why it's not printing the a number censored column. I downloaded the latest version of survival package.
packageVersion("survival")
Prints
[1] ‘2.43.3’
Is this happening for anyone else?