pev: Proportion of variance explained by non orthogonal principal...

View source: R/pev.R

pevR Documentation

Proportion of variance explained by non orthogonal principal components

Description

This function calculates the proportion of variance explained by not necessarily orthogonal principal components, using the optimal projected variance (optVar).

Usage

pev(x)

Arguments

x

a object of class sparsePCA.

Details

The object x is the output of sparsePCA or groupsparsePCA. The variance of the not necessarily orthogonal principal components in x is calculated with the optimal projected variance definition and is divided by the total variance of the data to get a proportion of explained variance (pev).

Value

The proportion of variance explained by each principal components.

References

M. Chavent, G. Chavent. Optimal Projected Variance Group-Sparse Block PCA. 2021. ⟨hal-03125264⟩

See Also

optVardim, explainedVar, sparsePCA, groupsparsePCA,

Examples

data(protein)
x <- sparsePCA(protein, 2, c(0.5,0.5))
pev(x)
x <- groupsparsePCA(protein, 2, index=1:ncol(protein), c(0.5,0.5))
pev(x)

chavent/sparsePCA documentation built on Feb. 2, 2023, 1:12 p.m.