MauchlySphericityTest: Mauchly's test of Sphericity

View source: R/testMauchlySphericity.R

MauchlySphericityTestR Documentation

Mauchly's test of Sphericity

Description

Performs a test of sphericity on a dataframe with multiple measures, one subject per line. It assesses the significance of the null hypothesis that the covariance matrix is spherical. This test is described in \insertCitea10superb

Usage

MauchlySphericityTest(dta, cols)

Arguments

dta

A data frame containing within-subject measures, one participant per line;

cols

A vector indicating the columns containing the measures.

Value

p the p-value of the null hypothesis that the data are spherical.

References

\insertAllCited

Examples

# creates a small data frames with 4 subject's scores for 5 measures:
dta <- data.frame(cbind(
        col1 <- c(3., 6., 2., 2., 5.),
        col2 <- c(4., 5., 4., 4., 3.),
        col3 <- c(2., 7., 7., 8., 6.),
        col4 <- c(6., 8., 4., 6., 5.)
    ))
# performs the test (here p = 0.5824)
MauchlySphericityTest(dta)


dcousin3/superb documentation built on Dec. 23, 2024, 8:58 p.m.