vasishth / bayescogsci

Draft of book entitled An Introduction to Bayesian Data Analysis for Cognitive Science by Nicenboim, Schad, Vasishth
100 stars 27 forks source link

Error / typo in 5.2.5. #48

Closed inigourrestarazu closed 1 year ago

inigourrestarazu commented 1 year ago

There's a mistake in the code of this priors in section 5.2.5.

  c(
    prior(normal(0, 10), class = Intercept),
    prior(normal(0, 10), class = b, coef = c_cloze),
    prior(normal(0, 50), class = sigma),
    prior(normal(0, 20),
      class = sd, coef = Intercept,
      group = subj
    ),
    prior(normal(0, 20),
      class = sd, coef = c_cloze,
      group = subj
    ),
    prior(lkj(2), class = cor, group = subject),
    prior(normal(0, 20),
      class = sd, coef = Intercept,
      group = item
    ),
    prior(normal(0, 20),
      class = sd, coef = c_cloze,
      group = item
    ),
    prior(lkj(2), class = cor, group = item)
  )
fit_N400_sih <- brm(n400 ~ c_cloze + (c_cloze | subj) +
                      (c_cloze | item),
                    prior = prior_sih_full,
                    data = df_eeg)

In the first covariance prior it's subj, not subject

bnicenboim commented 1 year ago

thanks!!

Should I add you the acknowledgements as Inigo Urrestarazu? (or Iñigo, or something else?)

inigourrestarazu commented 1 year ago

Either Iñigo or Inigo is fine. It's Iñigo officially, but I'm in so many countries...

Thank you very much for the amazing book :)