This package will conduct multiple OLS assumption tests in one function in R.
You can install the released version of olsat from GitHub with:
# install.packages("devtools")
devtools::install_github("jepperosenborg/olsat")
How to run the tester:
library(olsat)
## basic example code
olsatester(lm(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris))
Assumption
Test
Values
Value.type
Interpretation
Acceptance
MLR.1 Linearity
Model F-statistics
0.0000
P-value
H0: Non-linearity
Acceptable
MLR.1 Linearity
Likelihood Ratio
0.0000
P-value
H0: Non-linearity
Acceptable
MLR.3 No Perfect Collinearity (Multicollinearity)
Farrar–Glauber
0.0000
\# of variables
Variables with collinearity
Acceptable
MLR.5 Homoscedasticity
Breusch-Pagan
0.0010
P-value
H0: Homoscedasticity
Unacceptable
MLR.5 Homoscedasticity
Non-Constant Error Variance
0.0008
P-value
H0: Homoscedasticity
Unacceptable
MLR.6 Normality of Errors (Normally distributed)
Shapiro-Wilk
0.0102
P-value
H0: Normally distributed
Unacceptable
MLR.6 Normality of Errors (Normally distributed)
Kolmogorov-Smirnov
0.2733
P-value
H0: Normally distributed
Acceptable
Independant error terms
Durbin-Watson
0.5141
P-value
H0: Independance
Acceptable
Independant error terms
Breusch-Godfrey
0.8044
P-value
H0: Independance
Acceptable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.