cernn: Compute the regularization path for Covariance Estimate...

Description Usage Arguments References See Also Examples

Description

cernn performs stable covariance estimation over a grid of regularization parameters.

Usage

1
cernn(X, lambda, alpha)

Arguments

X

The data matrix whose rows are observations and columns are covariates.

lambda

vector of regularization parameters controling amount of shrinkage towards the target.

alpha

Parameter that controls mixture between the trace and inverse trace penalties.

References

Eric C. Chi and Kenneth Lange, Stable estimation of a covariance matrix guided by nuclear norm penalties, Computational Statistics and Data Analysis, 80:117-128, 2014.

See Also

get_alpha, shrink_eigen, select_lambda

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 10
p <- 5
set.seed(12345)
X <- matrix(rnorm(n*p),n,p)
alpha <- get_alpha(X)
lambda <- 10**(seq(-1,4,length.out=100))
sol_path <- cernn(X,lambda,alpha)
df <- t(sol_path$e)

## Plot regularization paths of eigenvalues
matplot(x=log10(lambda),y=df,type='l',ylab='shrunken eigenvalue')
grand_mean <- (norm(scale(X,center=TRUE,scale=FALSE),'f')**2)/(n*p)
abline(h=grand_mean)

cernn documentation built on May 2, 2019, 6 a.m.

Related to cernn in cernn...