I could get the survival rate and it's 95% CI in this way:
library(survival)
library(survminer)
lung
lung$survobj1=with(lung,Surv(time,status==2))
fit1 <- survfit(survobj1 ~ 1, data = lung, conf.type = "log-log")
summary(fit1,times = seq(0, 19) * 56)
As you can see, the summary return the survival rate and its 95% CI:
Now I'd like to get the cumulative incidence rate and its 95% CI in the similar way, but I don't know how to get it from the summary.
I also tried to plot the cumulative incidence rate by using:
ggsurvplot(fit1,data=lung,conf.int = TRUE,fun="cumhaz")
But I am not sure if I was doing in the right way.