mjskay / tidybayes

Bayesian analysis + tidy data + geoms (R package)
http://mjskay.github.io/tidybayes
GNU General Public License v3.0
718 stars 59 forks source link

How to add already made predictions to data frame #173

Closed PhoenixB closed 5 years ago

PhoenixB commented 5 years ago

Dear Matthey,

Is it possible to add already calculated predictions from a brms model, i.e. pp_average.brmsfit() in a tidy format to the original data frame circumventing add_predicted_draws()?

Kindest regards, Pascal

mjskay commented 5 years ago

Yes, certainly! That is what add_draws() is for. You would need to use summary = FALSE with pp_average(). Let me know if you have trouble getting it to work.

PhoenixB commented 5 years ago

Ah cool! This one slipped my attention! Thank you very much! I suppose it is also possible with ordinal brms models? Edit: it definitely works! Thanks!