mlFA {FMradio}R Documentation

Maximum likelihood factor analysis

Description

mlFA is a function that performs a maximum likelihood factor analysis.

Usage

mlFA(R, m)

Arguments

R

(Regularized) correlation matrix.

m

A numeric integer or integer indicating the latent dimension of the factor solution (i.e., the number of factors).

Details

This function is basically a wrapper around the factanal function from the stats package. Its purpose is to produce a factor solution of the chosen dimension (argument m) by a maximum likelihood estimation procedure (Joreskog, 1967). The wrapper ensures that the model is fitted under the same circumstances under which latent dimensionality is assessed with functions such as dimLRT and dimIC. The function produces a Varimax rotated (Kaiser, 1958) factor solution. The output can be used to produce factor scores by the facScore function.

Value

The function returns an object of class list:

$Loadings

A matrix of class loadings representing the loadings matrix in which in which each element \lambda_{jk} is the loading of the jth feature on the kth latent factor.

$Uniqueness

A matrix representing the diagonal matrix carrying the unique variances.

$rotmatrix

A matrix representing the Varimax rotation matrix.

Note

Author(s)

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

References

Joreskog, K.G (1967). Some contributions to maximum likelihood factor analysis. Psychometrika, 32:443–482.

Kaiser, H.F. (1958). The varimax criterion for analytic rotation in factor analysis. Psychometrika, 23:187–200.

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

See Also

dimGB, facScore

Examples

## Simulate some data according to a factor model with 5 latent factors
## Simulate high-dimensional situation in the sense that p > n
## $cormatrix gives the correlation matrix on the generated data
simDAT <- FAsim(p = 50, m = 5, n = 40, loadingvalue = .9)
simDAT$cormatrix

## Regularize the correlation matrix
RegR <- regcor(simDAT$data)

## Evaluate the Guttman bounds
## First Guttman bound indicates to retain 5 latent factors
GB <- dimGB(RegR$optCor)
print(GB)

## Produce ML factor solution under 5 factors
## Print loadings structure of this solution
fit <- mlFA(RegR$optCor, 5)
print(fit$Loadings, digits = 2, cutoff = .3, sort = TRUE)

[Package FMradio version 1.1.1 Index]