Skip to content

medmod

1.2.0Package record

Simple Mediation and Moderation Analysis

0packages depend
761downloads / year
97.6%test coverage
13/13flavors OK

Overview

About

This toolbox allows you to do simple mediation and moderation analysis. Models are estimated with the 'lavaan' package by Rosseel (2012) doi:10.18637/jss.v048.i02; standard errors for the mediation estimates are computed with the delta method following Sobel (1982) doi:10.2307/270723 or by bootstrapping. It is also available as a module for 'jamovi' (see https://www.jamovi.org for more information). You can find an in depth tutorial on the 'lavaan' model syntax used for this package on https://lavaan.ugent.be/tutorial/index.html.

Changes in 1.2.0

New features

  • Both analyses can now display a path diagram of the fitted model, with optional path labels, coefficient estimates and significance stars. The moderation diagram optionally draws the moderator's main-effect path.
  • The moderation estimates table can now display coefficient labels matching the simple slope parametrisation.
  • Model estimates are cached, so changing display options no longer refits the model (particularly noticeable with bootstrap standard errors).
  • Added two example datasets to jamovi's data library, one for mediation and one for moderation.

Bug fixes

  • Results now correctly refresh when the confidence level or the number of bootstrap samples changes.
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
  • The percent mediation column now uses the same estimates as the other columns (no change in results for these models, where the two coincide).
  • Replaced deprecated ggplot2 idioms (aes_string(), size for line widths).
  • Analyses now give an informative error when an expected model term is missing from the estimates.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.6 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-07-17
Advisories

none known

Documentation

In release 1.2.0
README· In the repository, left out of the releaseVignettesNoNEWSYes · 100% structured · mentions 1.2.0Citation fileNoWebsitenot declared in DESCRIPTION
Description cites a JSS article
Help pages
9 (6 internal)includes a package overview page
Examples that run
100%2 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

761
CRAN downloads in the past year
Rank #20,260 · ~2/day · ~63/mo
Daily download trend is not available in this view yet.
24930 days
66190 days
7611 year
Compare downloads with other packages →
Also on14 r2u2 autocran

Repository

6Stars
6Forks
2Open issues
0Open PRs
1Releases
49Commits
4Commit identities
jamovimediationmoderation
49 commits · Last activity 2026-07-15
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
633
Median days to close, 50 most recently updated closed PRs
1

Forks over time

2026-07-16 · 62026-10-06 · 6
PracticesBeta

7 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/raviselker/medmod on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Reproducibility and dev environment (1)
renv
CRAN release process (1)
cran-comments.md
Lint, format, editor (3)
Lint workflowAirRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-07-08
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: CLAUDE.md
    Pull request it wrote: opened by a project member
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing medmod adds 25 packages (12 with compiled code, 16 MB of source tarballs). Heaviest: ggplot2 6.0 MB, lavaan 1.6 MB, isoband 1.5 MB.

Depends (1)
R >= 3.2
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0.0 (2017)
Releases (2)

Pick two releases to compare their code metrics.

  • unarchivedReturned to CRAN
    2026-07-16
  • 1.2.0Latest
    record
    2026-07-16 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • archivedRemoved from CRAN
    2022-04-06
    check issues were not corrected in time
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0.0
    record
    2017-09-12
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-09-12
Total releases
2 / 9 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.2
Download size
18 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("medmod")
Selker, R. (2026). medmod: Simple Mediation and Moderation Analysis (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.medmod

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for medmod version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy