# Survival analysis with external non-competing events

I'm new to survival analysis and struggling to find the best approach to my problem:

Assume that we want to model the time to the death event $$X$$ given some prior subject data.

I'm aware that survival analysis can be used for this, but what if there are other events $${Y_1, Y_2, Y_3, ...}$$ that might influence the distribution for $$X$$? These events are not competing with $$X$$, i.e. the process will continue even if one of them occurs, it solely increases or decreases the hazard.

Supposedly, the easiest way to solve this is by using a Bayesian framework.

If possible, implementation tips for Python would be particularly helpful.

• some background / context is needed. What are your data? Commented Apr 4, 2019 at 19:40
• Are you assuming an all-or-none influence of these other "events" on outcome (fixed change in hazard after one of these other events occurs) or something more complicated? Could any of these other events have occurred before the 0 time of your survival model? If so, would the effect on hazard be the same if it occurred before versus after your time 0 reference?
– EdM
Commented Apr 4, 2019 at 19:47

The idea of a stochastic, time-varying covariate is a distinct concept altogether. When some event (call it $$Z$$, not $$Y$$ here) affects the value of $$X$$ and causes time-dependent confounding, one must input both $$X$$ and $$Z$$ as time varying covariates. To do this, at any point when the value of $$Z$$ or $$X$$ changes at some time $$t$$, censor the subject at time $$t$$ with their old covariate values and re-enter them in the risk set at time $$t$$ with the new covariate values.