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