# How robust is coxph when the proportional hazards assumption is violated?

How robust is the coxph when I don’t have proportional hazards? How common is non prop hazards and how do I fix it? Does transforming variables help? Does non parametric survival analysis handle non proportional hazards?

How common is non prop hazards...

It's a given in any sample large enough, mainly because the diagnostics involve NHST and real live data don't follow probability models. Like detecting mean differences, we rarely care about just a p-value, but need to know the magnitude of effect.

...and how do I fix it?

4 popular approaches: fit the Cox model anyway with a robust standard error estimates, estimate restricted mean survival instead, or use a g-rho-gamma family, fit an accelerated failure time model.

Does transforming variables help?

Not for any monotonic, increasing transformation because the risk sets and corresponding failure times maintain their intrinsic ordering. Non-monotonic transformations don't make sense.

Does non parametric survival analysis handle non proportional hazards?

If you mean the log-rank test, that test is intrinsically related to the Cox model: the log rank p-value is the score test for the partial likelihood, so it's not a remedy for the problem.