The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

wsMed: Within-Subject Mediation Analysis Using Structural Equation Modeling

Within-subject mediation analysis using structural equation modeling. Examine how changes in an outcome variable between two conditions are mediated through one or more variables. Supports within-subject mediation analysis using the 'lavaan' package by Rosseel (2012) <doi:10.18637/jss.v048.i02>, and extends Monte Carlo confidence interval estimation to missing data scenarios using the 'semmcci' package by Pesigan and Cheung (2023) <doi:10.3758/s13428-023-02114-4>.

Version: 1.2.0
Depends: R (≥ 4.1.0)
Imports: knitr, lavaan, semmcci, mice, semboottools, MASS, rlang, dplyr, ggplot2, methods, stats, graphics, utils
Suggests: rmarkdown, devtools, testthat, smcfcs (≥ 1.8.0)
Published: 2026-10-28
DOI: 10.32614/CRAN.package.wsMed
Author: Wendie Yang ORCID iD [aut, cre], Shu Fai Cheung ORCID iD [aut]
Maintainer: Wendie Yang <1581075494q at gmail.com>
BugReports: https://github.com/Yangzhen1999/wsMed/issues
License: GPL (≥ 3)
Copyright: see file COPYRIGHTS
URL: https://yangzhen1999.github.io/wsMed/
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: wsMed results [issues need fixing before 2026-11-18]

Documentation:

Reference manual: wsMed.html , wsMed.pdf
Vignettes: Choose an analysis (source)
Working with categorical predictors (source)
Model-compatible multiple imputation (source)
Model equations: serial mediation (source)
Model equations: serial-parallel mediation (source)
Specifying user-defined mediation models (source)
Model equations: parallel mediation (source)
Model equations: parallel-serial mediation (source)
Get started: two mediation examples (source)
Comparing wsMed and MEMORE (source)
Reuse a fit: the staged workflow (source)
Plotting mediation effects and contrasts (source)
Read and export results (source)
Standardized effects (source)
Diagnostics, reproducibility, and migration (source)
Analysis options: a complete walkthrough (source)
Inspecting generated SEM syntax (source)

Downloads:

Package source: wsMed_1.2.0.tar.gz
Windows binaries: r-devel: wsMed_1.2.0.zip, r-release: wsMed_1.2.0.zip, r-oldrel: wsMed_1.2.0.zip
macOS binaries: r-release (arm64): wsMed_1.2.0.tgz, r-oldrel (arm64): wsMed_1.2.0.tgz, r-release (x86_64): wsMed_1.2.0.tgz, r-oldrel (x86_64): wsMed_1.2.0.tgz
Old sources: wsMed archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=wsMed to link to this page.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.