I have set up several Cox proportional hazards models in R, and am using
cox.zph from the
survival package to test the proportional hazards assumption. Mostly this works well.
However, in a couple of cases running
NA values for all covariates:
chisq df p variable_of_interest NA 3 NA GLOBAL NA 3 NA
How should I interpret this? What could explain it?
- Example model set-up:
coxph(Surv(age_entry, age_exit, event_status) ~ strata(sex) + variable_of_interest, my_data)(simplified from original but still recreates the problem)
- If I adjust for, rather than stratify by, sex I no longer get
- If I change the model to
coxph(Surv(time_on_study, event_status) ~ strata(sex) + variable_of_interest, my_data)I no longer get
- If I use only using particular subsets of the data, I sometimes no longer get
NAvalues (but it doesn't seem quite as simple as a single problem row).
- The models are in epidemiologic data with 50,000 - 90,000 rows and ~1,500 events.
- I'm not familiar with all the aspects of the full
cox.zphobject, but with the models which output
yseems to be entirely
NaN, but everything else looks ok.