In R
we can "prior weight" a glm
regression via the weights parameter. For example:
glm.D93 <- glm(counts ~ outcome + treatment, family = poisson(), weights=w)
How can this be accomplished in a JAGS
or BUGS
model?
I found some paper discussing this, but none of them provides an example. I'm interested mainly into Poisson and logistic regression examples.
Best Answer
It might be late... but,
Please note 2 things:
In Jags, Bugs, Stan, proc MCMC, or in Bayesian in general, the likelihood is not different than in frequentist lm or glm (or any model), it is just the same !! Just create a new column "weight" for your response, and write the likelihood as
Or a weighted poisson:
This Bugs/Jags code would simply to the trick. You will get everything correct. Don't forget to continue multiplying the posterior of tau by the weight, for instance when making prediction and confidence/prediction intervals.