powered by
Test normality of a variable within two groups using Shapiro-Wilk on raw, square-root, and log10 transforms (for t-test context).
normality_test_t(df, variable_name, group, group_1, group_2)
A tibble with Shapiro-Wilk p-values for each group × transformation combination.
A data frame.
Name of the numeric variable column (string).
<[`data-masking`][dplyr::dplyr_data_masking]> The grouping column.
Value identifying the first group.
Value identifying the second group.
df <- data.frame( grp = c("A","A","A","B","B","B"), val = c(1.1, 2.0, 1.5, 4.2, 3.8, 4.5) ) normality_test_t(df, "val", grp, "A", "B")
Run the code above in your browser using DataLab