R: Easy Access to Factor Analysis Results

factor_analysis_results {anomalyDetection} | R Documentation

## Easy Access to Factor Analysis Results

### Description

`factor_analysis_result` Provides easy access to factor analysis results

### Usage

    factor_analysis_results(data, results = 1)

### Arguments

`data` | list output from `factor_analysis`
`results` | factor analysis results to extract. Can use either results name or number (i.e. fa_scores or 2):: `fa_loadings` (default) `fa_scores` `fa_loadings_rotated` `fa_scores_rotated` `num_factors`

### Value

Returns the one of the selected results:

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

### See Also

`factor_analysis` for computing the factor analysis results

### Examples

    # An efficient means for getting factor analysis results
    x <- matrix(rnorm(200*3), ncol = 10)
    N <- nrow(x)
    p <- ncol(x)

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

[Package anomalyDetection version 0.2.5 Index]