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")
)

Arguments

mediation_model

An object of class mediation_model.

tests

A character vector indicating which test to run. Supported test includes "normality", "heteroscedasticity", and "outliers"

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)
#> For confidence bands, please install `qqplotr`.
#> Warning: pseudoinverse used at 4.481
#> Warning: neighborhood radius 0.1723
#> Warning: reciprocal condition number 2.2957e-15
#> 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 2.2957e-15
#> 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 2.1406e-15
#> 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.6875e-15
#> 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.6875e-15
#> 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 2.1406e-15
#> Warning: There are other near singularities as well. 1.8453e-07
#> For confidence bands, please install `qqplotr`.