| dimIC {FMradio} | R Documentation |
Assess the latent dimensionality using information criteria
Description
A function that calculates either the AIC or the BIC on the factor model. These can be used to choose the number of latent factors.
Usage
dimIC(R, n, maxdim, Type = "BIC", graph = TRUE, verbose = TRUE)
Arguments
R |
(Regularized) correlation |
n |
A |
maxdim |
A |
Type |
A |
graph |
A |
verbose |
A |
Details
Information criteria (IC) are often used in selecting the number of latent factor to retain.
IC aim to balance model fit with model complexity.
They evaluate (minus 2 times) the maximized value of the (model-dependent) likelihood function weighed with a penalty function that is dependent on the free parameters in the model.
Different penalizations define the different types of IC.
The strategy would be to determine IC scores for a range of consecutive values of the latent factor dimension.
This function then determines scores for factor solutions ranging from 1 to maxdim latent factors.
The solution with the lowest IC score is deemed optimal.
The function allows for the calculation of either the Akaike information criterion (AIC; Akaike, 1973) or the Bayesian information criterion (BIC; Schwarz, 1978).
Also see the Supplementary Material of Peeters et al. (2019) for additional detail.
When graph = TRUE the IC scores are visualized.
The graph plots the IC score against the consecutive dimensions of the factor solution.
Value
The function returns an object of class data.frame.
The first column represents the assessed dimensions running from 1 to maxdim.
The second column represents the corresponding values of the chosen information criterion.
Note
The argument
maxdimcannot exceed the Ledermann-bound (Ledermann, 1937):\lfloor [2p + 1 - (8p + 1)^{1/2}]/2\rfloor, wherepindicates the observed-feature dimension. Usually, one wants to setmaxdimmuch lower than this bound.Other functions for factor analytic dimensionality assessment are
dimGBanddimLRT. In high-dimensional situations usage ofdimGBon the regularized correlation matrix is recommended.
Author(s)
Carel F.W. Peeters <cf.peeters@vumc.nl>
References
Akaike, H. (1973). Information theory and an extension of the maximum likelihood principle. In: B. N. Petrov and F. Csaki (Eds.) Second International Symposium on Information Theory, pages 267–281. Budapest: Akademiai Kaido.
Ledermann, W. (1937). On the rank of the reduced correlational matrix in multiple factor analysis. Psychometrika, 2:85–93.
Peeters, C.F.W. et al. (2019). Stable prediction with radiomics data. arXiv:1903.11696 [stat.ML].
Schwarz, G.E. (1978). Estimating the dimension of a model. Annals of Statistics, 6:461–464.
See Also
Examples
## Simulate some data according to the factor model
## $cormatrix gives the correlation matrix on the generated data
simDAT <- FAsim(p = 50, m = 5, n = 100)
simDAT$cormatrix
## Calculate the AIC for models of factor dimension 1 to 20
AIC <- dimIC(simDAT$cormatrix, n = 100, Type = "AIC", maxdim = 20)
print(AIC)
## Calculate the BIC for models of factor dimension 1 to 20
BIC <- dimIC(simDAT$cormatrix, n = 100, Type = "BIC", maxdim = 20)
print(BIC)