Test for detecting violation of normality assumption.
ols_norm_test(y, ...) # S3 method for lm ols_norm_test(y, ...)
| y | A numeric vector or an object of class |
|---|---|
| ... | Other arguments. |
norm_test returns an object of class "norm_test".
An object of class "norm_test" is a list containing the
following components:
kolmogorv smirnov statistic
shapiro wilk statistic
cramer von mises statistic
anderson darling statistic
Other residual diagnostics: ols_corr_test,
ols_rsd_boxplot,
ols_rsd_hist, ols_rsd_qqplot,
ols_rvsp_plot
model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars) ols_norm_test(model)#> ----------------------------------------------- #> Test Statistic pvalue #> ----------------------------------------------- #> Shapiro-Wilk 0.9366 0.0600 #> Kolmogorov-Smirnov 0.1152 0.7464 #> Cramer-von Mises 2.8122 0.0000 #> Anderson-Darling 0.5859 0.1188 #> -----------------------------------------------