Learn R Programming

GGMncv (version 2.1.2)

ledoit_wolf: Ledoit and Wolf Shrinkage Estimator

Description

Compute the Ledoit and Wolf shrinkage estimator of the covariance matrix ledoit2004wellGGMncv, which can be used for the initial inverse covariance matrix in ggmncv.

Usage

ledoit_wolf(Y, ...)

Value

Inverse correlation matrix.

Arguments

Y

A data matrix (or data.frame) of dimensions n by p.

...

Currently ignored.

References

Examples

Run this code

# ptsd
Y <- ptsd[,1:5]

# shrinkage
ledoit_wolf(Y)

# non-reg
solve(cor(Y))

Run the code above in your browser using DataLab