0
$\begingroup$

I am currently doing a study on bankruptcies in Europe. I am using the Cox proportional hazards model (time-constant version) in R (coxph).

I have analyzed covariates such as GDP growth, return on assets, etc., in order to determine which covariates are statistically significant (p < 0.05).

Now I want to combine covariates in order to "create". Just like with multiple regression, I can compute the R-squared in order to assess the goodness-of-fit. (Please note that I will only combine covariates where the covariates are statistically significant (p < 0.05).)

My question is: How do I compare combinations of covariates in order to determine the goodness-of-fit?

$\endgroup$
2
  • 1
    $\begingroup$ Can you clarify what "create" refers to and whether you are calculating the R^2 from the Cox model directly or perhaps from its predictions vs. observed data? $\endgroup$ – Todd D Jun 7 '17 at 15:47
  • 1
    $\begingroup$ Perhaps superfluous, but keep in mind that the pseudo-$R^2$ values you obtain do not admit the nice interpretation they have for the linear model. $\endgroup$ – N. Wouda Jun 7 '17 at 15:57
1
$\begingroup$

If I understand you correctly, you have a Cox proportional hazards model, and you want to test a group of variables simultaneously.

A Cox model will have a likelihood associated with it, so you can compute the deviance and conduct an analysis of deviance test of nested models. That is, you can fit a model without the variables you want to test and see if the deviance is reduced by an amount greater than might be expected due to chance. Here is a simple example, coded in R:

data(ovarian)
fit  = coxph(Surv(futime, fustat)~resid.ds+rx+ecog.ps, data=ovarian) 
fit2 = coxph(Surv(futime, fustat)~resid.ds,            data=ovarian)  # - rx & ecog.ps
# summary(fit)
# summary(fit2)
logLik(fit)   # 'log Lik.' -31.96961 (df=3)  # deviance is -2 x log likelihood
logLik(fit2)  # 'log Lik.' -33.10526 (df=1)
1-pchisq( (-2*logLik(fit2))-(-2*logLik(fit)), df=(3-1) )  # 0.321214
anova(fit2, fit, test="Chisq")
# Analysis of Deviance Table
#  Cox model: response is  Surv(futime, fustat)
#  Model 1: ~ resid.ds
#  Model 2: ~ resid.ds + rx + ecog.ps
#    loglik  Chisq Df P(>|Chi|)
# 1 -33.105                    
# 2 -31.970 2.2713  2    0.3212
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.