levene.test {groupcompare} | R Documentation |
Levene Test for Homogeneity of Variances
Description
This function performs the Levene test to check the homogeneity of variances across groups.
Usage
levene.test(ds)
Arguments
ds |
A data frame with two columns: the first column contains numeric values, and the second column contains group labels. |
Details
The function calculates the absolute deviations from the group means, performs an ANOVA on these deviations, and returns the p-value of the Levene test.
Value
A single numeric value named Levene.p
, representing the p-value of the Levene test.
Author(s)
Zeynel Cebeci, A. Firat Ozdemir, Engin Yildiztepe
Examples
df <- data.frame(values = c(1.1, 2.3, 2.5, 3.7, 1.2, 2.1, 3.4, 3.9),
groups = c("A", "A", "B", "B", "A", "A", "B", "B"))
levene.test(df)
[Package groupcompare version 1.0.1 Index]