  Mediation analysis plays a crucial role in causal inference as it can
investigate the pathways through which treatment influences outcome. Most
existing mediation analysis assumes that mediation effects are static and
homogeneous within populations. However, mediation effects usually change over
time and exhibit significant heterogeneity in many real-world applications.
Additionally, the presence of unobserved confounding variables imposes a
significant challenge to inferring both causal effect and mediation effect. To
address these issues, we propose an individualized dynamic mediation analysis
method. Our approach can identify the significant mediators of the population
level while capturing the time-varying and heterogeneous mediation effects via
latent factor modeling on coefficients of structural equation models. Another
advantage of our method is that we can infer individualized mediation effects
in the presence of unmeasured time-varying confounders. We provide estimation
consistency for our proposed causal estimand and selection consistency for
significant mediators. Extensive simulation studies and an application to a DNA
methylation study demonstrate the effectiveness and advantages of our method.
