sigma <- diag(c(1,2,1))
sigma
# H0 test that sphericity holds
p_mauchly.test(100, sigma=sigma)
# return analysis object
p_mauchly.test(100, sigma=sigma, return_analysis=TRUE)
# Null is true
sigma.H0 <- diag(3)
p_mauchly.test(100, sigma=sigma.H0)
# \donttest{
# empirical power estimate
p_mauchly.test(100, sigma=sigma) |> Spower()
# empirical Type I error estimate
p_mauchly.test(100, sigma=sigma.H0) |> Spower()
# }
Run the code above in your browser using DataLab