eclairs: Estimate covariance/correlation with low rank and shrinkage

View source: R/eclairs.R

eclairsR Documentation

Estimate covariance/correlation with low rank and shrinkage

Description

Estimate the covariance/correlation between columns as the weighted sum of a low rank matrix and a scaled identity matrix. The weight acts to shrink the sample correlation matrix towards the identity matrix or the sample covariance matrix towards a scaled identity matrix with constant variance. An estimate of this form is useful because it is fast, and enables fast operations downstream.

Usage

eclairs(
  X,
  k,
  lambda = NULL,
  compute = c("covariance", "correlation"),
  warmStart = NULL
)

Arguments

X

data matrix with n samples as rows and p features as columns

k

the rank of the low rank component

lambda

shrinkage parameter. If not specified, it is estimated from the data.

compute

compute the 'covariance' (default) or 'correlation'

warmStart

result of previous SVD to initialize values

Details

Compute U, d^2 to approximate the covariance/correlation matrix between columns of data matrix X by U diag(d^2 (1-λ)) U^T + diag(ν * λ). When computing the covariance matrix ν is the constant variance which is the mean of all feature-wise variances. When computing the correlation matrix, ν = 1.

Value

eclairs object storing:

  • U: orthonormal matrix with k columns representing the low rank component

  • dSq: eigen-values so that U diag(d^2) U^T is the low rank component

  • lambda: shrinkage parameter λ for the scaled diagonal component

  • nu: diagonal value, ν, of target matrix in shrinkage

  • n: number of samples (i.e. rows) in the original data

  • p: number of features (i.e. columns) in the original data

  • k: rank of low rank component

  • rownames: sample names from the original matrix

  • colnames: features names from the original matrix

  • method: method used for decomposition

  • call: the function call


GabrielHoffman/mvBIC documentation built on Sept. 5, 2022, 1:57 a.m.