R/linpred_draws.R
linpred_draws.ulam.Rd
Adds draws from the posterior link-level predictor of a rethinking model to a data frame.
Provides support for tidybayes::linpred_draws()
/ tidybayes::add_linpred_draws()
/
for models from the rethinking
package.
# S3 method for ulam linpred_draws( object, newdata, value = ".value", ..., post = NULL, ndraws = NULL, seed = NULL, dpar = FALSE, re_formula = NULL, category = ".category" ) # S3 method for quap linpred_draws( object, newdata, value = ".value", ..., post = NULL, ndraws = NULL, seed = NULL, dpar = FALSE, re_formula = NULL, category = ".category" ) # S3 method for map linpred_draws( object, newdata, value = ".value", ..., post = NULL, ndraws = NULL, seed = NULL, dpar = FALSE, re_formula = NULL, category = ".category" ) # S3 method for map2stan linpred_draws( object, newdata, value = ".value", ..., post = NULL, ndraws = NULL, seed = NULL, dpar = FALSE, 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
|
post | Optional samples from posterior. When missing, |
ndraws | The number of draws per fit to return. When |
seed | A seed to use when subsampling draws (i.e. when |
dpar | Should distributional regression
parameters be included in the output? In rethinking models, these correspond to the linear submodels
returned by |
re_formula, category | Not used with this model type. |