Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lik_pois

Likelihood object for Poisson error distribution


Description

Creates a likelihood object for ash for use with Poisson error distribution

Usage

lik_pois(y, scale = 1, link = c("identity", "log"))

Arguments

y

Poisson observations.

scale

Scale factor for Poisson observations: y~Pois(scale*lambda).

link

Link function. The "identity" link directly puts unimodal prior on Poisson intensities lambda, and "log" link puts unimodal prior on log(lambda).

Details

Suppose we have Poisson observations y where y_i\sim Poisson(c_iλ_i). We either put an unimodal prior g on the (scaled) intensities λ_i\sim g (by specifying link="identity") or on the log intensities logit(λ_i)\sim g (by specifying link="log"). Either way, ASH with this Poisson likelihood function will compute the posterior mean of the intensities λ_i.

Examples

beta = c(rnorm(100,50,5)) # prior mode: 50
   y = rpois(100,beta) # simulate Poisson observations
   ash(rep(0,length(y)),1,lik=lik_pois(y))

ashr

Methods for Adaptive Shrinkage, using Empirical Bayes

v2.2-47
GPL (>= 3)
Authors
Matthew Stephens [aut], Peter Carbonetto [aut, cre], Chaoxing Dai [ctb], David Gerard [aut], Mengyin Lu [aut], Lei Sun [aut], Jason Willwerscheid [aut], Nan Xiao [aut], Mazon Zeng [ctb]
Initial release
2020-02-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.