So you want to correlate the random effects per participant? This is easy by stacking and having a term of the form (0 + type | person) where type is either correct or error.
Just to make sure Iām not misunderstanding.
I can doā¦
score ~ 0 + event + (0 + event | trial) + (0 + event | person)
(0 + event | trial): this gives me separate between-item variances for correct trials and error trials and the covariance
(0 + event | person): separate variance estimates for between-person variances for correct and error trials and the covariance
But, I only get a single residual variance estimate (sigma) for the whole model. I need separate residual variances for correct and error trial estimates and the covariance between sigmas. Am I messing up the brms formula somehow?
Also, thanks for the quick replies and for thinking this through with me :) I appreciate it!
Use brms distributional syntax a la sigma ~ ā¦ for this purpose
Excellent!! Youāve changed my life :) Thank you so much for your help.
For posterity:
I now useā¦
bf(score ~ 0 + event +
(0 + event | trial) + (0 + event | id2),
sigma ~ 0 + (0 + event | id2))
This gives me separate residual variances for each event and the covariance (cor(sigma_eventcorrect, sigmaevent_error).
Thanks again, @paul.buerkner!
Hi @paul.buerkner. Sorry, Iām back.
The sigmas (residual variance) for each event are remarkably small (~4) compared to the univariate brms model variances (~55) that are run separately on each scores from each event.
I ended up usingā¦
bf(score ~ 0 + event + (0 + event | trial) + (0 + event | id), sigma ~ 0 + event)
I donāt think I needed sigma ~ 0 + (0 + event | id)
like I wrote in my previous post, because I only need population-level estimates for residual (co)variance.
I donāt know if anything strikes you as incorrectly written in this formula. Iāll keep tinkering to see if I can figure it out. So close!
Thanks!
This seems unlikely. For correct computation of the transformed mean, do the exponentiation per posterior draws and only summarized afterwards. If this does not solve the problem, there may be another issue but I fail to see what that might be right now.
Sorry. I knew that, but I summarized the model incorrectly in my previous post. Yes, the sigmas are estimated to be ~2, which exp(2) = 7.4.
Gotcha. Thanks again. Iāll look into it.