Learn R Programming

aelab (version 1.1.0)

normality_test_aov: normality_test_aov

Description

Test normality of ANOVA model residuals using Shapiro-Wilk on raw, square-root, and log10 transforms (one-way or two-way).

Usage

normality_test_aov(df, variable_name, group_1, group_2 = NULL)

Value

A tibble with Shapiro-Wilk p-values for each transformation.

Arguments

df

A data frame.

variable_name

Name of the response variable column (string).

group_1

Name of the first grouping column (string).

group_2

Name of the second grouping column (string), or NULL for a one-way model.

Examples

Run this code
df <- data.frame(
  grp = c("A","A","B","B"),
  val = c(1.1, 1.4, 3.2, 3.8)
)
normality_test_aov(df, "val", "grp")

Run the code above in your browser using DataLab