# Ejemplo mínimo (datos ficticios):
set.seed(1)
d <- data.frame(
id = rep(1:10, each = 4),
within = rep(paste0("t", 1:4), times = 10),
y = as.numeric(rep(rnorm(10, 10, 2), each = 4)) +
rep(c(0, .5, 1.2, .8), times = 10) + rnorm(40, 0, 1)
)
res <- MauchlyTest(y ~ within | id, data = d, do_print = TRUE)
summary(res)
Run the code above in your browser using DataLab