cpve {epca}R Documentation

Cumulative Proportion of Variance Explained (CPVE)

Description

Calculate the CPVE.

Usage

cpve(x, v, is.cov = FALSE)

Arguments

x

matrix or Matrix, the original data matrix or the Gram matrix.

v

matrix or Matrix, coefficients of linear transformation, e.g., loadings (in PCA).

is.cov

logical, whether the input matrix is a covariance matrix (or a Gram matrix).

Value

a numeric vector of length ncol(v), the i-th value is the CPVE of the first i columns in v.

See Also

pve

Examples

## use the "swiss" data
## find two sparse PCs
s.sca <- sca(swiss, 2, gamma = sqrt(ncol(swiss)))
ld <- loadings(s.sca)
cpve(as.matrix(swiss), ld)


[Package epca version 1.1.0 Index]