Description Usage Arguments Value
These functions are wrapper around RStanARM's prediction functions that
return a long tidy dataframe of model predictions.
augment_posterior_predict()
wraps rstanarm::posterior_predict()
and
augment_posterior_linpred()
wraps rstanarm::posterior_predict()
.
1 2 3 | augment_posterior_predict(model, newdata = NULL, ..., nsamples = NULL)
augment_posterior_linpred(model, newdata = NULL, ..., nsamples = NULL)
|
model |
a model fit with RStanARM |
newdata |
a dataframe of new observations to generate predictions. If omitted or null, the original data-set used to fit the model is used for the predictions. |
... |
other arguments passed to |
nsamples |
number of samples to draw from the posterior. Defaults to the full number of samples. |
a data-frame (a tibble::tibble()
) of posterior predictions. The
dataset used to generate the predictions is augmented with posterior
predictions, so that there is row per posterior prediction per observation.
Additionaly columns are included: .observation
uniquely identifies rows
from the prediction data-set, .draw
is the posterior sample number, and
.posterior_value
is the predicted value for that .observation
in that
.draw
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.