heteroscedasticity_check: Check Heteroscedasticity and Linearity of a Model

View source: R/heteroscedasticity_check.R

heteroscedasticity_checkR Documentation

Check Heteroscedasticity and Linearity of a Model

Description

Checks a simple or multiple linear regression model for heteroscedasticity and linearity. The function outputs orientation plots and computes relevant statistical tests (heteroscedasticity = lmtest::bptest; linearity = lmtest::raintest).

Usage

heteroscedasticity_check(mdl, random = NULL)

Arguments

mdl

A simple or multiple linear regression model.

Value

A plot and a test results in the console.

Author(s)

D. Schmitz & J. Esser

References

Achim Zeileis, Torsten Hothorn (2002). Diagnostic Checking in Regression Relationships. R News 2(3), 7-10. URL: https://CRAN.R-project.org/doc/Rnews/

Examples

data("data_s")

model <- lm(sDur ~ typeOfS + pauseDur, data_s)

heteroscedasticity_check(model)


dosc91/SfL documentation built on Sept. 14, 2024, 6:44 a.m.