of 14/14
Lecture 16 MCMC for Poisson response models

Lecture 16 MCMC for Poisson response models. Lecture Contents Multilevel Poisson Model MCMC Algorithms for Poisson Models MLwiN for Poisson models WinBUGS

  • View
    243

  • Download
    1

Embed Size (px)

Text of Lecture 16 MCMC for Poisson response models. Lecture Contents Multilevel Poisson Model MCMC...

  • Slide 1

Lecture 16 MCMC for Poisson response models Slide 2 Lecture Contents Multilevel Poisson Model MCMC Algorithms for Poisson Models MLwiN for Poisson models WinBUGS for Poisson models Comparisons Slide 3 Multilevel Poisson model The Poisson distribution is used to model count data. It is often used in disease data as an approximation to the Binomial distribution where the exposure (number of trials) is used as an offset variable. In the practical we will look in detail at a veterinary epidemiology dataset on TB cases in animal herds in Canada. Here the response is the number of cases of TB in the period 1985 to 1994 in herds of cattle, cervids and bison. Note that the data contains only herds which were infected in outbreaks of TB and the data has been falsified to meet confidentiality regulations. Slide 4 Multilevel Poisson Regression A multilevel Poisson regression model can be written as follows: You will notice the offset (log(exp ij )) which in the TB example is the number of animal days at risk in the group. Including this offset allows comparison of rates rather than number of cases which is more sensible as otherwise the model will simply predict that more cases are seen in herds with more days at risk! Slide 5 Bayesian Multilevel Poisson model To extent the model into a Bayesian framework we need to include priors for the fixed effects and between herd variance. We will use the standard diffuse priors as shown below: Slide 6 MCMC Algorithm Our MLwiN algorithm has 3 steps: 1. Generate i by Univariate Normal MH Sampling in MLwiN or Gamerman method in WinBUGS. 2. Generate each u j by Univariate Normal MH Sampling in MLwiN or AR sampling in WinBUGS. 3. Generate 1/ u 2 from its Gamma conditional distribution. Slide 7 A final model for TB-Real ? We will consider here only the following model for the dataset which contains all feasible predictors. The model to the right has been fitted using 1 st order MQL estimation. Note: to construct this model you will need to make predictors categorical via the Names window and construct the offset via the Calculate window. Slide 8 MLwiN MH Estimation Using MH in MLwiN gives the following estimates after 50,000 iterations: Slide 9 Trajectories plot The (thinned) trajectories are as follows: Slide 10 WinBUGS code model { # Level 1 definition for(i in 1:N) { reactors[i] ~ dpois(mu[i]) log(mu[i])