Keywords: mediation, complex sampling designs, R
Mediation analysis is to investigate the role of a third variable (also called mediator) as a transmitter in the relationship between an independent variable and a dependent variable. Although mediation analysis and corresponding established computer tools have been widely applied in research practice, applications to survey data with complex sampling designs have not been addressed. As complex sampling designs are common in finite-population-based studies such as Public Health surveys, this study aims to provide a practical solution to linear mediation analysis with complex survey data. This study first develops an R package implementing a newly proposed method adjusting for complex sampling designs in linear mediation analysis and then provides an example illustrating the usage of the R package.