R/predicted_draws.R
predicted_draws.ulam.Rd
Adds draws from the posterior predictive distribution of a rethinking model to a data frame.
Provides support for tidybayes::predicted_draws()
/ tidybayes::add_predicted_draws()
for
models from the rethinking
package.
# S3 method for ulam predicted_draws( object, newdata, value = ".prediction", ..., ndraws = NULL, seed = NULL, re_formula = NULL, category = ".category" ) # S3 method for quap predicted_draws( object, newdata, value = ".prediction", ..., ndraws = NULL, seed = NULL, re_formula = NULL, category = ".category" ) # S3 method for map predicted_draws( object, newdata, value = ".prediction", ..., ndraws = NULL, seed = NULL, re_formula = NULL, category = ".category" ) # S3 method for map2stan predicted_draws( object, newdata, value = ".prediction", ..., ndraws = NULL, seed = NULL, re_formula = NULL, category = ".category" )
object | A model fit using |
---|---|
newdata | Data frame to generate predictions from. |
value | The name of the output column:
|
... | Optional parameters passed on to
|
ndraws | The number of draws per prediction to return. When |
seed | A seed to use when subsampling draws (i.e. when |
re_formula, category | Not used with this model type. |