Package: manymome 0.2.5

Shu Fai Cheung

manymome: Mediation, Moderation and Moderated-Mediation After Model Fitting

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 (2023) <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().

Authors:Shu Fai Cheung [aut, cre], Sing-Hang Cheung [aut]

manymome_0.2.5.tar.gz
manymome_0.2.5.tar.gz(r-4.5-noble)manymome_0.2.5.tar.gz(r-4.4-noble)
manymome_0.2.5.tgz(r-4.4-emscripten)manymome_0.2.5.tgz(r-4.3-emscripten)
manymome.pdf |manymome.html
manymome/json (API)
NEWS

# Install 'manymome' in R:
install.packages('manymome', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/sfcheung/manymome/issues

Pkgdown site:https://sfcheung.github.io

Datasets:

5.46 score 1 stars 4 packages 155 scripts 604 downloads 39 exports 37 dependencies

Last updated 18 days agofrom:b779f48e4f. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 09 2024
R-4.5-linuxOKDec 09 2024

Exports:all_indirect_pathsall_paths_to_dfcheck_pathcond_effectscond_indirectcond_indirect_diffcond_indirect_effectsdelta_meddo_bootdo_mcfactor2varfill_wlevelsfit2boot_outfit2boot_out_do_bootfit2mc_outgen_mc_estget_one_cond_effectget_one_cond_indirect_effectget_prodindex_of_momeindex_of_momomeindirect_effectindirect_effects_from_listindirect_iindirect_proportionjohnson_neymanlm_from_lavaan_listlm2boot_outlm2boot_out_parallellm2listmany_indirect_effectsmerge_mod_levelsmod_levelsmod_levels_listplot_effect_vs_wprint_all_cond_effectsprint_all_cond_indirect_effectspseudo_johnson_neymantotal_indirect_effect

Dependencies:bootclicolorspacecpp11fansifarverggplot2gluegtableigraphisobandlabelinglatticelavaanlifecyclemagrittrMASSMatrixmgcvmnormtmunsellnlmenumDerivpbapplypbivnormpillarpkgconfigquadprogR6RColorBrewerrlangscalestibbleutf8vctrsviridisLitewithr

Generate Bootstrap Estimates

Rendered fromdo_boot.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2022-09-06

Generate Monte Carlo Estimates

Rendered fromdo_mc.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2023-06-08

manymome

Rendered frommanymome.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2022-09-06

Mediation Analysis by Multiple Regression

Rendered frommed_lm.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2022-09-06

Mediation Models with Latent Variables

Rendered frommed_lav.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2022-09-06

Moderated Mediation Analysis by Multiple Regression

Rendered frommome_lm.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2022-09-06

Monte Carlo Confidence Intervals with Multiple Imputation

Rendered fromdo_mc_lavaan_mi.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-12-08
Started: 2023-06-08

Set Moderator Levels

Rendered frommod_levels.Rmdusingknitr::rmarkdownon Dec 09 2024.

Last update: 2024-05-08
Started: 2022-09-06

Readme and manuals

Help Manual

Help pageTopics
Enumerate All Indirect Effects in a Modelall_indirect_paths all_paths_to_df
Check a Path Exists in a Modelcheck_path
Print the Output of 'cond_indirect_diff()'coef.cond_indirect_diff
Estimates of Conditional Indirect Effects or Conditional Effectscoef.cond_indirect_effects
Delta_Med in a 'delta_med'-Class Objectcoef.delta_med
Extract the Indirect Effect or Conditional Indirect Effectcoef.indirect
Extract the Indirect Effects from a 'indirect_list' Objectcoef.indirect_list
Extract the Proportion of Effect Mediatedcoef.indirect_proportion
Coefficients of an 'lm_from_lavaan'-Class Objectcoef.lm_from_lavaan
Conditional, Indirect, and Conditional Indirect Effectscond_effects cond_indirect cond_indirect_effects indirect_effect many_indirect_effects
Differences In Conditional Indirect Effectscond_indirect_diff
Confidence Interval of the Output of 'cond_indirect_diff()'confint.cond_indirect_diff
Confidence Intervals of Indirect Effects or Conditional Indirect Effectsconfint.cond_indirect_effects
Confidence Interval for Delta_Med in a 'delta_med'-Class Objectconfint.delta_med
Confidence Interval of Indirect Effect or Conditional Indirect Effectconfint.indirect
Confidence Intervals of Indirect Effects in an 'indirect_list' Objectconfint.indirect_list
Sample Dataset: Simple Mediationdata_med
Sample Dataset: A Complicated Mediation Modeldata_med_complicated
Sample Dataset: A Complicated Mediation Model With Two Groupsdata_med_complicated_mg
Sample Dataset: Simple Mediation With Two Groupsdata_med_mg
Sample Dataset: Simple Mediation with a-Path Moderateddata_med_mod_a
Sample Dataset: Simple Mediation with Both Paths Moderated (Two Moderators)data_med_mod_ab
Sample Dataset: Simple Mediation with Both Paths Moderated By a Moderatordata_med_mod_ab1
Sample Dataset: Simple Mediation with b-Path Moderateddata_med_mod_b
Sample Dataset: A Simple Mediation Model with b-Path Moderated-Moderationdata_med_mod_b_mod
Sample Dataset: Parallel Mediation with Two Moderatorsdata_med_mod_parallel
Sample Dataset: Parallel Moderated Mediation with Two Categorical Moderatorsdata_med_mod_parallel_cat
Sample Dataset: Serial Mediation with Two Moderatorsdata_med_mod_serial
Sample Dataset: Serial Moderated Mediation with Two Categorical Moderatorsdata_med_mod_serial_cat
Sample Dataset: Serial-Parallel Mediation with Two Moderatorsdata_med_mod_serial_parallel
Sample Dataset: Serial-Parallel Moderated Mediation with Two Categorical Moderatorsdata_med_mod_serial_parallel_cat
Sample Dataset: One Moderatordata_mod
Sample Dataset: Moderation with One Categorical Moderatordata_mod_cat
Sample Dataset: Two Moderatorsdata_mod2
Sample Dataset: A Complicated Moderated-Mediation Modeldata_mome_demo
Sample Dataset: A Complicated Moderated-Mediation Model With Missing Datadata_mome_demo_missing
Sample Dataset: Parallel Mediationdata_parallel
Sample Dataset: A Latent Variable Mediation Model With 4 Factorsdata_sem
Sample Dataset: Serial Mediationdata_serial
Sample Dataset: Serial-Parallel Mediationdata_serial_parallel
Sample Dataset: A Latent Mediation Model With Three Mediatorsdata_serial_parallel_latent
Delta_Med by Liu, Yuan, and Li (2023)delta_med
Bootstrap Estimates for 'indirect_effects' and 'cond_indirect_effects'do_boot
Monte Carlo Estimates for 'indirect_effects' and 'cond_indirect_effects'do_mc gen_mc_est
Create Dummy Variablesfactor2var
Bootstrap Estimates for a 'lavaan' Outputfit2boot_out fit2boot_out_do_boot
Monte Carlo Estimates for a 'lavaan' Outputfit2mc_out
Get The Conditional Indirect Effect for One Row of 'cond_indirect_effects' Outputget_one_cond_effect get_one_cond_indirect_effect print_all_cond_effects print_all_cond_indirect_effects
Product Terms (if Any) Along a Pathget_prod
Index of Moderated Mediation and Index of Moderated Moderated Mediationindex_of_mome index_of_momome
Coefficient Table of an 'indirect_list' Class Objectindirect_effects_from_list
Indirect Effect (No Bootstrapping)indirect_i
Proportion of Effect Mediatedindirect_proportion
'lavaan'-class to 'lm_from_lavaan_list'-Classlm_from_lavaan_list
Bootstrap Estimates for 'lm' Outputslm2boot_out lm2boot_out_parallel
Join 'lm()' Output to Form an 'lm_list`-Class Objectlm2list
Math Operators for 'indirect'-Class Objects+.indirect -.indirect math_indirect
Merge the Generated Levels of Moderatorsmerge_mod_levels
Create Levels of Moderatorsmod_levels mod_levels_list
Sample Dataset: Moderated Serial Mediationmodmed_x1m3w4y1
Plot an Effect Against a Moderatorfill_wlevels plot_effect_vs_w
Plot Conditional Effectsplot.cond_indirect_effects
Predicted Values of a 'lm_from_lavaan'-Class Objectpredict.lm_from_lavaan
Predicted Values of an 'lm_from_lavaan_list'-Class Objectpredict.lm_from_lavaan_list
Predicted Values of an 'lm_list'-Class Objectpredict.lm_list
Print 'all_paths' Class Objectprint.all_paths
Print a 'boot_out'-Class Objectprint.boot_out
Print the Output of 'cond_indirect_diff'print.cond_indirect_diff
Print a 'cond_indirect_effects' Class Objectas.data.frame.cond_indirect_effects print.cond_indirect_effects
Print a 'delta_med' Class Objectprint.delta_med
Print an 'indirect' Class Objectprint.indirect
Print an 'indirect_list' Class Objectprint.indirect_list
Print an 'indirect_proportion'-Class Objectprint.indirect_proportion
Print an 'lm_list'-Class Objectprint.lm_list
Print a 'mc_out'-Class Objectprint.mc_out
Pseudo Johnson-Neyman Probingjohnson_neyman print.pseudo_johnson_neyman pseudo_johnson_neyman
Sample Dataset: A Simple Latent Mediation Modelsimple_mediation_latent
Extraction Methods for 'cond_indirect_effects' Outputssubsetting_cond_indirect_effects [.cond_indirect_effects
Extraction Methods for a 'wlevels'-class Objectsubsetting_wlevels [.wlevels [<-.wlevels [[<-.wlevels
Summary of an 'lm_list'-Class Objectprint.summary_lm_list summary.lm_list
Model Terms of an 'lm_from_lavaan'-Class Objectterms.lm_from_lavaan
Total Indirect Effect Between Two Variablestotal_indirect_effect