Sorry for any confusion (I accidentally marked this as solved and it wont undo), just to clarify and expand. I fit an Anderson Gill model to this counting process data containing a repeating event and a bunch of time-fixed covariates (for example, age at diagnosis). I assume that since Anderson-Gill is an extension of Cox PH, the fixed variables still need to align with the Cox PH assumptions. After I ran ZPH on my model and looked at a few curves, I noticed that some of these variables (for example, age at diagnosis) violated the PH assumptions and changed over time. This could also be due to my long follow up time. To my understanding, one way to handle such a violation is to model the variable effect as being time-dependent using an interaction term with time. However, most of the examples I have read do not perform such an interaction on models using counting process data (that is clustered by ID). I tried the following methods: 1 - (from my original) Proc phreg data=mydata covs(aggregate) multipass; Model (time_start time_stop) * event(0) = x1 x1*time x2 x3/rl alpha=0.05; Id ID; Time=time_stop; Hazardratio x /at (time= 0 1 2 3 4 5 6 7 8 9 10) Run; 2 - The method from your comment: Proc phreg data=mydata covs(aggregate) multipass; Model (time_start time_stop) * event(0) = x1 x1*time_stop x2 x3/rl alpha=0.05; Id ID; Hazardratio x /at (time= 0 1 2 3 4 5 6 7 8 9 10) Run; I get very different results for Hazards ratios at the different time points from each. I am just unsure which method is correct, and/o ifr the cox model is handling the interaction correctly. I am also unsure if my logic is making sense here as there is really limited information on if you even test an Anderson Gill model for Cox PH assumptions, as there is already a time-dependent variable in the model (the repeating event). I know another way to handle a violation is using piecewise regression splitting the variable up over the follow up at meaningful timepoints using an example like: Proc phreg data=mydata covs(aggregate) multipass; Model (time_start time_stop) * event(0) = x1time1 x1time2 x2 x3/rl alpha=0.05; Id ID; x1time1 = x1*(0<time_stop<=1); x1time2 = x2*(time_stop>1); Run; But I am also unsure if this code is accurately splitting the model up over this parameter and clustering by ID in the counting process data. Does that make sense? I just want to make sure I am capturing the time-dependent interaction correctly, and have no idea why the results are differing. Thanks again for all your help and consideration. Best
... View more