| lik_pois | R Documentation |
Creates a likelihood object for ash for use with Poisson error distribution
lik_pois(y, scale = 1, link = c("identity", "log"))
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). |
Suppose we have Poisson observations y where y_i\sim Poisson(c_i\lambda_i).
We either put an unimodal prior g on the (scaled) intensities \lambda_i\sim g
(by specifying link="identity") or on the log intensities
log(\lambda_i)\sim g (by specifying link="log"). Either way,
ASH with this Poisson likelihood function will compute the posterior mean of the
intensities \lambda_i.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.