kassambara / survminer

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

ggpadjustedcurves confidence intervals? #307

Open fkgruber opened 6 years ago

fkgruber commented 6 years ago

Expected behavior

conf.int argument is ignored

Actual behavior

plot confidence intervals in plots

Steps to reproduce the problem

 library(survival)
 fit2 <- coxph( Surv(stop, event) ~ size, data = bladder )

single curve

 # conditional balancing in groups
 ggadjustedcurves(fit2, data = bladder, method = "conditional", variable = "rx",conf.int=TRUE)

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] glmnet_2.0-5    foreach_1.4.3   Matrix_1.2-7.1  survival_2.41-3
[5] survminer_0.4.2 ggpubr_0.1.6    magrittr_1.5    ggplot2_2.2.1  

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12      pillar_1.0.1      compiler_3.3.1    plyr_1.8.4       
 [5] bindr_0.1         iterators_1.0.8   tools_3.3.1       digest_0.6.12    
 [9] tibble_1.4.1      nlme_3.1-128      gtable_0.2.0      lattice_0.20-34  
[13] pkgconfig_2.0.1   rlang_0.1.6       psych_1.7.5       cmprsk_2.2-7     
[17] parallel_3.3.1    bindrcpp_0.2      gridExtra_2.2.1   knitr_1.15.1     
[21] dplyr_0.7.4       stringr_1.2.0     survMisc_0.5.4    cowplot_0.7.0    
[25] grid_3.3.1        data.table_1.10.4 glue_1.2.0        R6_2.2.2         
[29] KMsurv_0.1-5      km.ci_0.5-2       foreign_0.8-67    reshape2_1.4.2   
[33] tidyr_0.7.2       purrr_0.2.4       codetools_0.2-15  scales_0.5.0     
[37] splines_3.3.1     assertthat_0.2.0  mnormt_1.5-5      xtable_1.8-2     
[41] colorspace_1.3-1  labeling_0.3      stringi_1.1.2     lazyeval_0.2.0   
[45] munsell_0.4.3     broom_0.4.2       zoo_1.8-0        
> 
shmilt commented 5 years ago

Very important issue for me too. Would be glad to find a solution. Thanks.

KMBHPB commented 4 years ago

Any solutions out there to this??

cwilso6 commented 2 years ago

Any solutions out there to this??

RobinDenz1 commented 2 years ago

You can use the beta-version of my new R-package adjustedCurves to do this: https://github.com/RobinDenz1/adjustedCurves