Learn R Programming

factorH (version 0.5.0)

residuals.normality.datatable: Global residual normality (Shapiro–Wilk) from ANOVA models

Description

For each subset of RHS factors, fits a full-factorial ANOVA and runs a single Shapiro–Wilk test on the model residuals (global test per model). Use residuals.cellwise.normality.datatable for the stricter per-cell assumption.

Usage

# S3 method for normality.datatable
residuals(formula, data, force_factors = TRUE)

Value

A data.frame with one row per Effect (A, B, A:B, ...), with count, W, p.shapiro (4 decimals), OK.

Arguments

formula

A model formula y ~ A + B (+ C ...).

data

A data frame with the variables.

force_factors

Logical; if TRUE, coerces RHS predictors to factors.

See Also

residuals.cellwise.normality.datatable

Examples

Run this code
if (FALSE) {
residuals.normality.datatable(liking ~ gender + condition + age_cat, data = mimicry)
}

Run the code above in your browser using DataLab