Skip to contents

This function computes the Kaiser-Meyer-Olkin (KMO) criterion overall and for each variable in a correlation matrix. The KMO represents the degree to which each observed variable is predicted by the other variables in the dataset and with this indicates the suitability for factor analysis.

Usage

efa_kmo(
  x,
  use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
    "na.or.complete"),
  cor_method = c("pearson", "spearman", "kendall", "poly", "tetra")
)

Source

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 Psychological Measurement, 34, 111-117.

Cureton, E. E. & D'Agostino, R. B. (1983). Factor analysis: An applied approach. Hillsdale, N.J.: Lawrence Erlbaum Associates, Inc.

Arguments

x

data.frame or matrix. Dataframe or matrix of raw data or matrix with correlations.

use

character. Passed to stats::cor() if raw data is given as input. Default is "pairwise.complete.obs".

cor_method

character. Correlation computed from raw data: "pearson", "spearman", or "kendall" (passed to stats::cor()), or "poly" / "tetra" for polychoric / tetrachoric correlations of ordinal / binary data (a two-step estimator with no empty-cell continuity correction). Default is "pearson".

Value

A list containing

KMO

Overall KMO.

KMO_i

KMO for each variable.

settings

A list of the settings used.

Details

Kaiser (1970) proposed this index, originally called measure of sampling adequacy (MSA), that indicates how near the inverted correlation matrix \(R^{-1}\) is to a diagonal matrix \(S\) to determine a given correlation matrix's (\(R\)) suitability for factor analysis. The index is $$KMO = \frac{\sum_{i \neq j} r_{ij}^2}{\sum_{i \neq j} r_{ij}^2 + \sum_{i \neq j} q_{ij}^2}$$ with \(Q = SR^{-1}S\) and S = \((diag R^{-1})^{-1/2}\) where \(\sum_{i \neq j} r_{ij}^2\) is the sum of squares of the off-diagonal elements of \(R\) and \(\sum_{i \neq j} q_{ij}^2\) is the sum of squares of the off-diagonal elements of \(Q\) (see also Cureton & D'Agostino, 1983).

So KMO varies between 0 and 1, with larger values indicating higher suitability for factor analysis. Kaiser and Rice (1974) suggest that KMO should at least exceed .50 for a correlation matrix to be suitable for factor analysis.

This function was heavily influenced by the psych::KMO() function.

See also efa_bartlett() for another test of suitability for factor analysis.

The efa_kmo function can also be called together with the efa_bartlett() function and with factor retention criteria in the efa_retain() function.

See also

efa_bartlett() for another measure to determine suitability for factor analysis.

efa_retain() as a wrapper function for this function, efa_bartlett() and several factor retention criteria.

Other factor analysis suitability: efa_bartlett(), efa_screen(), print.efa_screen()

Examples

efa_kmo(test_models$baseline$cormat)
#> 
#> ── Kaiser-Meyer-Olkin criterion (KMO) ──────────────────────────────────────────
#> 
#>  The overall KMO value for your data is marvellous.
#> These data are probably suitable for factor analysis.
#> 
#> Overall: 0.916
#> 
#> For each variable:
#>    V1    V2    V3    V4    V5    V6    V7    V8    V9   V10   V11   V12   V13 
#> 0.900 0.914 0.924 0.932 0.923 0.891 0.928 0.919 0.916 0.892 0.928 0.908 0.922 
#>   V14   V15   V16   V17   V18 
#> 0.905 0.924 0.934 0.907 0.923