Dynamic prediction of causal effects under different treatment regimes conditional on individual's characteristics and longitudinal history is an essential problem in precision medicine. This is a challenging problem in practice because outcomes and treatment assignment mechanisms are unknown in observational studies, an individual's treatment efficacy is a counterfactual, and selection bias may exist and is empirically untestable.
We propose a Bayesian framework for identifying the individualized counterfactual benefits of treatment regimes using Bayesian G-computation with multivariate generalized mixed effect models. Unmeasured time-invariant confounders are included as person-specific random effects in the joint distribution of outcomes and treatment assignments. We propose a sequential ignorability assumption conditional on the treatment random effect. This is analogous to balancing individual's history distribution and latent tendency towards each treatment due to unobserved factors. Our framework naturally incorporates sensitivity analysis, providing an alternative to defining an additional sensitivity parameter for quantifying the impact of unmeasured confounding.