Skip to contents

Sigma = L L' + Psi (ESL eqs 14.80-14.81) fitted to the sample covariance (divisor n - 1) by the EM iteration L <- S Psi^-1 L M^-1, M = I + L' Psi^-1 L; unrotated.

Usage

factor_analysis_ml(data, n_factors = 2, max_iter = 1000, tol = 1e-06)

Arguments

data

Data matrix.

n_factors

Number of factors.

max_iter, tol

EM controls (largest change in the loadings).

Value

Named list: loadings, communalities, eigenvalues, variance_explained, n_factors, rotation.

References

Rubin, D. B. & Thayer, D. T. (1982). Psychometrika 47, 69-76.

Examples

i <- 1:40
X <- cbind(sin(i), cos(2 * i) + 0.5 * sin(i), 0.6 * sin(i) + 0.2 * cos(5 * i))
factor_analysis_ml(X, 1)$communalities
#> [1] 0.5198098 0.1118597 0.1836495