5
$\begingroup$

I am performing survival analysis on credit data. I created a simple model with using interest rate:
cox <- coxph(Surv(periods,charged_off) ~ int_rate, data=notes) I assumed that int_rate was a time-independent variable, but the following test rejects HA:

> cox.zph(cox)
            rho chisq        p
int_rate 0.0446  14.2 0.000169

Same result for other variables such as loan amount:

> cox <- coxph(Surv(periods,charged_off) ~ int_rate + loan_amnt, data=notes)
> cox.zph(cox)
             rho chisq        p
int_rate  0.0364  9.31 2.28e-03
loan_amnt 0.0317  8.84 2.95e-03
GLOBAL        NA 26.28 1.97e-06

Plot for int_rate:

enter image description here

Why would these covariates be considered time dependent? Am I doing something wrong? Thanks.

$\endgroup$
7
  • 2
    $\begingroup$ Although this question does not seem to call for a R solution, it remains good practice to flag that you are using R. $\endgroup$
    – Nick Cox
    Jan 20 '14 at 15:46
  • $\begingroup$ Thanks for your attention, but I was suggesting flagging, not tagging. Look again at the R tag to see that the tag is needed only if the solution is to be R-based. Your question seems statistical. $\endgroup$
    – Nick Cox
    Jan 20 '14 at 15:59
  • $\begingroup$ How large is your dataset? I notice the coefficient between transformed survival time and the scaled residuals, rho, is small. $\endgroup$ Jan 20 '14 at 16:14
  • 1
    $\begingroup$ I have over 240,000 observations. $\endgroup$ Jan 20 '14 at 16:26
  • 1
    $\begingroup$ Graphically, you can see that there is a time-dependence (if there was none, your graph would be constant). That said, note that you should not overestimate the relevance of the $p$-value you get from cox.zph. This test is very sensitive, and will reject independence very quickly, even if that has little practical impact. Yes, your coefficients are significantly time-dependent, but so what? The $p$-value doesn't answer the real question, being how big a mistake you are making by treating the coefficient as time-independent (i.e., the effect size), or whether or not it matters at all. $\endgroup$ Oct 15 '15 at 14:05
1
$\begingroup$

The distinction one has to make is between time-varying covariate and a covariate whose coefficient changes over time. Both violate the proportionality assumption, but do not have to be drawbacks. Rather, they can and are often theoretically meaningful (see Singer & Willett's book on Longitudinal Data Analysis and their 1991 paper in Psychological Bulletin). They just have to be included in the model.

In your plot, it looks like the coefficient for that time-invariant predictor changes over time (becomes less strong) and therefore violates the proportionality assumption. Including an interaction with that covariate and time would solve things and get around the proportionality assumption. Again, Singer and Willett's book is a classic--and highly accessible. The companion website also has code and examples for software implementation.

$\endgroup$
1
$\begingroup$

The cox.zph function is measuring the overall effects of relaxing the assumption that the effect is constant in time. It telling you that the effect is probably not constant, but it's not telling you much more.

The plot is giving you further information about the time course and shows that the effect is maximal at intermediate values of time. I'm guessing that the outcome is loan default and that you are seeing a result that implies the probability of loan default is highest when the interest rate was high at loan origination and during intervals when the loan has been on the books for between 1 and 3 years. The impact of the interest rate then tapers off. This all seems perfectly sensible.

For further information on how the authors of the survival package use cox.zph, I recommend Chapter 6:"Testing Proportional Hazards" in their book, "Modeling Survival Data". Your result resembles their illustration of the time dependence of the Karnofsky performance measure. They consider various options for using a transformed time scale.

I wonder if you might have additional information such as the time-dependent covariate which would be the interest rates in periods after the loan origination?

$\endgroup$

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.