Learn R Programming

colleyRstats (version 0.0.1)

checkAssumptionsForAnova: Check the assumptions for an ANOVA with a variable number of factors: Normality and Homogeneity of variance assumption.

Description

Check the assumptions for an ANOVA with a variable number of factors: Normality and Homogeneity of variance assumption.

Usage

checkAssumptionsForAnova(data, y, factors)

Value

A message indicating whether to use parametric or non-parametric ANOVA

Arguments

data

the data frame

y

The dependent variable for which assumptions should be checked

factors

A character vector of factor names

Examples

Run this code
# \donttest{
set.seed(123)

main_df <- data.frame(
  tlx_mental      = rnorm(40),
  Video           = factor(rep(c("A", "B"), each = 20)),
  DriverPosition  = factor(rep(c("Left", "Right"), times = 20))
)

checkAssumptionsForAnova(
  data    = main_df,
  y       = "tlx_mental",
  factors = c("Video", "DriverPosition")
)
# }

Run the code above in your browser using DataLab