# Applicability of survival analysis (using Cox proportional hazards) to question of interest

I have started down the path of using cox PH models to try to understand which variables are driving time-to-migration (event) in my study system. My system has two groups (A,B) of animals that migrate at different times (surv.diff). So, now I want to find out why one group moves earlier than the other. I have asked a couple people whether a CoxPH model will get me to where I need to go, and have had mixed responses.

My data- I have daily data of all covariates and the response. Since we are only interested in the reasons behind the difference in timing, all individuals experience an event. However, sample size differs greatly between the two groups (73 migrate early, 8 migrate late).

A little about the variables- when putting together a global model of my predictors (mostly time-covarying, so I'm using counting process-style format), I find that the PH assumption is broken for a few variables. For example, temperature has little effect in early fall, but as things progress into late fall, the effect increases. I've been told that in this circumstance, it is common practice to add an interaction with time for those variables, although Therneau's vignette (https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf) and this post (Textbook approach to modeling non-proportional hazards in the Cox model) advocates for something slightly different. However, I'm still not sure of the correctness of the overall direction I'm taking, so perhaps somebody can help me understand if I am indeed heading in the right direction or not. Thank you!

• The approach on page 19 of the vignette is the same as the approach used in that post (except the latter uses log time). – Slow loris Jun 8 '16 at 16:52
• Yes, that is correct. What I meant was those two are different than just a plain old interaction added to the model. – ecology_one Jun 9 '16 at 14:22
• I suppose it isn't a "plain old interaction" because the interaction is with time, not with another predictor in the model, which is why you can't specify it the same way you would specify an interaction between two predictors (e.g., just using A*B in your model formula). But it is the correct way to specify an interaction between a predictor and time in the coxph function. Therneau says, "A true time-dependent covariate can be constructed using the time-transform functionality of coxph", and then he demonstrates the syntax for specifying the time-dependent covariate. – Slow loris Jun 9 '16 at 17:03