# \donttest{
set.seed(123)
x1 = matrix(rnorm(20), ncol = 1)
y1 = x1 + rlaplace(20, 0, 1)
x2 = matrix(rnorm(20), ncol = 1)
y2 = x2 + rlaplace(20, 0, 1.5)
x3 = matrix(rnorm(20), ncol = 1)
y3 = x3 + rlaplace(20, 0, 2)
x4 = matrix(rnorm(20), ncol = 1)
y4 = x4 + rlaplace(20, 0, 2.5)
x5 = matrix(rnorm(20), ncol = 1)
y5 = x5 + rlaplace(20, 0, 3)
y = c(y1, y2, y3, y4, y5)
x = rbind(x1, x2, x3, x4, x5)
group_index = c(rep(1,20),rep(2,20),rep(3,20),rep(4,20),rep(5,20))
# Application of the homogeneity of variance test
test_result = HV_test(y, x, group_index)
test_result
# }
Run the code above in your browser using DataLab