Closed caitobrien closed 9 months ago
I added an Rmarkdown with different prediction types and an additional question about adding new data for predicting to the binomial model using (alive | trial) format and if I should set trials at a mean number or include a range of values. Here is the file link: compare_posteriorpredictions.Rmd ; located in HydroSurvDOYTEMP>examples>src
I think some of the answers you're looking for can be found here: https://www.andrewheiss.com/blog/2022/09/26/guide-visualizing-types-posteriors/
Let's chat some more...
Going forward selecting posterior_linpred
and setting a mean trial = 1 for predictions.
BRMS, and the wrapper function tidybayes, offer three different methods of posterior predictions (
posterior_predict()/predicted_draws()
,posterior_epred()/epred_draws()
, andposterior_linpred()/ linpred_draws()
). The guide by Andrew Heiss provides an explanation of each prediction and where it is drawing from the model and is summarized nicely in this image:However, I'm still unclear on when and why to choose one over the other and was hoping for more discussion. From your previous SurvDOY code, using the
predict()
with a glm,posterior_linpred(transform = TRUE)
most closely matches using a bayesian binomial model, with similar results usingposterior_epred
. Whereas, usingposterior_predict()
,predict()
, orpredicted_draws()
will all give a predicted response of no. of alive per trial and then I would need to calculate further for probability.I ran out of time at the end of the day, but I'll plan to add a paired-down script to highlight the differences. The guide is the main thing I'd like to discuss further so wanted to send that out now.