Levene.Test | R Documentation |
Performs Levene's test for equality of variances across groups using a formula interface. This test evaluates the null hypothesis that the variances are equal across groups, and is commonly used as a preliminary test before ANOVA or other parametric analyses.
Levene.Test(formula, data, alpha = 0.05, center = "median")
formula |
A formula of the form |
data |
A data frame containing the variables in the formula. |
alpha |
Significance level (default is 0.05). |
center |
Character string: use |
Levene’s test is based on an analysis of variance (ANOVA) applied to the absolute deviations from each group’s center (either the mean or, more robustly, the median). It is less sensitive to departures from normality than Bartlett’s test.
Advantages: - Robust to non-normality, especially when using the median. - Suitable for equal or unequal sample sizes across groups. - Widely used in practice for checking homoscedasticity.
Disadvantages: - Less powerful than parametric alternatives under strict normality.
An object of class "homocedasticidad"
, containing:
F statistic of the Levene test.
Degrees of freedom (between and within groups).
The p-value for the test.
"Homoscedastic"
or "Heteroscedastic"
depending on the test result.
A string indicating the method used ("Levene").
Levene, H. (1960). "Robust Tests for Equality of Variances." In Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling (pp. 278–292). Stanford University Press.
data(d_e, package = "Analitica")
res <- Levene.Test(Sueldo_actual ~ labor, data = d_e)
summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.