ABSTRACT

In this chapter, we introduce the use of generalized additive multilevel models for third-variable effect analysis with hierarchical databases. First, we extend the general definitions of third-variable effects to the multilevel data settings. We also briefly review the generalized additive multilevel models (GAMM) that are used to model relationships among variables of different levels. Based on that, we present the multilevel third-variable analysis with GAMM: deduct estimations of mediation and confounding effects from the estimated coefficients and variances from the fitted GAMM, and use the bootstrap method on the multilevel dataset to estimate the variances of estimated third-variable effects. Then we illustrate the use of the proposed method in different multilevel data structures and introduce how to perform the multilevel mediation analysis using the mlma R package. Lastly, we adopt the method in a real data example to explore the racial disparity in obesity considering both individual and environmental risk factors.