MulaiMulai sekarang secara gratis

RJAGS simulation for Poisson regression

In the previous video we engineered a Poisson regression model of volume \(Y\)i by weekday status \(X\)i and temperature \(Z\)i:

  • likelihood: \(Y\)i \(\sim Pois(l\)i) where \(log(l\)i\() = a + b X\)i \(+ c Z\)i
  • priors: \(a \sim N(0, 200^2)\), \(b \sim N(0, 2^2)\), and \(c \sim N(0, 2^2)\)

Combining your insights from the observed RailTrail data and the priors stated here, you will define, compile, and simulate a posterior model of this relationship using RJAGS. To challenge yourself in this last RJAGS simulation of the course, you'll be provided with less helpful code than usual!

The RailTrail data are in your work space.

Latihan ini adalah bagian dari kursus

Bayesian Modeling with RJAGS

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# DEFINE the model    
poisson_model <- 
Edit dan Jalankan Kode