Learn R Programming

PCDimension (version 1.1.14)

compareAgDimMethods: Compare Methods to Divide Steps into "Long" and "Short"

Description

Auer and Gervini developed a Bayesian graphical method to determine the number \(d\) of significant principal components; a brief overview is included in the help for the AuerGervini class. The output of their method is a step function that displays the maximum a posteriori (MAP) choice of \(d\) as a step function of a one-parameter family of prior distributions, and they recommend choosing the highest "long" step. The functions described here help automate the process of dividing the step lengths into "long" and "short" classes.

Usage

compareAgDimMethods(object, agfuns)

Value

Returns an integer vector of te same length as the list of

agfuns, containing the number of significant principal components computed by each method.

Arguments

object

An object of the AuerGervini class

agfuns

A list of functions

Author

Kevin R. Coombes <krc@silicovore.com>, Min Wang <wang.1807@osu.edu>.

Details

This method simply iterates over the list of functions that implement different algorithms/methods to determine the PC dimension.

References

P Auer, D Gervini. Choosing principal components: a new graphical method based on Bayesian model selection. Communications in Statistics-Simulation and Computation 37 (5), 962-977

See Also

AuerGervini, agDimension.

Examples

Run this code
# simulate variances
lambda <- rev(sort(diff(sort(c(0, 1, runif(9))))))
# apply the Auer-Gervini method
ag <- AuerGervini(lambda, dd=c(3,10))
# try different methods
agfuns <- list(twice=agDimTwiceMean,
               km=agDimKmeans,
               cpt=agDimCPT)
compareAgDimMethods(ag, agfuns)

Run the code above in your browser using DataLab