TuneExplainedVarianceCov: Tuning function (covariance)

View source: R/internal.R

TuneExplainedVarianceCovR Documentation

Tuning function (covariance)

Description

Computes the difference in absolute value between the desired and observed proportion of explained variance from the first Principal Component of a Principal Component Analysis applied on the covariance matrix. The precision matrix is obtained by adding u to the diagonal of a positive semidefinite matrix. This function is used to find the value of the constant u that generates a covariance matrix with desired proportion of explained variance.

Usage

TuneExplainedVarianceCov(u, ev_xx = NULL, lambda)

Arguments

u

constant u added to the diagonal of the precision matrix.

ev_xx

desired proportion of explained variance. If ev_xx=NULL, the obtained proportion of explained variance is returned.

lambda

eigenvalues of the positive semidefinite precision matrix.

Value

The absolute difference in proportion of explained variance (if ev_xx is provided) or observed proportion of explained variance (if ev_xx=NULL).


fake documentation built on April 14, 2023, 12:37 a.m.