Search code examples
rcox-regressionsurvival

Computing SE or CI for ggadjustedcurves


How can I compute index of variability (SE or CI) for ggadjustedcurves from survminer function? I am using the conditional method. Anyone have any input or resource?


Solution

  • Short answer: you can´t. In documentation for ggadjustedcurves the option for confidence intervals has not been specified. Now if you try to use conf.int parameter in ggadjustedcurves call it wont error out but it also wont work. Also in github page of the package the issue has been reported and this feature has been requested but not yet added.

    You can easily calculate and plot CI inggsurvplot function from the same package by adding conf.int = TRUE. With ggsurvplot it goes like this:

    library(survminer)
    fit <- survfit(Surv(stop, event) ~ rx, data = bladder )
    ggsurvplot(fit, data = bladder, conf.int=TRUE)