FKTest: Fligner-Killeen Test for Homogeneity of Variances (Manual...

View source: R/FlignerKilleenTest.R

FKTestR Documentation

Fligner-Killeen Test for Homogeneity of Variances (Manual Implementation)

Description

Performs a non-parametric Fligner-Killeen test for equality of variances across two or more groups, using raw vectors via a formula interface.

Usage

FKTest(formula, data, alpha = 0.05)

Arguments

formula

A formula of the form y ~ group, where y is numeric and group is a grouping variable (factor or coercible to factor).

data

A data frame containing the variables in the formula.

alpha

Significance level (default is 0.05).

Details

This test is particularly useful when the assumption of normality is violated, as it is robust to outliers and distributional deviations. It serves as a reliable alternative to Bartlett’s test when data do not follow a normal distribution.

Advantages: - Non-parametric: No assumption of normality. - Robust to outliers. - Suitable for heterogeneous sample sizes.

Disadvantages: - Less powerful than parametric tests under normality. - May be computationally intensive with large datasets.

Value

An object of class "homocedasticidad", containing:

Statistic

The Fligner-Killeen chi-squared statistic.

df

Degrees of freedom.

p_value

The p-value for the test.

Decision

"Homoscedastic" or "Heteroscedastic" depending on the test result.

Method

A string indicating the method used ("Fligner-Killeen").

References

Fligner, M. A., & Killeen, T. J. (1976). "Distribution-free two-sample tests for scale." Journal of the American Statistical Association, 71(353), 210–213. <https://doi.org/10.1080/01621459.1976.10480351>

Examples

data(d_e, package = "Analitica")
res <- FKTest(Sueldo_actual ~ labor, data = d_e)
summary(res)


Analitica documentation built on June 14, 2025, 9:07 a.m.