0

I'm returning to a topic that was addressed by this question a number of months ago.

I have a coxph model that includes a factor covariate (a categorical variable) with three levels.

When I test the model for violations of the proportional hazards assumption using cox.zph, it shows that one of the levels of the factor is in violation of the assumption.

Normally, I would interact the offending covariate with a function of time, but in this case - as I'm dealing with a factor - I'm not sure that this makes sense.

In any case, attempting to interact the factor with a function of time returns an error.

Can you advise on what to do? Is there a way to 'target' the offending factor level with an interaction with time? Thanks.

Community
  • 1
  • 1

1 Answers1

0

Hmmmm, interesting - time (or functions thereof) interactions with a factor should be okay IMHO, e.g. see the R-centric bits of http://www.ats.ucla.edu/stat/examples/asa/test_proportionality.htm

...but I assume you are creating a new 'real age' variable to interact with, i.e. by adding DX age to time. I am not sure what would happen with the 'time' variable appearing in both the survival object and the right side of the formula.

You could post some of your code (and the error message) to assist you better.....

Big Old Dave
  • 343
  • 2
  • 11