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)
Run the code above in your browser using DataLab