check_assumptions: Checking the Gauss-Markov Assumptions

Description Usage Arguments Value Examples

View source: R/check_assumptions.R

Description

This function taks in an OLS model and returns a data frame of the most common assumptions used to test a model. Used as a starting point for testing the assumptions. The results offer suggestions about which assumptions deserve a closer examination.

Usage

1
check_assumptions(model_name)

Arguments

model_name

An OLS model object.

Value

Each row represents one assumption check. The three columns show the test, the relevant value (depends on the exact test), and an evaluation of whether further exploration is necessary. Normality, constant variance, and autocorrelation are all significance tests. Multicollinearity uses VIF scores (relevant only for multiple regression). Conditional mean looks at the correlation between the residuals and the numeric variable. Currently, it is unable to properly evaluate the influence of a categorical variable.

Examples

1
2
3
4
5
model <- lm(dist ~ speed , data = cars) # running a model
check_assumptions(model)

model2 <- lm(mpg ~ cyl + wt, data = mtcars)
check_assumptions(model2)

rgardiner90/researchr documentation built on Nov. 5, 2019, 3:07 a.m.