scree: How many axes to retain this much of variance or trace ?

screeR Documentation

How many axes to retain this much of variance or trace ?

Description

A set of functions around PCA/LDA eigen/trace. scree calculates their proportion and cumulated proportion; scree_min returns the minimal number of axis to use to retain a given proportion; scree_plot displays a screeplot.

Usage

scree(x, nax)

## S3 method for class 'PCA'
scree(x, nax)

## S3 method for class 'LDA'
scree(x, nax)

scree_min(x, prop)

scree_plot(x, nax)

Arguments

x

a PCA object

nax

numeric range of axes to consider. All by default for scree_min, display until 0.99 for scree_plot

prop

numeric how many axes are enough to gather this proportion of variance. Default to 1, all axes are returned defaut to 1: all axis are returned

Value

scree returns a data.frame, scree_min a numeric, scree_plot a ggplot.

Examples

# On PCA
bp <- PCA(efourier(bot))
scree(bp)
scree_min(bp, 0.99)
scree_min(bp, 1)

scree_plot(bp)
scree_plot(bp, 1:5)

# on LDA, it uses svd
bl <- LDA(PCA(opoly(olea)), "var")
scree(bl)


Momocs documentation built on Nov. 13, 2023, 5:07 p.m.

Related to scree in Momocs...