computeApproxNormSquaredEigenvector {EESPCA}R Documentation

Approximates the normed squared eigenvector loadings

Description

Approximates the normed squared eigenvector loadings using a simplified version of the formula associating normed squared eigenvector loadings with the eigenvalues of the full matrix and sub-matrices.

Usage

    computeApproxNormSquaredEigenvector(cov.X, v1, lambda1, max.iter=5, 
        lambda.diff.threshold=1e-6, trace=FALSE)

Arguments

cov.X

Covariance matrix.

v1

Principal eigenvector of cov.X, i.e, the loadings of the first PC.

lambda1

Largest eigenvalue of cov.X.

max.iter

Maximum number of iterations for power iteration method when computing sub-matrix eigenvalues. See description powerIteration.

lambda.diff.threshold

Threshold for exiting the power iteration calculation. See description powerIteration.

trace

True if debugging messages should be displayed during execution.

Value

Vector of approximate normed squared eigenvector loadings.

See Also

eespca,powerIteration

Examples

    set.seed(1)
    # Simulate 10x5 MVN data matrix
    X=matrix(rnorm(50), nrow=10)
    # Estimate covariance matrix
    cov.X = cov(X)
    # Compute eigenvectors/values
    eigen.out = eigen(cov.X)
    v1 = eigen.out$vectors[,1]
    lambda1 = eigen.out$values[1]
    # Print true squared loadings
    v1^2
    # Compute approximate normed squared eigenvector loadings
    computeApproxNormSquaredEigenvector(cov.X=cov.X, v1=v1,
        lambda1=lambda1)  

[Package EESPCA version 0.7.0 Index]