rifleInit {EESPCA}R Documentation

Computes the initial eigenvector for the rifle method of Tan et al.

Description

Computes the initial eigenvector for the rifle method of Tan et al. (as implemented by the rifle method in the rifle R package) using the initial.convex method from the rifle package with lambda=sqrt(log(p)/n) and K=1.

Usage

    rifleInit(X)

Arguments

X

n-by-p data matrix to be evaluated via PCA.

Value

Initial eigenvector to use with rifle method.

References

See Also

riflePCACV, rifle{rifle}, rifle{initial.convex}

Examples

    set.seed(1)
    # Simulate 10x5 MVN data matrix
    X=matrix(rnorm(50), nrow=10)
    # Compute initial eigenvector to use with rifle method
    v1.init = rifleInit(X)
    # Use with rifle method to get first PC loadings with 2 non-zero elements
    rifle(A=cov(X), B=diag(5), init=v1.init, k=2)

[Package EESPCA version 0.7.0 Index]