Abstract type representing empirical Bayes estimation methods.
Nonparametric estimation
The typical call for estimating the prior \(G\) based on empirical Bayes samples Zs is the following,
StatsBase.fit(method, Zs)
Above, method is a type that specifies both the assumptions made on \(G\) (say, the convex prior class \(\mathcal{G}\) in which \(G\) lies), as well as details concerning the computation (typically a JuMP.jl compatible convex programming solver).
Nonparametric Maximum Likelihood estimation (NPMLE)
For example, let us consider the nonparametric maximum likelihood estimator:
Given \(n\) independent samples \(Z_i\) from the empirical Bayes problem with prior \(G\) known to lie in the convexclass\(\mathcal{G}\), estimate \(G\) by Nonparametric Maximum Likelihood (NPMLE)
where \(f_{i,G}(z) = \int p_i(z \mid \mu) dG(\mu)\) is the marginal density of the \(i\)-th sample. The optimization is conducted by a JuMP compatible solver.
Suppose we have Poisson samples Zs, each with a different mean \(\mu_i\) drawn from \(G=U[1,5]\):
Given \(n\) i.i.d. samples from the empirical Bayes problem with prior \(G\) known to lie in the convexclass\(\mathcal{G}\) , estimate \(G\) as follows: