Empirikos

ἐμπειρικός: “experienced” in ancient Greek, etymology of empirical

Empirical Bayes estimation and inference in Julia.

Consider \(n\) independent samples \(Z_i\) drawn from the following hierarchical model \[ \mu_i \sim G, \ \ Z_i \sim p_i(\cdot \mid \mu_i). \] Here \(G\) is the unknown prior (effect size distribution) and \(p_i(\cdot \mid \mu_i),i=1,\dotsc,n\) are known likelihood functions.

This package provides a unified framework for estimation and inference under the above setting, which is known as the empirical Bayes problem (Robbins 1956).

Installation

The package is available from the Julia registry. It may be installed on Julia version 1.10 as follows:

using Pkg
Pkg.add("Empirikos")

For some of its functionality, this package requires a convex programming solver. The requirement for such a solver is that it can solve second order conic programs (SOCP), that it returns the dual variables associated with the SOCP constraints and that it is supported by JuMP.jl. We recommend using the MOSEK solver through the MosekTools.jl package. MOSEK is a commercial solver, but provides free academic licenses. An open-source alternative is Hypatia.jl.

Modularity

This package has been designed with the goal of modularity. Specialized code (using Julia’s multiple dispatch) can be easily added to more efficiently handle different combinations of estimation targets, statistical algorithms, classes of priors and likelihoods. Please open an issue if there is a combination thereof that you would like to use (and which does not work currently or is slow).

References

Johnstone, Iain M, and Bernard W Silverman. 2005. “EbayesThresh: R and s-Plus Programs for Empirical Bayes Thresholding.” Journal of Statistical Software 12: 1–38.
Koenker, Roger, and Jiaying Gu. 2017. “REBayes: Empirical Bayes Mixture Methods in r.” Journal of Statistical Software 82 (8): 1–26.
Narasimhan, Balasubramanian, and Bradley Efron. 2020. “deconvolveR: A g-Modeling Program for Deconvolution and Empirical Bayes Estimation.” Journal of Statistical Software 94 (1): 1–20.
Robbins, Herbert. 1956. “An Empirical Bayes Approach to Statistics.” Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics.
Stephens, Matthew. 2016. “False Discovery Rates: A New Deal.” Biostatistics 18 (2): 275–94.