estimate_lambda_eb | R Documentation |
Estimate shrinkage parameter by empirical Bayes
estimate_lambda_eb(ev, n, p, nu, lambda = NULL)
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. |
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-λ)\hatΣ + λ ν I, where \hatΣ is the sample covariance matrix, given a value of lambda. A large value of λ indicates more weight on the prior.
value λ indicating the shrinkage between sample and prior covariance matrices.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.