`R/check_assumptions.R`

`check_assumptions.Rd`

When conducting a joint-significant test, different models are
fitted to the data. This function tests assumptions regarding these models
using the `performance`

package.

The assumptions test are performed using
`check_normality`

,
`check_heteroscedasticity`

, and
`check_outliers`

.

Note that `check_assumptions`

returns a `mediation_model`

object.

```
check_assumptions(
mediation_model,
tests = c("normality", "heteroscedasticity")
)
```

- mediation_model
An object of class

`mediation_model`

.- tests
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:
`plot_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)
check_assumptions(my_model)
#> X -> Y
#> X -> M
#> X + M -> Y
```