R/plot_assumptions.R
plot_assumptions.Rd
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.
plot_assumptions(
mediation_model,
tests = c("normality", "heteroscedasticity", "outliers")
)
An object of class mediation_model
.
A character vector indicating which test to run. Supported test
includes "normality"
, "heteroscedasticity"
, and
"outliers"
Invisibly returns an object of class mediation_model
.
Other assumption checks:
check_assumptions()
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)
#> For confidence bands, please install `qqplotr`.
#> Warning: pseudoinverse used at 4.481
#> Warning: neighborhood radius 0.1723
#> Warning: reciprocal condition number 6.2964e-17
#> Warning: There are other near singularities as well. 0.029689
#> Warning: pseudoinverse used at 4.481
#> Warning: neighborhood radius 0.1723
#> Warning: reciprocal condition number 6.2964e-17
#> Warning: There are other near singularities as well. 0.029689
#> Warning: pseudoinverse used at 0.00223
#> Warning: neighborhood radius 0.00042957
#> Warning: reciprocal condition number 1.0326e-16
#> Warning: There are other near singularities as well. 1.8453e-07
#> For confidence bands, please install `qqplotr`.
#> Warning: pseudoinverse used at 4.7683
#> Warning: neighborhood radius 0.77553
#> Warning: reciprocal condition number 1.074e-16
#> Warning: There are other near singularities as well. 0.60145
#> Warning: pseudoinverse used at 4.7683
#> Warning: neighborhood radius 0.77553
#> Warning: reciprocal condition number 1.074e-16
#> Warning: There are other near singularities as well. 0.60145
#> Warning: pseudoinverse used at 0.00223
#> Warning: neighborhood radius 0.00042957
#> Warning: reciprocal condition number 1.0326e-16
#> Warning: There are other near singularities as well. 1.8453e-07
#> For confidence bands, please install `qqplotr`.