View source: R/p_mauchly.test.R
p_mauchly.test | R Documentation |
Perform simulation experiment for Mauchly's Test of Sphericity using
the function mauchlys.test
, returning a p-value.
Assumes the data are from a multivariate
normal distribution, however this can be modified.
p_mauchly.test(n, sigma, gen_fun = gen_mauchly.test, ...)
gen_mauchly.test(n, sigma, ...)
mauchlys.test(X)
n |
sample size |
sigma |
symmetric covariance/correlation matrix passed to |
gen_fun |
function used to generate the required data.
Object returned must be a |
... |
additional arguments to be passed to |
X |
a matrix with |
a single p-value
Phil Chalmers rphilip.chalmers@gmail.com
sigma <- diag(c(1,2,1))
sigma
p_mauchly.test(100, sigma=sigma)
# Null is true
sigma.H0 <- diag(3)
p_mauchly.test(100, sigma=sigma.H0)
# empirical power estimate
p_mauchly.test(100, sigma=sigma) |> Spower()
# empirical Type I error estimate
p_mauchly.test(100, sigma=sigma.H0) |> Spower()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.