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

Define, compile, & simulate the Normal-Normal

Upon observing the change in reaction time \(Y\)i for each of the 18 subjects \(i\) enrolled in the sleep study, you can update your posterior model of the effect of sleep deprivation on reaction time. This requires the combination of insight from the likelihood and prior models:

  • likelihood: \(Y\)i \(\sim N(m, s^2)\)
  • priors: \(m \sim N(50, 25^2)\) and \(s \sim Unif(0, 200)\)

In this series of exercises, you'll define, compile, and simulate your Bayesian posterior. The observed sleep_study 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    
___ <- "model{
    # Likelihood model for Y[i]
    for(i in 1:___) {
        Y[i] ~ ___
    }

    # Prior models for m and s
    m ~ ___
    s ~ ___
}"
Kodu Düzenle ve Çalıştır