Question about R code of survival analysis

hehe1223

New Member
I have some questions about cox ph model based on the following demo data set. Thanks a lot for help!

> ovarian
futime fustat age resid.ds rx ecog.ps
1 59 1 72.3315 2 1 1
2 115 1 74.4932 2 1 1
3 156 1 66.4658 2 1 2
4 421 0 53.3644 2 2 1
5 431 1 50.3397 2 1 1
6 448 0 56.4301 1 1 2
7 464 1 56.9370 2 2 2
8 475 1 59.8548 2 2 2
9 477 0 64.1753 2 1 1
10 563 1 55.1781 1 2 2
11 638 1 56.7562 1 1 2
12 744 0 50.1096 1 2 1
13 769 0 59.6301 2 2 2
14 770 0 57.0521 2 2 1
15 803 0 39.2712 1 1 1
16 855 0 43.1233 1 1 2
17 1040 0 38.8932 2 1 2
18 1106 0 44.6000 1 1 1
19 1129 0 53.9068 1 2 1
20 1206 0 44.2055 2 2 1
21 1227 0 59.5890 1 2 2
22 268 1 74.5041 2 1 2
23 329 1 43.1370 2 1 1
24 353 1 63.2192 1 2 2
25 365 1 64.4247 2 2 1
26 377 0 58.3096 1 2 1

Question 1:
The following is the R code for cox ph model. It actually gives both likelihood ratio test and logrank test.
For likelihood ratio test. Is it based on the null hypothesis that coefficient for both predictors = 0?
I wonder how logrank test is done for coxph model? Shouldn't it be done on categorical data only?

> cph1=coxph(Surv(futime, fustat)~rx+age , ovarian)
> summary(cph1)
Call:
coxph(formula = Surv(futime, fustat) ~ rx + age, data = ovarian)

n= 26

coef exp(coef) se(coef) z Pr(>|z|)
rx -0.80397 0.44755 0.63205 -1.272 0.20337
age 0.14733 1.15873 0.04615 3.193 0.00141 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

exp(coef) exp(-coef) lower .95 upper .95
rx 0.4475 2.234 0.1297 1.545
age 1.1587 0.863 1.0585 1.268

Rsquare= 0.457 (max possible= 0.932 )
Likelihood ratio test= 15.89 on 2 df, p=0.0003551
Wald test = 13.47 on 2 df, p=0.00119
Score (logrank) test = 18.56 on 2 df, p=9.34e-05

Question 2:
Does COX ph model assume the predictors are independent? I thought it is. But the following R function actually looks for interaction (by changing rx+age to rx*age). Is this actually a different model?

> coxph(Surv(futime, fustat)~rx*(age>60), ovarian)
Call:
coxph(formula = Surv(futime, fustat) ~ rx * (age > 60), data = ovarian)
coef exp(coef) se(coef) z p
rx -0.350 0.705 0.818 -0.428 0.67
age > 60TRUE 2.012 7.479 1.847 1.089 0.28
rx:age > 60TRUE 0.176 1.192 1.230 0.143 0.89
Likelihood ratio test=11.8 on 3 df, p=0.0082 n= 26