tpowerPCACV {EESPCA}R Documentation

Sparsity parameter selection for the Yuan and Zhang TPower method using cross-validation.

Description

Sparsity parameter selection for PCA-based TPower using the cross-validation approach of Witten et al. as implemented by the SPC.cv method in the PMA package.

Usage

    tpowerPCACV(X, k.values, nfolds=5)

Arguments

X

n-by-p data matrix being evaluated via PCA.

k.values

Set of truncation parameter values to evaluate via cross-validation. Values must be between 1 and p.

nfolds

Number of folds for cross-validation

Value

k value that generated the smallest cross-validation error.

References

See Also

tpower,PMA{SPC.cv}

Examples

    set.seed(1)
    # Simulate 10x5 MVN data matrix
    X=matrix(rnorm(50), nrow=10)
    # Generate range of k values to evaluate
    k.values = 1:5
    # Use 5-fold cross-validation to estimate optimal k value
    tpowerPCACV(X=X, k.values=k.values)

[Package EESPCA version 0.7.0 Index]