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 |
m |
A |
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 |
$Uniqueness |
A |
$rotmatrix |
A |
Note
Note that the order of the features in the
$Loadings
and$Uniqueness
slots of the output is determined by the order of the features for the input argumentR
. As the$Loadings
slot gives an object of class "loadings" it can be subjected to theprint
function, which sorts the output to emphasize the loadings structure when callingsort = TRUE
.Note that the maximum likelihood procedure is stable when a regularized correlation matrix is used as the input for argument
R
.In high-dimensional situations usage of
dimGB
on the regularized correlation matrix is recommended to determine the value for argumentm
.
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
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)