R: Factor Analysis with Varimax Rotation

factor_analysis {anomalyDetection} | R Documentation

## Factor Analysis with Varimax Rotation

### Description

`factor_analysis` reduces the structure of the data by relating the correlation between variables to a set of factors, using the eigen-decomposition of the correlation matrix.

### Usage

    factor_analysis(data, hc_points)

### Arguments

`data` | numeric data
`hc_points` | vector of eigenvalues [designed to use output from `horns_curve`]

### Value

A list containing:

1. `fa_loadings`: numerical matrix with the original factor loadings

2. `fa_scores`: numerical matrix with the row scores for each factor

3. `fa_loadings_rotated`: numerical matrix with the varimax rotated factor loadings

4. `fa_scores_rotated`: numerical matrix with the row scores for each varimax rotated factor

5. `num_factors`: numeric vector identifying the number of factors

### References

H. F. Kaiser, "The Application of Electronic Computers to Factor Analysis," Educational and Psychological Measurement, 1960.

### See Also

`horns_curve` for computing the average eigenvalues used for `hc_points` argument

### Examples

    # Perform Factor Analysis with matrix \code{x}
    x <- matrix(rnorm(200*3), ncol = 10)

    x %>%
      horns_curve() %>%
      factor_analysis(x, hc_points = .)

[Package anomalyDetection version 0.2.5 Index]