Data and code for: Huh et al. (2021). A structural equation modeling approach to meta-analytic mediation analysis using individual participant data
This data repository contains the companion R code and data set for: Huh, D., Li, X., Zhou, Z., Walters, S. T., Baldwin, S. A., Tan, Z., Larimer, M. E., & Mun, E.-Y. (2021). A structural equation modeling approach to meta-analytic mediation analysis using individual participant data: Testing protective behavioral strategies as a mediator of brief motivational intervention effects on alcohol-related problems. Prevention Science. https://doi.org/10.1007/s11121-021-01318-4
Steps to reproduce
1. Download the following files: "1_INTEGRATE_MetaAnalyticMediation_AnnotatedCode.R", "2_INTEGRATE_MetaAnalyticMediation_Supplement.R" (required R code files), and "INTEGRATE_MetaAnalyticMediation_Data.Rdata" (required R data file). 2. Modify the location of the data file "INTEGRATE_MetaAnalyticMediation_Data.Rdata" referenced in the R code to the location on your system. 3. Run "1_INTEGRATE_MetaAnalyticMediation_AnnotatedCode.R" in R to replicate the analysis approach detailed in Huh et al. (2021). It may be necessary to install the following R packages: boot, Amelia, mitools, miceadds, lavaan, lavaan.survey, snow, doParallel, and foreach. 4. Run "2_INTEGRATE_MetaAnalyticMediation_Supplement.R" in R to replicate the leave-one-out sensitivity analysis detailed in Huh et al. (2021). This step requires the results generated from "Step 3" (the output of the main annotated code). However, readers can also choose to skip "Step 3" and run the supplement code with the file a) "INTEGRATE_MetaAnalyticMediation_Results.RData" from the optional RData files. Additionally, there are two OPTIONAL RData files that contain saved output from (a) the main annotated code, and (b) the supplemental sensitivity analysis code, respectively. a) INTEGRATE_MetaAnalyticMediation_Results.RData b) INTEGRATE_MetaAnalyticMediation_Sensitivity.RData These RData files are OPTIONAL since they can be produced by running the corresponding R code files; we provide these output files in the repository as a convenience to our readers.