View source: R/predicted_draws.R
predicted_draws.ulam | R Documentation |
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 class 'ulam'
predicted_draws(
object,
newdata,
value = ".prediction",
...,
ndraws = NULL,
seed = NULL,
re_formula = NULL,
category = ".category"
)
## S3 method for class 'quap'
predicted_draws(
object,
newdata,
value = ".prediction",
...,
ndraws = NULL,
seed = NULL,
re_formula = NULL,
category = ".category"
)
## S3 method for class 'map'
predicted_draws(
object,
newdata,
value = ".prediction",
...,
ndraws = NULL,
seed = NULL,
re_formula = NULL,
category = ".category"
)
## S3 method for class '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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.