residuals.cellwise.normality.datatable: Cellwise residual normality (Shapiro–Wilk) from ANOVA models
Description
Fits, for each subset of RHS factors, a full-factorial ANOVA to the response and
tests Shapiro–Wilk normality of residuals within each cell defined by those factors.
Matches the classical ANOVA assumption of normal errors per cell.
Usage
# S3 method for cellwise.normality.datatable
residuals(formula, data, force_factors = TRUE)
Value
A data.frame with rows per cell across all factor combinations. Columns include:
Effect, factor columns (with NA for factors not in the current subset),
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.