ggsurvplot pval矩阵,可进行多臂比较

时间:2018-08-01 17:28:20

标签: r statistics survival-analysis

我正在尝试比较4种不同的临床试验装置。

我可以使用ggsurvplot有效地绘制数据,但是我想生成一个p值表,比较所有可能的臂组合。

下面是我的代码及其生成的图:

#Fitting ambristentan data
ambri_surv_fit <- survfit(Surv(event_time, censor)~1, data=ambri_mono)

#Fitting tadalafil data
tada_surv_fit <- survfit(Surv(event_time, censor)~1, data=tada_mono)

#Fitting macitentan data
maci_surv_fit <- survfit(Surv(event_time, censor)~1, data=maci_mono)

#Fitting maci_control mono data
maci_control_mono_surv_fit <- survfit(Surv(event_time, censor)~1, data=maci_control_mono)

surv_fit_list <- list("ambirsentan monotherapy" =ambri_surv_fit,
                     "tadalafil monotherapy" = tada_surv_fit,
                     "macitentan monotherapy" = maci_surv_fit,
                     "macitentan control monotherapy" = maci_control_mono_surv_fit)

ggsurvplot(surv_fit_list,
           combine = TRUE,
           conf.int = TRUE,
           risk.table = TRUE,
           pval = TRUE)

enter image description here

我想以某种方式在图像中获取表格或将其作为数据框,使其看起来像这样(其中a,b,c,d是治疗臂):

   a    b    c   d
a  p1   p2   p3  p4
b  p2   p6   p7  p8
c  p3   p7   p9  p10
d  p4   p8   p10 p11

0 个答案:

没有答案