vis_anova_assumptions {visStatistics}R Documentation

Testing ANOVA assumptions

Description

vis_anova_assumptions checks for normality of the standardised residuals of the anova both graphically by qq-plots as well as performing the Shapiro-Wilk-test shapiro.test and the Anderson-Darling-Test ad.test. aov further tests the homoscedacity of each factor level in fact with the bartlett.test.

Usage

vis_anova_assumptions(
  samples,
  fact,
  conf.level = 0.95,
  samplename = "",
  factorname = "",
  cex = 1
)

Arguments

samples

vector containing dependent variable, datatype numeric

fact

vector containing independent variable, datatype factor

conf.level

confidence level, 0.95=default

samplename

name of sample used in graphical output, dataype character , ""=default

factorname

name of sample used in graphical output, dataype character, ""=default

cex

number indicating the amount by which plotting text and symbols should be scaled relative to the default. 1=default, 1.5 is 50% larger, 0.5 is 50% smaller, etc.

Value

my_list: list containing the test statistics of the anova aov(samples~fact),bartlett.test(samples~fact) and the tests of normality of the standardized residuals of aov, ks_test and shapiro_test

Examples

ToothGrowth$dose=as.factor(ToothGrowth$dose)
vis_anova_assumptions(ToothGrowth$len, ToothGrowth$dose)

vis_anova_assumptions(ToothGrowth$len, ToothGrowth$supp)
vis_anova_assumptions(iris$Petal.Width,iris$Species)

[Package visStatistics version 0.1.1 Index]