SA: Calculate the KMO measure of feature-sampling adequacy

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/FMradio.R

Description

SA is a function that calculates the Kaiser-Meyer-Olkin (KMO) measure of sampling adequacy.

Usage

1
SA(R)

Arguments

R

(Regularized) covariance or correlation matrix.

Details

The SA function calculates the Kaiser-Meyer-Olkin (KMO) measure of feature-sampling adequacy (Kaiser & Rice, 1974). It provides a practical option for the assessment of factorability. Factorability refers to the assessment of the ability to identify coherent common latent factors from a given correlation matrix. In common factor analysis the observed features are assumed to be independent given the common latent features. Under this crucial model assumption, the inverse of the population correlation matrix is diagonal. Hence, to assess factorability one could assess if the inverse of the sample correlation matrix is near-diagonal. The KMO index provides for such an assessment by "comparing the sizes of the off-diagonal entries of the regularized correlation matrix to the sizes of the off-diagonal entries of its scaled inverse" (Peeters et al., 2019). It takes values in [0,1] and larger values are preferred. A KMO index between .9 and 1 would be considered to be indicative of great factorability. For rules of thumb regarding interpretation of KMO index value, see Kaiser (1970). The SA function calculates an overall KMO index as well as the KMO index per observed feature.

The intended usage of the SA function is to assess if performing a factor analysis on a given (regularized) correlation matrix can be considered appropriate. As such, it succeeds usage of the regcor function (for high-dimensional and/or strongly collinear settings) and precedes usage of the dimGB and mlFA functions.

Value

The function returns an object of class list:

$KMO

A numeric scalar representing the overall KMO index.

$KMOfeature

A numeric vector giving the KMO index per feature.

Note

The input matrix R should be nonsingular for the KMO to be computed. When R is singular one may regularize it using the regcor function.

Author(s)

Carel F.W. Peeters <cf.peeters@vumc.nl>

References

Kaiser, H.F. (1970). A second-generation little jiffy. Psychometrika, 35:401–415.

Kaiser, H.F., & Rice., J. (1974). Little jiffy, mark IV. Educational and Pscyhological Measurement, 34:111–117.

Peeters, C.F.W. et al. (2019). Stable prediction with radiomics data. arXiv:1903.11696 [stat.ML].

See Also

regcor, dimGB, mlFA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Generate some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]

## Obtain regularized correlation matrix
RegR <- regcor(X, fold = 5, verbose = TRUE)

## Assess factorability through the KMO index
factorable <- SA(RegR$optCor)
factorable$KMO
factorable$KMOfeature

Example output

Determining folds... 
Determining optimal penalty value... 
[1] 0.6449574
        a         b         c         d         e         f         g         h 
0.6300660 0.6576690 0.6703563 0.6206401 0.6479439 0.6220659 0.6174281 0.6060351 
        i         j         k         l         m         n         o         p 
0.6162457 0.6213029 0.6169846 0.6552290 0.6589851 0.6617455 0.6563547 0.6386876 
        q         r         s         t         u         v         w         x 
0.6778242 0.6616671 0.5840469 0.5925743 0.6460688 0.6682330 0.6633447 0.6681571 
        y 
0.6756045 

FMradio documentation built on Dec. 16, 2019, 5:43 p.m.