Bayesian (non)linear random effects mediation models: Evaluating the impact of omitting confounders.
Ziwei Zhang, Nidhi Kohli, Eric F. Lock · Psychological Methods · 2024
Often in educational and psychological studies, researchers are interested in understanding the mediation mechanism of longitudinal (repeated measures) variables. Almost all longitudinal mediation models in the literature stem from structural equation modeling framework and hence, cannot directly estimate intrinsically nonlinear functions (e.g., exponential, linear-linear piecewise function with an unknown changepoint) without using reparameterizations. The current study aims to develop a framework of Bayesian (non)linear random effects mediation models, B(N)REMM, to directly model intrinsically linear and nonlinear functions. Specifically, we developed two distinct longitudinal mediation models where all variables under consideration were longitudinal and followed either a linear trend (L-BREMM) or a segmented trend captured by linear-linear piecewise functions with unknown random changepoints (P-BREMM). Additionally, no research has assessed the impact of omitting confounder(s) when modeling mediation effects for intrinsically nonlinear functions. We used an empirical data example from the Early Childhood Longitudinal Study-Kindergarten Cohort to contrast the fit of two models where one included the confounder and the other omitted it. The empirical example illustrated the need to study the impacts of model misspecification with respect to omitting confounder(s). We further explored this issue and its effect on model estimation for both L-BREMM and P-BREMM via Monte Carlo simulation studies under a variety of data conditions. The simulation study results showed that omitting confounder(s) negatively impact parameter recovery for both L-BREMM and P-BREMM but only had an impact on model convergence of P-BREMM. We provide R scripts to estimate both L-BREMM and P-BREMM to aid the dissemination of these models. (PsycInfo Database Record (c) 2025 APA, all rights reserved).