Mediation, Moderation and Moderated-Mediation After Model Fitting
Overview
Computes indirect effects, conditional effects, and conditional indirect effects in a structural equation model or path model after model fitting, with no need to define any user parameters or label any paths in the model syntax, using the approach presented in Cheung and Cheung (2024) doi:10.3758/s13428-023-02224-z. Can also form bootstrap confidence intervals by doing bootstrapping only once and reusing the bootstrap estimates in all subsequent computations. Supports bootstrap confidence intervals for standardized (partially or completely) indirect effects, conditional effects, and conditional indirect effects as described in Cheung (2009) doi:10.3758/BRM.41.2.425 and Cheung, Cheung, Lau, Hui, and Vong (2022) doi:10.1037/hea0001188. Model fitting can be done by structural equation modeling using lavaan() or regression using lm().
New Features
- Update the
q_*functions (q_mediation(),q_simple_mediation(),q_serial_mediation()andq_parallel_mediation()) to support models with moderators (moderated mediation). The paths moderated are specified by the argumentmoderators. Models fitted by multiple regression or structural equation modelling on observed variables only are supported. If a model has latent variables and is fitted by structural equation modeling, then theindicator_methodmust be set to"sam"to use the structural-after-measurement method. (0.3.6.3)
Show all changes in 0.3.7Hide the rest of the changes in 0.3.7
- Updated
index_of_mome()andindex_of_momome()to use standard deviation as the unit of the moderator to compute the index, as proposed by Cheung and Cheung (2024), enabled by the argumentsw_unitandz_unit. Also added two wrappers,z_index_mome()andz_index_of_momome(), withw_unitandz_unitset to"sd"automatically. (0.3.6.13)
Improvement
- Users can specify the change of moderator values when calling
index_of_mome()andindex_of_momome()via the new argumentsincrease_from,increase_to,w_increase_from,w_increase_to,z_increase_from, andz_increase_to. (0.3.6.5) - Added the argument
cond_indirect_effects_argsto theq_*functions for customizing the computation of conditional indirect effects or conditional effects. (0.3.6.14) - Most
confintmethods now can make use of the value set tolevel. If not set, the default isNULLand the stored value oflevel(e.g., when callingindirect_effect()) will be used. (0.3.6.15) - Added the argument
wlevels_not_foundtocond_indirect_effects(). If a variable inwlevelsis not found among the component of the product term(s), a warning will be issued by default. These variables can be ignored silently by settingwlevels_not_foundto"ignore". If desired, an error can be raised by settingwlevels_not_foundto"error". (0.3.6.17) - The
printmethod ofcond_indirect_effectsobjects (print.cond_indirect_effects()) will now print the computation formula. (0.3.6.18)
Miscellaneous
- Updated some tests for the forthcoming
lavaan0.7-1. (0.3.6.1) - Fixed handling a special case:
x:w:w == x. (0.3.6.2) - Updated to handle possible
NAfromparallel::detectCores(). (0.3.6.4) - Added
pkgdownwebsite articles on regression models with moderators (no mediators). (0.3.6.7) - Suppressed a
lavaan0.7-2 warning that does not affect the computation. (0.3.6.8) - Fixed a typo in a help page of
data_mod_cat_num_2w. (0.3.6.8) - Fixed some tests to work with
auto.cov.x = TRUEinlavaan(default toFALSEinlavaan0.7-2). (0.3.6.9) - Amended some tests to allow for optimization noise. (0.3.6.10)
- Stored indices of sampled cases (
idsordesign, if available). (0.3.6.11) - Updated
many_indirect_effects()to do bootstrapping or Monte Carlo simulation only once whenci_typeis set. (0.3.6.12)
Bug Fixes
- Fixed a bug in finding a product term automatically in some special cases. (0.3.6.16)
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- ERROR12 OK, 1 ERROR2026-10-01
- OK13 OK2026-09-01
- ERROR12 OK, 1 ERROR2026-08-25
- OK13 OK2026-08-20
Show 18 earlier changesHide 18 earlier changes
- ERROR12 OK, 1 ERROR2026-08-12
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- ERROR12 OK, 1 ERROR2026-07-29
- OK13 OK2026-07-21
- ERROR12 OK, 1 ERROR2026-07-16
- OK13 OK2026-07-15
- ERROR12 OK, 1 ERROR2026-07-10
- OK13 OK2026-07-03
- ERROR12 OK, 1 ERROR2026-07-01
- OK13 OK2026-06-22
- ERROR12 OK, 1 ERROR2026-06-19
- OK13 OK2026-06-08
- ERROR11 OK, 2 ERROR2026-06-02
- OK12 OK2026-04-25
- NOTE13 OK, 1 NOTE2026-04-19
- ERROR13 OK, 1 ERROR2026-04-16
- NOTE13 OK, 1 NOTE2026-03-10
Documentation
- Help pages
- 92 (1 internal)includes a package overview page
- Examples that run
- 100%82 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 94%
- Return-value docs
- 100%
- Help pages citing references
- 14%
Downloads
Repository
- PRs merged (all time)
- 99%
- Median days to close, 50 most recently updated closed issues
- 278
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/sfcheung/manymome on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-11 · The repository has a site deploy workflow
pkgdown site last built 2026-10-11
Dependencies
Installing manymome adds 30 packages (12 with compiled code, 25 MB of source tarballs). Heaviest: ggplot2 6.0 MB, igraph 4.8 MB, GPArotation 1.6 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.3.7Latest2026-09-03 · current release · diff ↗ ·
added 6 exports
q_moderated_mediation, q_moderated_parallel_mediation, q_moderated_serial_mediation, q_moderated_simple_mediation, z_index_of_mome, z_index_of_momome - 0.3.62026-06-08 · diff ↗
- 0.3.5
- RR 4.6.0 released · 2026-04-24
- 0.3.42026-03-26 · diff ↗
- 0.3.32026-01-08 · diff ↗
- 0.3.22025-12-14 · diff ↗
- 0.3.1
- 0.2.92025-06-21 · diff ↗
- 0.2.82025-05-03 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.2.72025-01-25 · diff ↗ ·
added 4 exports
q_mediation, q_parallel_mediation, q_serial_mediation, q_simple_mediation - 0.2.52024-12-08 · diff ↗
- 0.2.4
- 0.2.3
- 0.2.22024-06-06 · diff ↗
Show 12 earlier eventsHide 12 earlier events
- 0.2.1
- RR 4.4.0 released · 2024-04-24
- 0.1.142024-02-16 · diff ↗
- 0.1.13
- 0.1.122023-08-21 · diff ↗
- 0.1.10
- RR 4.3.0 released · 2023-04-21
- 0.1.92023-01-06 · diff ↗
- 0.1.62022-11-06 · diff ↗ ·
added 6 exports
all_indirect_paths, all_paths_to_df, indirect_effects_from_list, lm2boot_out_parallel, many_indirect_effects, total_indirect_effect - 0.1.4.32022-09-09 · diff ↗
- 0.1.4.02022-09-06
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-09-06
- Total releases
- 23 / 4 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 431 KB / 34 files
- Download size
- 3.1 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("manymome")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.3758/s13428-023-02224-z.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.