Exercise

# Inference for the Poisson rate parameter

Again, recall the likelihood structure for your Bayesian Poisson regression model of volume \(Y\)_{i} by weekday status \(X\)_{i} and temperature \(Z\)_{i}:

\(Y\)_{i} \(\sim Pois(l\)_{i}) where \(l\)_{i}\( \; = exp(a + b \; X\)_{i} \(+ c \; Z\)_{i}\()\)

Your 10,000 iteration RJAGS simulation of the model posterior, `poisson_sim`

, is in your workspace along with a data frame of the Markov chain output:

```
> head(poisson_chains, 2)
a b.1. b.2. c
1 5.019807 0 -0.1222143 0.01405269
2 5.018642 0 -0.1217608 0.01407691
```

Using these 10,000 unique sets of posterior plausible values for parameters \(a\), \(b\), and \(c\) you will make inferences about the typical trail volume on **80 degree days**.

Instructions

**100 XP**

From each set of

`poisson_chains`

parameter values, calculate the typical trail volumes \(l\) on an 80 degree weekend day. Store these trends as a new variable,`l_weekend`

, in`poisson_chains`

.Similarly, calculate the typical trail volumes on an 80 degree weekday. Store these as a new variable,

`l_weekday`

.Calculate 95% posterior credible intervals for the typical volume on an 80 degree weekend day and the typical volume on an 80 degree weekday.