boot.eigen: generate a bootstrap distribution of eigenvalues for a given...

View source: R/testMC.R

boot.eigenR Documentation

generate a bootstrap distribution of eigenvalues for a given matrix

Description

boot.eigen: generates a bootstrap distribution of eigenvalues for a given (rectangular) matrix.

Usage

boot.eigen(X, nIter = 100, center = TRUE, scale = "SS1")

Arguments

X

The original data matrix.

nIter

how many bootstrapped sets of eigenvalues to generate; Default: 100.

center

(Default = TRUE) if TRUE: center the data (by column).

scale

the type of scaling of the columns of data. Can be FALSE (no scaling), TRUE (scale as Z-scores with squared norm = I - 1), or 'SS1' (all columns of the data matrix have norm 1, and so the eigenvalues come from a correlation matrix). Default: 'SS1'.

Details

boot.eigen uses scale0 to normalize the data and so will not create NaN when the variance of a column is 0 (it will create a vector of 0s).

Value

a list with 3 elements

  1. $fixed.eigs: the eigen-values of X,

  2. $boot.eigs: an nIter by rank(X) matrix of the eigenvalues of the bootstrapped samples,

  3. $boot.eigs.sorted: an nIter by rank(X) matrix of the eigenvalues of the bootstrapped samples.

Author(s)

Hervé Abdi

See Also

scale0 monteCarlo.eigen

Examples

data(iris)
bootstapped.Eigenvalues <- boot.eigen(iris[,1:4], nIter = 10)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.