Learn R Programming

cernn (version 0.1)

get_alpha: Compute alpha parameter for covariance regularization.

Description

get_alpha computes the alpha parameter that shrinks eigenvalues of the sample covariance to their grand mean.

Usage

get_alpha(X)

Arguments

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

Examples

Run this code
n <- 10
p <- 5
set.seed(12345)
X <- matrix(rnorm(n*p),n,p)
get_alpha(X)

Run the code above in your browser using DataLab