Learn R Programming

randomForestCI (version 1.0.0)

gfit: Fit an empirical Bayes prior in the hierarchical model mu ~ G, X ~ N(mu, sigma^2)

Description

Fit an empirical Bayes prior in the hierarchical model mu ~ G, X ~ N(mu, sigma^2)

Usage

gfit(X, sigma, p = 2, nbin = 1000, unif.fraction = 0.1)

Arguments

X

a vector of observations

sigma

noise estimate

p

tuning parameter -- number of parameters used to fit G

nbin

tuning parameter -- number of bins used for discrete approximation

unif.fraction

tuning parameter -- fraction of G modeled as "slab"

Value

posterior density estimate g

References

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.