Open mz555 opened 8 months ago
Yeah an error/warning here would be good. Can you check and see if you call the underlying brms function (brms::posterior_epred
) no error/warning is generated? If that isn't generating a warning either then this is an issue for brms.
I was using tidybayes to plot some data from a
brms
model, and realised the figure looked off, but could not tell why, until I realised the term I provided inadd_epred_draws
forre_formula=
was misspelt.It would be good if the package threw an error message to alert the user to this issue.
Wrong code:
add_epred_draws(m1, re_formula = ~ (1 | item))
I used "item" with no capital. It showed no error when running the code, and only realised because my plot estimates were off.Correct code:
add_epred_draws(m1, re_formula = ~ (1 | Item))
Wrong plot
Correct plot
![image](https://github.com/mjskay/tidybayes/assets/25532449/cc745f58-9300-4234-b4f9-fdbdf5cb21c2)