dimIC: Assess the latent dimensionality using information criteria

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/FMradio.R

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

1
dimIC(R, n, maxdim, Type = "BIC", graph = TRUE, verbose = TRUE)

Arguments

R

(Regularized) correlation matrix.

n

A numeric scalar representing the sample size.

maxdim

A numeric integer or integer indicating the maximum factor dimension to be assessed.

Type

A character indicating the type of IC to be calculated.
Must be one of: "AIC", "BIC".

graph

A logical indicating if the results should be visualized.

verbose

A logical indicating if the function should run silently.
Runs silently when verbose = FALSE.

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

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

dimGB, FAsim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

FMradio documentation built on Dec. 16, 2019, 5:43 p.m.