identify_elbow: identify_elbow

Description Usage Arguments Value Examples

View source: R/identify_elbow.R

Description

Identify the number of factors that explain the most amount of variance through the elbow method.

Usage

1

Arguments

fi_var

A vector representing the percentage of explained variance for each factor. Its length should equal the number of columns in the matrix of factor scores.

Value

A numeric value signifying the optimal number of factors to extract from the matrix of factor scores. A scree plot of the variance percentages will also be outputted.

Examples

1
2
3
4
5
6
# Using tcga_metadata from package.
library(MetaConIdentifier)
ca_info <- run_ca(tcga_meta_clean)

# Find the optimal number of factors to extract.
num_factors <- identify_elbow(ca_info$fi_var)

ahnjedid/MetaConIdentifier documentation built on Dec. 18, 2021, 11:26 p.m.