RMSTã®ç®åº
çåæéåæã§RMSTãåºãããã ãã¡ãã§ã¯survRM2ããã±ã¼ã¸ã使ãã¨è¯ãã¨ããã
survRM2ããã±ã¼ã¸ã®vignetteã¯ãã¡ãã https://cran.r-project.org/web/packages/survRM2/vignettes/survRM2-vignette3-2.html
ãããªæãã§RMSTãç®åºãã¦ãããã
> smp <- pbc %>% filter(status %in% c(0,2), !is.na(trt)) %>% + mutate(status = if_else(status == 2, 1, 0), + trt = trt-1 # å¾è¿°ã®rmst2()ã®amrå¼æ°ã0,1ããåãä»ããªãããå¤æ + ) # ãµã³ãã«ãã¼ã¿ >library(survRM2) > with(smp, rmst2(time, status, trt, tau = 3650)) The truncation time: tau = 3650 was specified. Restricted Mean Survival Time (RMST) by arm Est. se lower .95 upper .95 RMST (arm=1) 2614.267 111.805 2395.133 2833.401 RMST (arm=0) 2574.660 105.944 2367.014 2782.305 Restricted Mean Time Lost (RMTL) by arm Est. se lower .95 upper .95 RMTL (arm=1) 1035.733 111.805 816.599 1254.867 RMTL (arm=0) 1075.340 105.944 867.695 1282.986 Between-group contrast Est. lower .95 upper .95 p RMST (arm=1)-(arm=0) 39.608 -262.281 341.496 0.797 RMST (arm=1)/(arm=0) 1.015 0.904 1.141 0.797 RMTL (arm=1)/(arm=0) 0.963 0.723 1.283 0.797
ããããadjustããã¦ããªãã·ã³ãã«ãªRMSTã§ããã°ãsurvfitã®çµæãprint()ããã°è¡¨ç¤ºãã¦ãããã
> fit <- survfit( Surv(time, status) ~ trt, data = smp) > print(fit, print.rmean=TRUE, digits = 5, rmean = 3650) Call: survfit(formula = Surv(time, status) ~ trt, data = smp) n events *rmean *se(rmean) median 0.95LCL 0.95UCL trt=0 148 65 2574.7 105.94 3222 2540 NA trt=1 145 60 2614.3 111.81 3395 3090 NA * restricted mean with upper limit = 3650