dimVAR {FMradio}R Documentation

Assessing variances under factor solutions

Description

dimVAR is a support function that assesses the proportion of and cumulative variances for a range of factor solutions.

Usage

dimVAR(R, maxdim, graph = TRUE, verbose = TRUE)

Arguments

R

(Regularized) correlation matrix.

maxdim

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

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

To assess a factor solution under m factors one might look at the proportion of explained variance. The dimVAR function calculates the proportion of variance explained by any factor as well as the proportion of variance explained by all factors for each factor solution raging from 1 to maxdim. Qualitatively, we want the proportion of variance explained by all factors to be appreciable (rules of thumb would say in excess of 70%). Moreover, one would want the proportion of variance explained by the kth factor in relation to the (k - 1)th factor to be appreciable and the proportion of variance of the (k + 1)th factor in relation to the kth factor to be negligible.

When graph = TRUE also a graph is returned visualizing the total cumulative variance against the dimension of the factor solution. Hence, it plots the total cumulative variances against the respective factor solutions ranging from 1 to maxdim. The point at which the graph flattens out is indicative of a formative number of latent factors.

Value

Returns an object of class list.

$CumVar

Contains a numeric vector with the cumulative variances explained for each factor solution from 1 to maxdim.

$varianceTables

This slot is itself a list. It contains, for each factor solution, a matrix with the sum of squares (SS), proportion variance (PV), and cumulative variance (CV) for each respective latent feature. Say one wants to access the variance table for a solution under 5-factors. Then one can call $varianceTables$`dimension = 5`. Similar calls are made to retrieve the variance table for other factor solutions.

Note

Author(s)

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

References

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].

See Also

dimGB, FAsim, mlFA, SMC

Examples

## Simulate some high-dimensional data according to the factor model
simDAT <- FAsim(p = 50, m = 5, n = 40)

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

## Assess proportion and cumulative variances for a range of factor solutions
## Inspect, for example, the variance table for the 5-factor solution
V <- dimVAR(RegR$optCor, maxdim = 20)
V$varianceTables$`dimension = 5`

[Package FMradio version 1.1.1 Index]