I realize that large changes in model results between using robust and non-robust standard errors can suggest a misspecified model.

My case refers to using a Cox regression and I have experimented with using both robust and non-robust SE. The difference in SE and p-values in my first run is small. However, to account for nonlinearity and proportional hazard violation, I use penalized splines (psplines()).

If I test this run both with and without standard errors, the results for my continuous variables with splines differ largely, and some pairwise differences become significant after the addition of splines that were not before in my categorical variables.

I am struggling to interpret what this means. On the one hand, some continuous variables have complex and nonlinear relationships with the outcome, so assuming linearity in all continuous variables (as in the first run) could make the model so bad that specifying robust=TRUE or not makes little difference to anything, whereas when I use splines to capture these relationships these differences become more apparent.

On the other hand, the changes only occur in continuous variables with splines; those with linear relationships not. I wonder whether these findings are just an artifact of using splines and not true results that suggest a misspecified model.

Does anyone have any experience with this? How might I test this?


1 Answer 1


You are dealing with regresssion effects, not with relaxing the proportional hazards assumption by using splines, unless you add time-dependent spline terms to the model. Huber-White robust sandwich covariance estimators are not guaranteed to be more accurate than ordinary Wald covariance estimators. In binary logistic regression William Gould has shown that the variance of robust standard errors can be many times larger than the variance of Wald standard errors. So it's not clearly the case that using a robust method improves things in your situation. It is true that you might get slightly better covariance estimates with sandwich estimates if proportional hazards is violated, but then you're doing what David Freedman wrote about: getting the right standard errors on the wrong quantities.

When looking at prop. hazards for splines don't look at individual coefficients. Use capabilities of the R survival package to get multiple degree of freedom measures of non-PH using cox.zph. And use a smoother to get a plot of the effect of the overall spline term collapsed to one degree of freedom, against time.

  • 1
    $\begingroup$ Thanks for the help as always Professor Harrell. I am under the impression that incorrectly specified functional form can cause PH violation (see [Keele 2010] (jstor.org/stable/25792004), hence 3rd sentence in the 2nd paragraph. Agreed on your second paragraph; don't worry I've used the smooth plots for PH assessment. I am still unsure about the implications of my findings though. Put very simply, my question is: why do I see very large changes in p-values, standard errors, and sometimes coefficients in the cox.zph output with my splined variables before and after using robust SE $\endgroup$
    – JED HK
    Sep 22, 2022 at 12:59
  • $\begingroup$ The more usual case is inducing non-PH from omitting a predictor entirely. Question: does your outcome variable have any possible circularity with the predictor in question? Is the predictor in question a true time zero measurement? $\endgroup$ Sep 23, 2022 at 12:09
  • $\begingroup$ There is no circulatory I'm sure. I am dealing with biological measurements taken at a baseline measurement and death and survival time at the status and time outcomes, respectively $\endgroup$
    – JED HK
    Sep 24, 2022 at 13:25
  • $\begingroup$ How many events? $\endgroup$ Sep 24, 2022 at 16:26
  • $\begingroup$ 1655 events, sample size 100k, final model 109 df $\endgroup$
    – JED HK
    Sep 25, 2022 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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