BaşlayınÜcretsiz Başlayın

Define, compile, & simulate the regression model

Upon observing the relationship between weight \(Y\)i and height \(X\)i for the 507 subjects \(i\) in the bdims data set, you can update your posterior model of this relationship. To build your posterior, you must combine your insights from the likelihood and priors:

  • likelihood: \(Y\)i \(\sim N(m\)i, \(s^2)\) where \(m\)i \(= a + b X\)i
  • priors: \(a \sim N(0, 200^2)\), \(b \sim N(1, 0.5^2)\) and \(s \sim Unif(0, 20)\)

In this series of exercises, you'll define, compile, and simulate your Bayesian regression posterior. The bdims data are in your work space.

Bu egzersiz

Bayesian Modeling with RJAGS

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# DEFINE the model    
weight_model <- ___
Kodu Düzenle ve Çalıştır