ash_pois {ashr} | R Documentation |
Performs adaptive shrinkage on Poisson data
Description
Uses Empirical Bayes to fit the model
with
where is a specified link function (either "identity" or "log" are permitted).
Usage
ash_pois(y, scale = 1, link = c("identity", "log"), ...)
Arguments
y |
vector of Poisson observations. |
scale |
vector of scale factors for Poisson observations: the model is |
link |
string, either "identity" or "log", indicating the link function. |
... |
other parameters to be passed to ash |
Details
The model is fit in two stages: i) estimate by maximum likelihood (over the set of symmetric
unimodal distributions) to give estimate
;
ii) Compute posterior distributions for
given
.
Note that the link function
affects the prior assumptions (because, e.g., assuming a unimodal prior on
is
different from assuming unimodal on
), but posterior quantities are always computed for the
for
and *not*
.
Examples
beta = c(rep(0,50),rexp(50))
y = rpois(100,beta) # simulate Poisson observations
y.ash = ash_pois(y,scale=1)
[Package ashr version 2.2-63 Index]