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
Instead, I chose to categorize my continuous variable, ejection_fraction.- that's usually not a good idea – Firebug Dec 19 '22 at 17:36