2026-06-06 –, Hardwick Hub
Dynamic Path Analysis (DPA) extends survival analysis with a causal, time-varying perspective. This allows causal effects to be decomposed into direct and indirect pathways that evolve over time. The perspective is particularly valuable when interventions (exercise) act through mediators (weight loss) whose influence changes dynamically in time, because we get to distil when each driver of our survival probabilities are active and whether their combined effects are harmful or positive.
Despite its conceptual appeal, DPA remains niche, with existing implementations limited to frequentist R packages and no Bayesian or Python-native alternatives. In this talk, I present a Bayesian, generative implementation of Dynamic Path Analysis using PyMC. By discretising time and modelling cumulative hazard effects with smooth spline priors, we obtain interpretable time-varying causal effects with coherent uncertainty quantification. I benchmark the approach against canonical dpasurv examples and discuss why DPA focuses on hazards rather than survival curves.
This talk is aimed at Python users interested in survival analysis, causal inference, and Bayesian modelling.
Survival analysis is often used to answer when an event occurs, but in many real-world settings we also care about how and through which mechanisms interventions exert their effects over time. Dynamic Path Analysis (DPA), introduced by Aalen and colleagues, addresses this by decomposing time-varying effects on the hazard into direct and mediated causal pathways, allowing these relationships to evolve dynamically.
In this talk, I present a Bayesian, generative reinterpretation of Dynamic Path Analysis implemented in PyMC. The model discretises time into intervals and represents cumulative hazard effects using smooth spline-based priors, enabling stable estimation of time-varying direct and indirect effects with full posterior uncertainty. I show how this approach recovers the qualitative behaviour of canonical dpasurv examples while extending them to a fully probabilistic framework.
The emphasis is on the causal decomposition of hazards, clarifying why DPA is well suited to reasoning about evolving mediation structures and intervention planning. The talk highlights how generative Bayesian models make these ideas more flexible, interpretable, and extensible within the Python ecosystem. We end with practical recipes for using g-computation to derive non-parametric estimates of direct, indirect and survival-curve-differences from the fitted DPA model.
Target audience: data scientists and researchers with some familiarity with survival analysis or Bayesian modelling.
Takeaway: attendees will understand when and why to use dynamic causal hazard models, and how to implement them in practice using PyMC.
I'm a Data-Scientist working in HR Tech and People Analytics with Personio. I'm a big advocate of open source software and regularly contribute to PyMC, PyMC-Marketing and CausalPy. I've worked across a variety of industries ranging from e-commerce, insurance and gambling and in each, i've tried to find ways to apply statistical best practice to business problems.
I'm always open to chat about scientific python, philosophy of science and Bayesian reasoning and decision analysis.