Calculating level-specific SEM fit indices for multilevel mediation analyses - Comulada, W Scott (The Stata journal, 2021)
Stata's gsem command provides the ability to fit multilevel structural equation models (sem) and related multilevel models. A motivating example is provided by multilevel mediation analyses (ma) conducted on patient data from Methadone Maintenance Treatment clinics in China. Multilevel ma conducted through the gsem command examined the mediating effects of patients' treatment progression and rapport with counselors on their treatment satisfaction. Multilevel models accounted for the clustering of patient observations within clinics. sem fit indices, such as the comparative fit index and the root mean squared error of approximation, are commonly used in the sem model selection process. Multilevel models present challenges in constructing fit indices because there are multiple levels of hierarchy to account for in establishing goodness of fit. Level-specific fit indices have been proposed in the literature but have not been incorporated into the gsem command. I created the gsemgof command to fill this role. Model results from the gsem command are used to calculate the level-specific comparative fit index and root mean squared error of approximation fit indices. I illustrate the gsemgof command through multilevel ma applied to two-level Methadone Maintenance Treatment data.