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.
Mediation and moderated mediation for two-condition within-subject designs.
These tutorials describe wsMed 1.2.0. Install the released package from CRAN:
install.packages("wsMed")Or install the version on the GitHub master branch:
# install.packages("pak")
pak::pak("Yangzhen1999/wsMed@master")Restart R after updating. packageVersion("wsMed") shows
the installed version.
Each row is one participant. The paired mediator columns are
A1 / A2 and B1 / B2;
the paired outcome columns are D1 / D2. The
contrast is condition 2 minus condition 1.
library(wsMed)
data(example_data)
result <- wsMed(
data = example_data,
M_C1 = c("A1", "B1"),
M_C2 = c("A2", "B2"),
Y_C1 = "D1",
Y_C2 = "D2"
)
print(result)
summary(result)
plot(result)This uses the defaults: parallel mediation, listwise deletion, Monte Carlo inference with 20,000 draws, 95% CIs and unstandardized output. The dataset is complete. The Get started guide explains the report and adds a moderator in a second example.
Use unordered factors for categorical between-subject covariates and moderators, with the first level as the reference. The categorical predictor guide explains coding and missing-data restrictions.
The empirical manuscript data are included as
wsmed_examples. For source editing and tutorial rebuilding,
see the maintainer
guide.
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.