A Bayesian machine learning approach for causal inference with time-varying confounding and survival outcomes
Conference
66th ISI World Statistics Congress
Format: WSC 2027: IPS Abstract
Keywords: bayesian, causal inference, machine learning, survival analysis, time-dependent confounding
Abstract
We propose a flexible Bayesian framework for survival analysis with longitudinal, time-varying covariates that combines a log-linear Bayesian additive regression trees component, a natural cubic spline representation of the log-baseline hazard, and subject-specific random effects, namely TvSurvBART. The model preserves the interpretability of a Cox-type hazard structure while leveraging BART's nonparametric flexibility to capture nonlinear effects and high-order interactions among time-varying covariates. We develop a Gibbs sampler combining blocked Metropolis–Hastings updates for the trees with random-walk Metropolis steps for the spline coefficients and random effects, run under a raw parameterization to preserve conjugate tree updates, with interpretable baseline, BART, and frailty components recovered afterward by deterministic posterior re-centering. Building on this survival model, we embed TvSurvBART within a Bayesian marginal structural model to estimate time-varying treatment effects, using TvSurvBART to flexibly estimate the time-varying treatment-assignment hazards that yield stabilized inverse-probability weights, with uncertainty propagated through a Bayesian bootstrap. Extensive simulations under proportional and non-proportional hazards, and a causal setting with hinge-type confounder effects, show that the method accurately recovers the baseline hazard, the hazard-ratio surface, and counterfactual restricted mean survival times, outperforming standard alternatives including Cox proportional hazards, kernel-based time- varying Cox, and random survival forests. We apply the method to CARRA Registry data to compare adalimumab withdrawal strategies in juvenile idiopathic arthritis, illustrating how the TvSurvBART can estimate regime-specific flare-free survival under time-varying confounding.