Chapter 4 Cox regression

I am not sure if we will get this far (there’s a lot to cover in survival curves). Cox regression is one of the most popular methods of regression in survival analysis. Remember, we are trying to discover what variables have an impact on the length of time til an event occurs.

Cox proportional hazard regression models the hazard rate (not survival probabilities). The hazard rate is the instantaneous event rate for the risk set at time t. There is A LOT involved in this modeling, but we will at least demonstrate how to do this:

lung_ph= coxph(Surv(time,status==2) ~ sex  + factor(ph.ecog) , data=lung)
summary(lung_ph)
## Call:
## coxph(formula = Surv(time, status == 2) ~ sex + factor(ph.ecog), 
##     data = lung)
## 
##   n= 227, number of events= 164 
##    (1 observation deleted due to missingness)
## 
##                     coef exp(coef) se(coef)      z Pr(>|z|)    
## sex              -0.5449    0.5799   0.1681 -3.241  0.00119 ** 
## factor(ph.ecog)1  0.4182    1.5192   0.1994  2.097  0.03602 *  
## factor(ph.ecog)2  0.9475    2.5792   0.2248  4.216 2.49e-05 ***
## factor(ph.ecog)3  2.0485    7.7565   1.0269  1.995  0.04605 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                  exp(coef) exp(-coef) lower .95 upper .95
## sex                 0.5799     1.7245    0.4171    0.8062
## factor(ph.ecog)1    1.5192     0.6582    1.0277    2.2459
## factor(ph.ecog)2    2.5792     0.3877    1.6602    4.0067
## factor(ph.ecog)3    7.7565     0.1289    1.0366   58.0390
## 
## Concordance= 0.642  (se = 0.025 )
## Likelihood ratio test= 29.5  on 4 df,   p=6e-06
## Wald test            = 30.7  on 4 df,   p=4e-06
## Score (logrank) test = 32.71  on 4 df,   p=1e-06