In a coxph model with 2 variables (let's say age and sex), how can I get the p-values for LR, Wald and score tests which I see in the summary(coxphobject) as below?
Concordance= 0.653 (se = 0.058 )
Rsquare= 0.085 (max possible= 0.924 )
Likelihood ratio test= 30.09 on 12 df, p=0.002708
Wald test = 34.73 on 12 df, p=0.0005169
Score (logrank) test = 34 on 12 df, p=0.0006736, Robust = 17.61 p=0.1279
I think those values represented in the summary as p=...
for each model are the p-values for the full model, but I cannot figure out how to retrieve them. If there is only one variate, let's say age, then I can retrieve the p-value using
summary(coxphobject)$coefficients[5]
, which is the same as the one I see for the Wald test in the summary(coxphobject)
. But when there are two variables (age and sex), summary(coxphobject)$coefficients[1,5]
and summary(coxphobject)$coefficients[2,5]
give the p-values for age and sex separately, but they both are different from the p-values I see for the full model in the summary(coxphobject)
for LR, Wald and score tests.
I appreciate any help. Thanks.