plot_assumptions {JSmediation} | R Documentation |
Returns diagnostic plots for the linear model used in a mediation
Description
When conducting a joint-significant test, different models are
fitted to the data. This function returns diagnostic plots for each of the
model used in the mediation model. check_assumptions_plot
uses the
performance
and see
packages behind the scenes to provide the different
plots.
This function is best used in an interactive context.
Usage
plot_assumptions(
mediation_model,
tests = c("normality", "heteroscedasticity", "outliers")
)
Arguments
mediation_model |
An object of class |
tests |
A character vector indicating which test to run. Supported test
includes |
Value
Invisibly returns an object of class mediation_model
.
See Also
Other assumption checks:
check_assumptions()
Examples
data(ho_et_al)
ho_et_al$condition_c <- build_contrast(ho_et_al$condition,
"Low discrimination",
"High discrimination")
my_model <-
mdt_simple(data = ho_et_al,
IV = condition_c,
DV = hypodescent,
M = linkedfate)
plot_assumptions(my_model)
[Package JSmediation version 0.2.2 Index]