(Version 0.1.12.4, updated on 2023-09-23, release history)
Functions for estimating indirect effects, conditional indirect effects, and conditional effects in a model with moderation, mediation, and/or moderated mediation fitted by structural equation modelling (SEM) or estimated by multiple regression.
Compute an unstandardized or standardized indirect effect or conditional indirect effect in a path model.
Form the confidence interval for this effect. Nonparametric bootstrapping is fully supported, while Monte Carlo is supported for models fitted by
A Simpler Workflow
No need to define any parameters or similar code when fitting a model in
lavaan::sem(). Just focus on fitting the model first. After a model has been selected, users can compute the effect for nearly any path, from nearly any variable, to nearly any other variables, conditional on nearly any moderators, and at any levels of the moderators. (See
Supports Both SEM-Based and Regression-Based Analysis
Supports structural equation models fitted by
lavaan::sem()or by path models fitted by regression using
lm(), although the focus of this package is on structural equation models. The interface of the main functions are nearly the same for both approaches.
Flexible in the Form of Models
Supports Standardized Effects
Can estimate standardized indirect effects and standardized conditional indirect effects without the need to standardize the variables. The bootstrap and Monte Carlo confidence intervals for standardized effects correctly take into account the sampling variation of the standardizers (the standard deviations of the predictor and the outcome variable) by recomputing them in each bootstrap sample or replication.
Supports Missing Data
Supports datasets with missing data through
lavaan::sem()with full information maximum likelihood (
Supports Numeric and Categorical Moderators
Supports numeric and categorical moderators. It has a function (
factor2var()) for the easy creation of dummy variables in
lavaan::sem(), and can also capitalize on the native support of categorical moderators in
Less Time for Bootstrapping
Bootstrapping, which can be time consuming, can be conducted just once. The main functions for computing indirect effects and conditional indirect effects can be called as many times as needed without redoing bootstrapping because they can reuse pregenerated bootstrap estimates (see
Supports Latent Variables Mediation
Despite the aforementioned advantages, the current version of
manymome has the following limitations:
Does not (officially) support categorical predictors.
Does not support multisample models (although
Does not support multilevel models (although
For bootstrapping, only supports nonparametric bootstrapping and percentile confidence interval. Does not support other bootstrapping methods such parametric bootstrapping.
Only supports OLS estimation when
We would add more to this list (suggestions are welcomed by adding GitHub issues) so that users (and we) know when other tools should be used instead of
manymome, or whether we can address these limitations in
manymome in the future.
A good starting point is the Get-Started article (
For more information on this package, please visit its GitHub page:
The stable version at CRAN can be installed by
The latest developmental-but-stable version at GitHub can be installed by
We developed the package
stdmod in 2021 for moderated regression. We included a function (
stdmod::stdmod_lavaan()) for standardized moderation effect in path models fitted by
lavaan::sem(). However, in practice, path models nearly always included indirect effects and so moderated mediation is common in path models. Moreover,
stdmod is intended for moderated regression, not for structural equation modeling. We thought perhaps we could develop a more general tool for models fitted by structural equation modelling based on the interface we used in
stdmod::stdmod_lavaan(). In our own projects, we also need to estimate indirect effects in models frequently. Large sample sizes with missing data are also common to us, for which bootstrapping is slow even with parallel processing. Therefore, we developed
manymome to address these needs.
If you have any suggestions and found any bugs or limitations, please feel feel to open a GitHub issue. Thanks.