homog.test: Variance Homogeneity Tests

View source: R/homog.test.R

homog.testR Documentation

Variance Homogeneity Tests

Description

homog.test performs variance homogeneity tests including Levene, Bartlett, Fligner-Killeen tests.

Usage

homog.test(formula, data, method = c("Levene", "Bartlett", "Fligner"), 
  alpha = 0.05, na.rm = TRUE, verbose = TRUE)

Arguments

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.

data

a tibble or data frame containing the variables in formula.

method

a character string to select one of the variance homogeneity tests. "Levene": Levene's test, "Bartlett": Bartlett's test, "Fligner": Fligner-Killeen test.

alpha

the level of significance to assess variance homogeneity. Default is set to alpha = 0.05.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

verbose

a logical for printing output to R console.

Value

A list containing the following components:

statistic

the corresponding test statistic.

parameter

the parameter(s) of the approximate corresponding distribution of the test statistic. The corresponding distribution is F distribution for Levene's test, Chi-square distribution for Bartlett's test and Fligner-Killeen test.

p.value

the p-value of the test.

Author(s)

Osman Dag

See Also

leveneTest bartlett.test fligner.test

Examples


library(onewaytests)

homog.test(Sepal.Length ~ Species, data = iris)
homog.test(Sepal.Length ~ Species, data = iris, method = "Bartlett")


onewaytests documentation built on Oct. 2, 2023, 1:09 a.m.