Description Usage Arguments Value Examples
View source: R/check_assumptions.R
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.
1 | check_assumptions(model_name)
|
model_name |
An OLS model object. |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.