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

typo in code (section 4.2.2) #44

Closed noestetie closed 1 year ago

noestetie commented 1 year ago

I think there's a typo in the code in section 4.2.2. In 4.2.1. there's a model with a dummy dataset that takes 't' as the dependent variable. Then we run the model with the original dataset in 4.2.2 and the dependent variable is no longer 't', but rather 'rt'. So, the code is:

fit_press_trial <- brm(t ~ 1 + c_trial, data = df_spacebar, family = lognormal(), prior = c( prior(normal(6, 1.5), class = Intercept), prior(normal(0, 1), class = sigma), prior(normal(0, .01), class = b, coef = c_trial) ) )

But actually should be:

fit_press_trial <- brm(rt ~ 1 + c_trial, data = df_spacebar, family = lognormal(), prior = c( prior(normal(6, 1.5), class = Intercept), prior(normal(0, 1), class = sigma), prior(normal(0, .01), class = b, coef = c_trial) ) )

bnicenboim commented 1 year ago

I changed the dataset in bcogsci, it should be now t rather than rt, can you check it if you install bcogsci again

noestetie commented 1 year ago

Yes! Now it's working with the t. Thanks!