findRelativeElbow: Find a relative "elbow" in a eigenvalue or R^2 vector

Description Usage Arguments Details See Also Examples

View source: R/findRelativeElbow.R

Description

Find a relative "elbow" in a eigenvalue or R^2 vector

Usage

1
findRelativeElbow(.v, cumulative = FALSE, plotD2 = FALSE, ...)

Arguments

.v

a numeric vector containing eigenvalues or R-squared values.

cumulative

a boolean indicating whether or not r2 is cumulative.

plotD2

a boolean indicating whether or not the second derivative should be plotted

...

additional parameters to be passed to plot.

Details

The function attempts to find the biggest relative drop-off in variance for a set of principal components using a vector of eigenvalues or individual R-squared statistics for the principal components. In addition, this function plots a horizontal line representing the average contribution of the vector .v.

See Also

graphics::plot

Examples

1
2
3
4
5
## Example r-squared vector
r2Vec <- c(.2, .1, .65, .43, .21, .1, .07)

## Plot efficiency diagnostics
findRelativeElbow(r2Vec)

ppanko/immapTools documentation built on Nov. 21, 2019, 12:28 a.m.