Fit an empirical Bayes prior in the hierarchical model mu ~ G, X ~ N(mu, sigma^2)
gfit(X, sigma, p = 2, nbin = 1000, unif.fraction = 0.1)a vector of observations
noise estimate
tuning parameter -- number of parameters used to fit G
tuning parameter -- number of bins used for discrete approximation
tuning parameter -- fraction of G modeled as "slab"
posterior density estimate g
For more details about "g-estimation", see: B Efron. Two modeling strategies for empirical Bayes estimation. Stat. Sci., 29(2): 285<U+2013>301, 2014.