user_draws | R Documentation |
Handle user-supplied posterior draws
user_draws(model, draws, ...)
## S3 method for class 'gam'
user_draws(model, draws, index = NULL, ...)
model |
a fitted R model. Currently only models fitted by |
draws |
matrix; user supplied posterior draws to be used when
|
... |
arguments passed to methods. |
index |
a vector to index (subset) the columns of |
The supplied draws
must be a matrix (currently), with 1 column per
model coefficient, and 1 row per posterior draw. The "gam"
method has
argument index
, which can be used to subset (select) coefficients
(columns) of draws
. index
can be any valid way of selecting (indexing)
columns of a matrix. index
is useful if you have a set of posterior draws
for the entire model (say from mgcv::gam.mh()
) and you wish to use those
draws for an individual smooth, via smooth_samples()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.