check_sphericity_bartlett {performance}R Documentation

Bartlett's Test of Sphericity

Description

Bartlett's (1951) test of sphericity tests whether a matrix (of correlations) is significantly different from an identity matrix. The test provides probability that the correlation matrix has significant correlations among at least some of the variables in a dataset, a prerequisite for factor analysis to work. In other words, before starting with factor analysis, one needs to check whether Bartlett’s test of sphericity is significant.

Usage

check_sphericity_bartlett(x, ...)

Arguments

x

A dataframe.

...

Arguments passed to or from other methods.

Details

This function is strongly inspired by the cortest.bartlett() function in the psych package (Revelle, 2016). All credit goes to its author.

Value

A list of indices related to sphericity.

References

Examples

library(performance)
check_sphericity_bartlett(mtcars)

[Package performance version 0.10.2 Index]