kassambara / survminer

Survival Analysis and Visualization
https://rpkgs.datanovia.com/survminer/
491 stars 160 forks source link

ggpadjustedcurves confidence intervals #334

Open fkgruber opened 6 years ago

fkgruber commented 6 years ago

Expected behavior

plot adjusted survival curves with confidence intervals

Actual behavior

there is not options to add errorbars

Test

ggadjustedcurves(fit2, data = bladder, method = "conditional", variable = "rx",conf.int=TRUE) does not add confidence intervals

session_info()

R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] grid splines stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] survey_3.32-1 Matrix_1.2-7.1 IPWsurvival_0.5
[4] survminer_0.4.2 ggpubr_0.1.6 magrittr_1.5
[7] forcats_0.2.0 stringr_1.3.1 dplyr_0.7.4
[10] purrr_0.2.4 readr_1.1.1 tidyr_0.8.1
[13] tibble_1.4.2 ggplot2_2.2.1 tidyverse_1.2.1
[16] bindrcpp_0.2 simPH_1.3.10 muhaz_1.2.6
[19] survival_2.41-3 surv2sampleComp_1.0-5 DiagrammeRsvg_0.1

loaded via a namespace (and not attached): [1] httr_1.3.1 jsonlite_1.5 modelr_0.1.1 assertthat_0.2.0
[5] cellranger_1.1.0 pillar_1.3.0 lattice_0.20-34 glue_1.2.0
[9] quadprog_1.5-5 digest_0.6.13 RColorBrewer_1.1-2 rvest_0.3.2
[13] colorspace_1.3-1 cmprsk_2.2-7 plyr_1.8.4 psych_1.7.5
[17] mstate_0.2.11 pkgconfig_2.0.1 flexsurv_1.1 broom_0.4.2
[21] haven_1.1.0 xtable_1.8-2 mvtnorm_1.0-6 scales_0.5.0
[25] km.ci_0.5-2 KMsurv_0.1-5 mgcv_1.8-18 lazyeval_0.2.0
[29] cli_1.0.0 mnormt_1.5-5 crayon_1.3.4 readxl_1.0.0
[33] nlme_3.1-128 MASS_7.3-45 xml2_1.1.1 foreign_0.8-67
[37] tools_3.3.1 data.table_1.10.4 hms_0.3 V8_1.5
[41] munsell_0.4.3 plotrix_3.6-5 compiler_3.3.1 rlang_0.2.1
[45] rstudioapi_0.7 tcltk_3.3.1 labeling_0.3 gtable_0.2.0
[49] deSolve_1.21 curl_2.3 reshape2_1.4.2 R6_2.2.2
[53] zoo_1.8-0 gridExtra_2.3 lubridate_1.7.1 knitr_1.15.1
[57] survMisc_0.5.4 bindr_0.1 stringi_1.2.4 parallel_3.3.1
[61] Rcpp_0.12.14 tidyselect_0.2.3

# please paste here the result of
devtools::session_info()
shmilt commented 5 years ago

True! I would also like this feature to be added. Thanks.

cwilso6 commented 2 years ago

Any solutions out there to this??

RobinDenz1 commented 2 years ago

It is not implemented in the ggadjustedcurves function, but you can use the beta-version of my R-package adjustedCurves to do this: https://github.com/RobinDenz1/adjustedCurves