  To draw real-world evidence about the comparative effectiveness of multiple
time-varying treatments on patient survival, we develop a joint marginal
structural survival model and a novel weighting strategy to account for
time-varying confounding and censoring. Our methods formulate complex
longitudinal treatments with multiple start/stop switches as the recurrent
events with discontinuous intervals of treatment eligibility. We derive the
weights in continuous time to handle a complex longitudinal dataset without the
need to discretize or artificially align the measurement times. We further use
machine learning models designed for censored survival data with time-varying
covariates and the kernel function estimator of the baseline intensity to
efficiently estimate the continuous-time weights. Our simulations demonstrate
that the proposed methods provide better bias reduction and nominal coverage
probability when analyzing observational longitudinal survival data with
irregularly spaced time intervals, compared to conventional methods that
require aligned measurement time points. We apply the proposed methods to a
large-scale COVID-19 dataset to estimate the causal effects of several COVID-19
treatments on the composite of in-hospital mortality and ICU admission.
