get_lambda_max: Compute lambda_max parameter for covariance regularization.

Description Usage Arguments Examples

Description

get_lambda_max computes a maximum lambda value that will shrink eigenvalues nearly to the grand mean.

Usage

1
get_lambda_max(d, alpha, n, eps = 0.01)

Arguments

d

Vector of sample eigenvalues to shrink. These must be nonnegative.

alpha

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

n

The number of observations.

eps

tolerance

Examples

1
2
3
4
5
6
7
n <- 10
p <- 5
set.seed(12345)
X <- matrix(rnorm(n*p),n,p)
d <- svd(X)$d**2
alpha <- get_alpha(X)
get_lambda_max(d,alpha,n)

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

Related to get_lambda_max in cernn...