plot_assumptions: Returns diagnostic plots for the linear model used in a...

View source: R/plot_assumptions.R

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


cedricbatailler/JSmediation documentation built on March 4, 2024, 12:52 p.m.