gaussian_variance_one_way: Test the equality of variance parameters of gaussian...

gaussian_variance_one_wayR Documentation

Test the equality of variance parameters of gaussian distributions.

Description

Test the equality of variance parameters of gaussian distributions.

Usage

gaussian_variance_one_way(x, fctr, conf.level = 0.95)

Arguments

x

a numeric vector of at least 50 data values per group.

fctr

a factor vector indicating groups.

conf.level

overall confidence level of the likelihood intervals. Uses Bonferroni correction.

Details

  • Null: All variances are equal. (o^2_1 = o^2_2 ... o^2_k).

  • Alternative: At least one variance is not equal.

Value

An S3 class containing the test statistic, p value, list of likelihood based confidence intervals, overall confidence level, individual confidence level of each interval and alternative hypothesis.

Source

Examples

library(LRTesteR)

# Null is true
set.seed(1)
x <- rnorm(150, 1, 1)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
gaussian_variance_one_way(x, fctr, .95)

# Null is false
set.seed(1)
x <- c(rnorm(50, 1, 1), rnorm(50, 1, 2), rnorm(50, 1, 3))
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
gaussian_variance_one_way(x, fctr, .95)

gmcmacran/MLTesteR documentation built on Sept. 12, 2024, 3:30 p.m.