# Modelling time-varying effects in discrete-time event history/survival analysis with competing risks

I have a question with regards to estimating time-varying effects in event history analysis with competing risks.

To give more context: the main idea of my study is to gain more insight into the factors that influence graduation in higher education. More specifically, I'm looking to have more insight into how a time-variant predictor (e.g., credits enrolled) affects graduation (controlled for other covariates). However, I'm looking at dropout as well. As such, I'm working with a competing risks model (graduation or dropout). Important side-note, censoring in the data is due to the event happening after the last observation period (right-censoring). But until that time, all students are tracked. The only possible ways to leave the risk set is to either graduate or dropout.

The difficulty I'm encountering is to technically implement a competing risks model with time-varying (6 years) effects of predictors.

As part of a review process, it has been suggested that I run the same Event History Model for each year separately (so 6 models). I'm no stats wizard, but I can't help but feeling that this is somewhat 'off'. I mean, the population I'm comparing changes each year due to dropout and graduation (the outcomes I'm investigating). Also, such a method does not allow me to account for unobserved heterogeneity, right?

So basically, what I'm asking is how to technically implement a event history model with time-varying effects of predictors and two or more competing outcomes? And the possibility to account for unobserved heterogeneity within such a model.

All suggestions are welcome.

Thanks.

As described in the JSS paper for the flexsurv package, you may assume independence between the instantaneous hazards, in which case you can use virtually any standard software for survival analysis to fit each separate model. The paper itself provides some simple examples, but you can easily extend these.
If the independence assumption is justified, timereg package is an option as LeslieKish mentioned, or the frailypack package (and take note of the extension they have made in frailypack for panel data). You may also want to check out the survival analysis task view, particularly the section on competing risk.