简体   繁体   English

(烧伤)数据的 Cox 比例风险模型

[英]Cox proportional hazard model on (burn) data

On a study is described which evaluates a protocol change in disinfectant practices in a large midwestern university medical center.描述了一项研究,该研究评估了大型中西部大学医学中心消毒剂实践的协议变化。 Of primary interest in the study is a comparison of two methods of body cleansing.该研究的主要兴趣是比较两种身体清洁方法。 The first method, used exclusively from January 1983 to June 1984, consisted of a routine bathing care method (initial surface decontamination with 10% povidone-iodine followed with regular bathing with Dial soap).第一种方法仅在 1983 年 1 月至 1984 年 6 月期间使用,包括常规沐浴护理方法(首先用 10% 聚维酮碘进行表面去污,然后定期用 Dial 肥皂沐浴)。 From June 1984 to the end of the study period in December1985, body cleansing was initially performedusing 4% chlorhexidine gluconate.从 1984 年 6 月到 1985 年 12 月研究期结束,最初使用 4% 葡萄糖酸氯己定进行身体清洁。 Eighty-four patients were in the group who received the new bathing solution, chlorhexidine, and 70 patients served as the control group who received routine bathing care, povidoneiodine. 84名患者在接受新沐浴液洗必泰治疗组,70名患者作为对照组,接受常规沐浴护理,聚维酮碘治疗。 Included in the data set is a covariate that measures the total surface area burned.数据集中包括一个协变量,用于测量燃烧的总表面积。 The data is (burn).数据是(刻录)。 I want to test for: 1- any difference in survival functions for the two groups.我想测试: 1- 两组生存函数的任何差异。 2- any difference in survival functions for the two groups adjusting for total area burned. 2-调整总烧伤面积后两组生存函数的任何差异。

library(KMsurv)
data()
data(burn)
burn

library(survival)

I know that the function that would be used is coxph() , but I'm not sure which groups that I should test for (from the above information).我知道将使用的函数是coxph() ,但我不确定我应该测试哪些组(根据上述信息)。 Are they T1 and D2?他们是T1和D2吗? so that for 1, Coxfit1<-coxph(Surv(T1,D2)~group, data = burn) ?所以对于 1, Coxfit1<-coxph(Surv(T1,D2)~group, data = burn) and for 2, Coxfit2<-coxph(Surv(T1,D2)~Z4, data = burn) ?对于 2, Coxfit2<-coxph(Surv(T1,D2)~Z4, data = burn) ?

What is this code doing?这段代码在做什么?

for(i in 1:154){
  if (burn$??[i]==2)
    burn$Z1[i]<-1
  else burn$Z1[i]<-0
}

for(i in 1:154){
  if (burn$??[i]==3)
    burn$Z2[i]<-1
  else burn$Z2[i]<-0
}

For question 1, you want to test the survival distributions* between the levels of the Z1 variable.对于问题 1,您想测试Z1变量水平之间的生存分布*。 There is no variable called group in the dataset.数据集中没有名为group变量。 Z1=0 means routine bathing and Z1=1 means body cleansing. Z1=0 表示常规沐浴,Z1=1 表示身体清洁。 You may want to convert all Z variables to factors before continuing further (except Z4).您可能希望在继续之前将所有 Z 变量转换为因子(Z4 除外)。

library(survival)
library(KMsurv)
library (dplyr)

burn$Z1 <- factor(burn$Z1, label=c("Routine bathing", "Body cleansing"))

* The word survival needs some clarification. * 生存这个词需要澄清一下。 Presumably it is time until first straphylocous aureaus infection (D3) or on study time if no event occurred.大概是第一次带状金黄色葡萄球菌感染 (D3) 或研究时间(如果没有发生事件)的时间。 The time is in variable T3.时间在变量 T3 中。

The command to perform the test is:执行测试的命令是:

coxph(Surv(T3,D3) ~ Z1, data=burn)
                    coef exp(coef) se(coef)      z      p
Z1Body cleansing -0.5614    0.5704   0.2934 -1.914 0.0557

For question 2, Z4 contains the percentage of total surface area burned, the variable to adjust for.对于问题 2,Z4 包含燃烧总表面积的百分比,这是要调整的变量。

coxph(Surv(T3,D3)~Z1+Z4, data=burn)

                      coef exp(coef)  se(coef)      z     p
Z1Body cleansing -0.524764  0.591695  0.295769 -1.774 0.076
Z4                0.007248  1.007275  0.007145  1.015 0.310

So there appears to be no difference in time until first infection between those who were given routine bathing vs body cleansing.因此,接受常规沐浴和身体清洁的人在首次感染之前的时间似乎没有差异。

??burn tells you what the variables mean; ??burn告诉你变量的含义; Z1 and Z4 seem to be what you are after: Z1 和 Z4 似乎是您所追求的:

This data frame contains the following columns:此数据框包含以下列:

Obs Observation number Obs 观察数

Z1 Treatment: 0-routine bathing 1-Body cleansing Z1 护理:0-常规沐浴 1-身体清洁

Z2 Gender (0=male 1=female) Z2 性别(0=男性 1=女性)

Z3 Race: 0=nonwhite 1=white Z3 种族:0=非白色 1=白色

Z4 Percentage of total surface area burned Z4 燃烧总表面积的百分比

Z5 Burn site indicator: head 1=yes, 0=no Z5 烧伤部位指示:头部 1=是,0=否

Z6 Burn site indicator: buttock 1=yes, 0=no Z6 烧伤部位指标:臀部 1=是,0=否

Z7 Burn site indicator: trunk 1=yes, 0=no Z7 烧伤现场指示灯:中继 1=是,0=否

Z8 Burn site indicator: upper leg 1=yes, 0=no Z8 烧伤部位指示器:大腿 1=是,0=否

Z9 Burn site indicator: lower leg 1=yes, 0=no Z9 烧伤部位指示器:小腿 1=是,0=否

Z10 Burn site indicator: respiratory tract 1=yes, 0=no Z10 烧伤部位指示:呼吸道 1=是,0=否

Z11 Type of burn: 1=chemical, 2=scald, 3=electric, 4=flame Z11 烧伤类型:1=化学,2=烫伤,3=电,4=火焰

T1 Time to excision or on study time T1 切除时间或学习时间

D1 Excision indicator: 1=yes 0=no D1 切除指标:1=是 0=否

T2 Time to prophylactic antibiotic treatment or on study time T2 预防性抗生素治疗的时间或研究时间

D2 Prophylactic antibiotic treatment: 1=yes 0=no D2 预防性抗生素治疗:1=是 0=否

T3 Time to straphylocous aureaus infection or on study time T3 金黄色葡萄球菌感染时间或研究时间

D3 Straphylocous aureaus infection: 1=yes 0=no D3 金黄色葡萄球菌感染:1=是 0=否

Source Klein and Moeschberger (1997) Survival Analysis Techniques for Censored and truncated data, Springer.来源 Klein 和 Moeschberger (1997) 截断和截断数据的生存分析技术,Springer。 Ichida et al.市田等人。 Stat.统计。 Med.医学。 12 (1993): 301-310. 12 (1993):301-310。

Edit: In your case, there is a significant difference between routine bathing and body cleansing (Z1), but Percentage of total surface area burned (Z4) is not significant in a univariate analysis.编辑:就您而言,常规沐浴和身体清洁 (Z1) 之间存在显着差异,但在单变量分析中,燃烧总表面积的百分比 (Z4) 并不显着。

library(KMsurv)
library(survival)
library(survminer)
#> Loading required package: ggplot2
#> Loading required package: ggpubr
#> Loading required package: magrittr
data(burn)

## Univariate Cox regression analysis to see whether Z1 and Z4 are significant:
res.cox <- coxph(Surv(T1, D1) ~ Z1, data = burn)
summary(res.cox)
#> Call:
#> coxph(formula = Surv(T1, D1) ~ Z1, data = burn)
#> 
#>   n= 154, number of events= 99 
#> 
#>      coef exp(coef) se(coef)     z Pr(>|z|)   
#> Z1 0.5504    1.7339   0.2072 2.656   0.0079 **
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#>    exp(coef) exp(-coef) lower .95 upper .95
#> Z1     1.734     0.5767     1.155     2.602
#> 
#> Concordance= 0.599  (se = 0.027 )
#> Likelihood ratio test= 7.24  on 1 df,   p=0.007
#> Wald test            = 7.06  on 1 df,   p=0.008
#> Score (logrank) test = 7.23  on 1 df,   p=0.007
ggsurvplot(surv_fit(Surv(T1, D1) ~ Z1, data = burn), data = burn,
           conf.int = TRUE, pval = TRUE)


res.cox <- coxph(Surv(T1, D1) ~ Z4, data = burn)
summary(res.cox)
#> Call:
#> coxph(formula = Surv(T1, D1) ~ Z4, data = burn)
#> 
#>   n= 154, number of events= 99 
#> 
#>         coef exp(coef)  se(coef)      z Pr(>|z|)
#> Z4 -0.005108  0.994905  0.005408 -0.945    0.345
#> 
#>    exp(coef) exp(-coef) lower .95 upper .95
#> Z4    0.9949      1.005    0.9844     1.006
#> 
#> Concordance= 0.529  (se = 0.034 )
#> Likelihood ratio test= 0.94  on 1 df,   p=0.3
#> Wald test            = 0.89  on 1 df,   p=0.3
#> Score (logrank) test = 0.89  on 1 df,   p=0.3

## Multivariate Cox regression analysis to see whether Z1 and Z4 remain significant
## here, univariate Z4 was n.s., so not that relevant...
res.cox <- coxph(Surv(T1, D1) ~ Z1 + Z4, data = burn)
summary(res.cox)
#> Call:
#> coxph(formula = Surv(T1, D1) ~ Z1 + Z4, data = burn)
#> 
#>   n= 154, number of events= 99 
#> 
#>         coef exp(coef)  se(coef)      z Pr(>|z|)  
#> Z1  0.534232  1.706138  0.208651  2.560   0.0105 *
#> Z4 -0.003458  0.996548  0.005435 -0.636   0.5246  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#>    exp(coef) exp(-coef) lower .95 upper .95
#> Z1    1.7061     0.5861     1.133     2.568
#> Z4    0.9965     1.0035     0.986     1.007
#> 
#> Concordance= 0.606  (se = 0.033 )
#> Likelihood ratio test= 7.66  on 2 df,   p=0neither.02
#> Wald test            = 7.44  on 2 df,   p=0.02
#> Score (logrank) test = 7.61  on 2 df,   p=0.02

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM