Performs one of several common univariate normality tests on each numeric variable
in a vector, matrix, or data frame.
Usage
test_univariate_normality(data, test = c("SW", "CVM", "Lillie", "SF", "AD"))
Value
A data frame with one row per variable and the following columns:
Test, the name of the test used;
Variable, the name of the tested variable;
Statistic, the test statistic;
and p.value, the associated p-value.
Arguments
data
A numeric vector, matrix, or data frame with observations in rows and variables in columns.
Non-numeric columns are dropped with a warning. Each column is tested individually.
test
A character string specifying the normality test to use.
Choices are: "SW" (Shapiro–Wilk), "SF" (Shapiro–Francia),
"AD" (Anderson–Darling), "CVM" (Cramér–von Mises), and
"Lillie" (Lilliefors test). Default is the first match from this list.