Unifying names of output columns in bayesplot / tidybayes / etc


Thanks everyone for the help! Since my last proposal seems to have some consensus, I’m going with it. I have created a tidybayes issue here to continue this on my end.

Relatedly, I am curious what people would ideally name a function that outputs draws from posterior_linpred(). Currently tidybayes has these functions:

  • add_fitted_samples() (from posterior_linpred())
  • add_predicted_samples() (from posterior_predict())

However, I don’t like the “fitted” terminology, and would rather not continue mis-using the word “samples”, so I was thinking of changing these as follows:

  • add_fitted_samples() -> add_linpred_draws()
  • add_predicted_samples() -> add_predicted_draws()

BUT the “linpred” name is a little odd itself (it is not always linear, and as Michael points out these are pushforward realizations, not predictions per se). So maybe this instead:

  • add_fitted_samples() -> add_pushforward_draws()

Or something else entirely. Any thoughts?


Just some a quick thought… I don’t mind fitted because fitted() and fitted.values() are functions used in R to get predictions. ?glm also says the model objects use fitted.values to store transformed linear predictions and linear.predictors to store linear predictions. Fitted builds on familiar terminology, unlike pushforward values.


Hmm, fair. I’ll probably stick to fitted_draws for now, and and maybe make linpred_draws an alias for folks used to posterior_linpred.