cauchy_scale_one_way: Test the equality of scale parameters of cauchy...

cauchy_scale_one_wayR Documentation

Test the equality of scale parameters of cauchy distributions.

Description

Test the equality of scale parameters of cauchy distributions.

Usage

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

Arguments

x

a numeric vector of data.

fctr

a factor vector indicating groups.

conf.level

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

Details

  • Null: All scales are equal. (scale_1 = scale_2 ... scale_k).

  • Alternative: At least one scale 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 <- rcauchy(n = 150, 1, 2)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
cauchy_scale_one_way(x, fctr, .95)

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

LRTesteR documentation built on June 8, 2025, 12:06 p.m.