1

我有一个看起来像这样的数据集:

  Treatment Surface ex.time excision antib.time antibiotic inf.time infection
1         0      15      12        0         12          0       12         0
2         0      20       9        0          9          0        9         0
3         0      15      13        0         13          0        7         1
4         0      20      11        1         29          0       29         0
5         0      70      28        1         31          0        4         1
6         0      20      11        0         11          0        8         1

he variables represented in the dataset are as follows: 

Observation number 
Treatment 
      0-routine bathing 1-Body cleansing 
Surface
      Percentage of total surface area burned 
Exis.time
      Time to excision or on study time 
Excision  
      indicator: 1=yes 0=no 
Antib.time
      Time to prophylactic antibiotic treatment or on study time 
antibiotic 
      indicator: 1=yes 0=no 
inf.time Time to straphylocous aureaus infection or on study time 
infection 
     indicator:  1=yes 0=no 

我想将感染前的时间建模为治疗、表面、抗生素治疗前的时间和切除前的时间。根据其他帖子,该数据集必须从宽转换为长。但是我不知道该怎么做?然后,一旦数据格式正确,我将使用以下公式:

coxph(Surv(start, stop, event) ~ m, data=times)

到目前为止,我只运行了一个正常的 Cox 回归,但我想这是不正确的,因为没有考虑时间依赖性?

coxph(formula = Surv(inf.time, infection) ~ Treatment + Surface + 
    ex.time + antib.time, data = BurnData)

  n= 154, number of events= 48 

                coef exp(coef)  se(coef)      z Pr(>|z|)
Treatment  -0.453748  0.635243  0.300805 -1.508    0.131
Surface     0.006932  1.006956  0.007333  0.945    0.345
ex.time     0.013503  1.013595  0.018841  0.717    0.474
antib.time  0.009546  1.009592  0.009560  0.999    0.318

           exp(coef) exp(-coef) lower .95 upper .95
Treatment     0.6352     1.5742    0.3523     1.145
Surface       1.0070     0.9931    0.9926     1.022
ex.time       1.0136     0.9866    0.9768     1.052
antib.time    1.0096     0.9905    0.9909     1.029

Concordance= 0.576  (se = 0.046 )
Rsquare= 0.041   (max possible= 0.942 )
Likelihood ratio test= 6.5  on 4 df,   p=0.1648
Wald test            = 6.55  on 4 df,   p=0.1618
Score (logrank) test = 6.71  on 4 df,   p=0.1519
4

0 回答 0