# Thread: Proportional hazards and Cox Model

1. ## Proportional hazards and Cox Model

I'm trying to fit a Cox model, but there is some problems. I have the following variables in the model.

- Group: 1, 2, ..., 9
- Sex: 1 female and 0 male
- Weight
- Age

The first thing that I did is split the variables Age and Weight in 4 different groups and check if the assumption of proportional hazards is met for each variable. I did the plot of log-log(S(t))xt

The plot below is from Groups

For all the four variables the proportional hazard assumption is violated (crossed curves). Then I check it with hypothesis test and run the model

Code:
``````model<-coxph(Surv(Time,Event)~ Group + Sex + Weight + Age,data= dataset)
summary(model)
coef          exp(coef)      se(coef)   z       Pr(>|z|)
G2  0.1705602  1.1859691  0.1956226  0.872 0.383272
G3 -1.0036611  0.3665351  0.2386762 -4.205 2.61e-05 ***
G4 -0.8381683  0.4325020  0.2399613 -3.493 0.000478 ***
G5 -0.4544249  0.6348130  0.2092611 -2.172 0.029888 *
G6 -0.9123168  0.4015927  0.3471589 -2.628 0.008590 **
G7 -0.9977854  0.3686950  0.2413699 -4.134 3.57e-05 ***
G8 -1.7056585  0.1816527  0.3097035 -5.507 3.64e-08 ***
G9 -1.1614730  0.3130248  0.2488757 -4.667 3.06e-06 ***
Sex    -0.0307328  0.9697347  0.1331374 -0.231 0.817443
Weight 0.0004572  1.0004573  0.0004121  1.109 0.267330
Age    0.0044168  1.0044266  0.0036702  1.203 0.228815``````
From the `summary` of model, Sex, Weight, Age are not significant. Then the model just have groups as variables.

So I did

Code:
``````cox.zph(model,transform="rank",global=TRUE)

rho   chisq        p
G2 -0.1142  4.2426 0.039423
G3 -0.1732 10.6197 0.001119
G4 -0.0989  3.2302 0.072293
G5 -0.1588  8.7741 0.003055
G6 -0.1284  5.4636 0.019416
G7 -0.0508  0.9136 0.339165
G8  0.0984  3.3136 0.068709
G9 -0.1062  4.1598 0.041395
Sex    0.0085  0.0242 0.876276
Weight     0.1121  5.1191 0.023664
Age      -0.0109  0.0372 0.846986
GLOBAL         NA 36.2568 0.000153``````
I don't understand well this output, Group7 have prorportional hazard alone? How Sex, Age have proportional hazards if the curves of plot crossed?

If one level of categorical variable not hold the proportional hazard assumption, then the categorical variable not met the assumption right?

2. ## Re: Proportional hazards and Cox Model

I tested several models using likelihood ratio test, and the only significant explanatory variable is group, but the proportional hazard assumption is not valid for all levels of this variable. What I should do in this case?

I have just one significant variable, and some levels of this variable don't met the proportional hazard assumption.

3. ## Re: Proportional hazards and Cox Model

Group7 have prorportional hazard alone? .
answering this question ... I'd say yes ... it means Group 7 has PH relative to your baseline group (group 1 I think).
I think the first thing I'd ask is why are you categorising age and weight - unless there's a good reason (cutoffs are clinically relevant ie not just quartiles) then I'd keep those as continuous and do PH tests for a continuous variable (then I'd prefer the cumulative martingale tests of Wei both for PH and for functional form is should it be a log transform)

4. ## Re: Proportional hazards and Cox Model

Originally Posted by azStats
answering this question ... I'd say yes ... it means Group 7 has PH relative to your baseline group (group 1 I think).
I think the first thing I'd ask is why are you categorising age and weight - unless there's a good reason (cutoffs are clinically relevant ie not just quartiles) then I'd keep those as continuous and do PH tests for a continuous variable (then I'd prefer the cumulative martingale tests of Wei both for PH and for functional form is should it be a log transform)
I just categorising age and weight when I did the plot of loglog(S(t)) to see if exists violation of proportional hazard assumption, in the cox.phz I didn't did it.

5. ## Re: Proportional hazards and Cox Model

I get what you are trying to do. Is that the normal approach for testing proportional hazard, the categorizing of a continuous variable? I haven't used PHReg in awhile.

6. ## Re: Proportional hazards and Cox Model

Originally Posted by hlsmith
I get what you are trying to do. Is that the normal approach for testing proportional hazard, the categorizing of a continuous variable? I haven't used PHReg in awhile.
This is one of the possible approaches to verify whether the proportionality hypothesis is satisfied, although the interpretation is somewhat subjective. Even if I use the Cox model stratified by groups, and assume that the weight variable satisfies the hypothesis of proportionality (it does not satisfy, has p-value 0.02) the output of the stratified model is as follows
Code:
``````             coef  exp(coef)   se(coef)      z Pr(>|z|)
Sex -0.0295480  0.9708843  0.1331459 -0.222    0.824
Weight    0.0004545  1.0004546  0.0004111  1.105    0.269
Age    0.0043919  1.0044016  0.0036679  1.197    0.231``````
Here I have two main points

1) The explanatory variables are not significant

2) The explanatory variables don't have significant effect, since the exp(coef) is almost 1.