0

I tried applying splines to my model and that increased the p-values for all other variables in my model.

Instead, I chose to categorize my continuous variable, ejection_fraction.

HF$ejection_fraction = cut(HF$ejection_fraction, breaks = c(0, 40, 50, Inf), labels = c("Critical", "Borderline", "Normal"))

finalMod <- coxph(Surv(time, DEATH_EVENT)~age+anaemia+creatinine_phosphokinase+strata(ejection_fraction)+serum_creatinine+serum_sodium+hypertension,data = HF)

cox.zph(finalMod) chisq df p age 0.1770 1 0.67 anaemia 0.0785 1 0.78 creatinine_phosphokinase 0.7380 1 0.39 serum_creatinine 1.4106 1 0.23 serum_sodium 0.0503 1 0.82 hypertension 0.1430 1 0.71 GLOBAL 3.0850 6 0.80

My question: ejection_fraction did not satisfy proportional hazards before I categorized and stratified it. Now that it's a categorical variable, do I have to worry about checking the linear assumption for it in cox regression?

Different Method:

This is my spline model which does satisfy proportional hazards. I created this due to being advised against categorizing my variable.

I arrived at the variables (without splines) by "backward" stepwise reduction. Can I still use this spline model despite having some p-values inflated over alpha=0.05 (hypertension & anaemia)?

age                                   8.60e-08 ***
anaemia1                              0.069564 .  
creatinine_phosphokinase              0.023973 *  
ns(ejection_fraction, knots = c(15))1 9.27e-10 ***
ns(ejection_fraction, knots = c(15))2 0.228695    
serum_creatinine                      0.000307 ***
hypertensionPresent                   0.101466    
Antonio
  • 543
  • 1
  • 9
  • 2
    Instead, I chose to categorize my continuous variable, ejection_fraction. - that's usually not a good idea – Firebug Dec 19 '22 at 17:36
  • 1
    See https://stats.stackexchange.com/questions/68834/what-is-the-benefit-of-breaking-up-a-continuous-predictor-variable – kjetil b halvorsen Dec 19 '22 at 17:44
  • 1
    That the spline fit "increased the p-values for all other variables in my model" is not a good reason to pull back from the spline fit. The new p-values might be more realistic. Also, the extra coefficients needed to model a spline could tend to increase the p-values for the other predictors just because you now have more coefficients per event. There is no issue of "linearity" with a categorical predictor; each level has a single association with outcome. Stratifying by a categorical predictor doesn't return a coefficient for it, removing even the need to check for proportional hazards. – EdM Dec 19 '22 at 18:20
  • 2
    Minimizing p values by randomly changing predictors is against any rule in good clinical practice. – Michael M Dec 19 '22 at 18:55
  • @EdM I've added the summary output for the spline model. – Antonio Dec 19 '22 at 23:22
  • I think that your fundamental question about the model is now answered in another question. For future reference, there is no issue of "linearity" with an unordered categorical predictor. In regression in general, each level of the predictor has its own separate association with outcome, assumed constant (absent interactions with other predictors). In a Cox model you do have to check the PH assumption for such a predictor to see if that assumption is adequately met. There could be a linearity issue with an ordinal categorical predictor if you try to model it as a continuous predictor. – EdM Dec 20 '22 at 15:25

0 Answers0