We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Jim Grange • 1 year ago

Thanks for the really informative post, Martin. When I try to implement the first "crazy model" fit_mix_all, how do you extract the participant-level deviations for mix? The usual ranef() in brms is not providing output. In addition, I am getting the warning message

Argument 'autocor' should be specified within the 'formula' argument. See ?brmsformula for help.

I'm not sure then whether due to this it bypasses estimating the random effects?

Ladislas Nalborczyk • 4 years ago

Thank you very much for writing (and sharing) this excellent blogpost, I have learned a lot!

I am trying to reproduce these analyses and I am stuck with reproducing the posterior predictive checks... I have sourced your code on Github (i.e., https://raw.githubuserconte... but I get the following error when using the pp_check() method on the mixture model: "Error in runif(n) : invalid arguments".

Any idea why and how to solve it? The problem seems to come from the argument passed to rRTmixture() when simulating data from the posterior estimates. Could it come from the change of name from "nsamples" to "ndraws" in brms?

Martin ModrĂ¡k • 4 years ago

Indeed, this is related to the change, thanks very much for noticing. I updated the code to `ndraws` and it should now work with the latest brms.

Ladislas Nalborczyk • 4 years ago

Excellent, it works perfectly, thanks again!