# Cox proportional hazards model and dummy variables

I have some doubts while doing this question. I tried out parts (a) - (c) and am quite confused by (d). Would appreciate if someone can help to check my work to see if I have done it correctly, thank you.

a) Model becomes ln(hazard) = -0.54128

Hazard ratio = exp(-0.54128) = 0.582

b) Model becomes ln(hazard) = 1.40685 + (-0.54128) - 1.6296 = -0.76403 Hazard ratio = exp(-0.76403) = 0.465

c) p = 0.0168 < 0.05. Hence there is a significant difference in treatment effect for men and women at 5% level of significance.

d) Do I find the calculation for men or women patients?

• answer to c is wrong. d. exp(new regression coefficient) = new treatment effect. Nov 11, 2018 at 3:26
• Thank you for your help :) Do I have to compare hazard ratios obtained from (a) and (b) in my answer for (c)? For instance, the hazard ratios obtained from (a) and (b) are quite close, so there is no significant difference in treatment effect for men & women. @a_statistician Nov 11, 2018 at 4:28
• Sorry, did not pay enough attention. answer to b is also wrong. Nov 11, 2018 at 4:35
• Once we answer these questions, why do you erase them? It seems to me that you are trying to hide the assistance you are receiving from us. Nov 11, 2018 at 7:36

Let $$\hat b_1=1.40685$$ be estimated coefficient of gender, and similarly, $$\hat b_2 = -0.54128$$, $$\hat b_3= -1.62960$$

 code    group        gender   trt gender*trt   log(hazard ratio)
a    male,no trt     0      0       0         0
b    male,trt        0      b2      0         b2
c    female, no trt  b1     0       0         b1
d    female, trt     b1     b2      b3        b1+b2+b3


The First question is b - a = b2 (log hazard ratio)

The Second question is d - c = b2 + b3 (log hazard ratio)

The third question is difference of difference = (b - a) - (d - c) = b3, so conclusion should be borderline because p value for b3 is 0.0652, close to 0.05.

The fourth question: When the model was fit, assumed there was no interaction between gender and trt. So the effect of trt is the same for male and female. the log(hazard ratio) = -1.09105. For the CI, get the CI of log(hazard ratio), then exp of them, you get the CI of hazard ratio.

In question a and b, should be ln(hazard ratio), instead of ln(hazard).