
Parametric empirical Bayes shrinkage (Morris 1983)
Source:R/verification_ports_native.R
morie_empirical_bayes.RdNormal-normal shrinkage that estimates the prior mean and shrinks toward it, not toward zero. The prior mean's profile MLE is the precision-weighted mean of the estimates; \(\tau^2\) maximises the marginal likelihood.
References
Morris, C. N. (1983). Parametric empirical Bayes inference: theory and applications. Journal of the American Statistical Association, 78(381), 47-55.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_empirical_bayes(V, V)
#> $shrunk_estimates
#> [1] 1.779362 1.779400 1.779403 1.779403 1.779403 1.779402 1.779402 1.779401
#>
#> $tau2
#> [1] 4.54021e-05
#>
#> $shrinkage_factors
#> [1] 0.9999546 0.9999886 0.9999950 0.9999972 0.9999982 0.9999987 0.9999991
#> [8] 0.9999993
#>
#> $grand_mean
#> [1] 1.779397
#>
#> $k
#> [1] 8
#>