Estimate shrinkage parameter by empirical Bayes

estimate_lambda_eb(ev, n, p, nu, lambda = NULL)

Arguments

ev

array of eigen values

n

number of samples

p

number of features

nu

scale of prior covariance matrix

lambda

(default: NULL) If NULL, estimate lambda from data. Else evaluate logML using specified lambda value.

Value

value \(\lambda\) indicating the shrinkage between sample and prior covariance matrices.

Details

Estimate shrinkage parameter for covariance matrix estimation using empirical Bayes method (Hannart and Naveau, 2014; Leday and Richardson, 2019). The shrinage estimate of the covariance matrix is \((1-\lambda)\hat\Sigma + \lambda \nu I\), where \(\hat\Sigma\) is the sample covariance matrix, given a value of \(lambda\). A large value of \(\lambda\) indicates more weight on the prior.

Examples

ev = c(10, 2, 1) # eigen values
n = 12 # samples
p = 3 # features
nu = 2 # scale of target covariance

mvIC:::estimate_lambda_eb(ev, n, p, nu)
#> $lambda
#> [1] 0.03382632
#> 
#> $logML
#> [1] -30.95033
#>