Skip to contents

Test if your data adheres to the common assumptions of many statistical tests, including normal distribution and equality of variances.

ggls::test_assumptions(ToothGrowth, supp, len)
#> [1] "Shapiro Test indicates non-normal distribution in the data"
#> [1] "Variance Test indicates equal variances in the data"
#>      Assumption          Decision
#> [1,] "Shapiro Normality" "Fail"  
#> [2,] "Levene Variance"   "Pass"

The output tells you the result.

If you want to change the p-value, you can do that, too.

ggls::test_assumptions(ToothGrowth, supp, len, alpha = 0.01)
#> [1] "Shapiro Test indicates normal distribution in the data"
#> [1] "Variance Test indicates equal variances in the data"
#>      Assumption          Decision
#> [1,] "Shapiro Normality" "Pass"  
#> [2,] "Levene Variance"   "Pass"

You can also include diagnostic plots, but this feature is still in beta testing and maybe will break if you try to do it. SO maybe don’t try that right now.