equal_test.Rd
Performs Levene's test to assess equality of variances between groups.
equal_test(data, var, group, center = "median")
A data frame containing the variables to be tested.
A character string specifying the numeric variable in data
to test.
A character string specifying the grouping variable in data
.
A character string specifying the center to use in Levene's test. Default is "median"
, which is more robust than the mean.
Logical value:
TRUE
: Variances are equal, p-value ≥ 0.05
FALSE
: Variances are unequal or an error occurred during testing
Levene's test is the default method adopted in SPSS, the original Levene's test select center = mean, but here select center = median for a more robust test
equal_test(iris, "Sepal.Length", "Species")
#> [1] FALSE