Posterior samples using a Gaussian approximation to the posterior distribution
mh_draws(model, ...)# S3 method for gam
mh_draws(
model,
n,
burnin = 1000,
thin = 1,
t_df = 40,
rw_scale = 0.25,
index = NULL,
...
)
a fitted R model. Currently only models fitted by mgcv::gam()
or mgcv::bam()
, or return an object that inherits from such objects are
supported. Here, "inherits" is used in a loose fashion; models fitted by
scam::scam()
are support even though those models don't strictly inherit
from class "gam"
as far as inherits()
is concerned.
arguments passed to methods.
numeric; the number of posterior draws to take.
numeric; the length of any initial burn in period to discard.
See mgcv::gam.mh()
.
numeric; retain only thin
samples. See mgcv::gam.mh()
.
numeric; degrees of freedom for static multivariate t proposal.
See mgcv::gam.mh()
.
numeric; factor by which to scale posterior covariance
matrix when generating random walk proposals. See mgcv::gam.mh()
.
numeric; vector of indices of coefficients to use. Can be used
to subset the mean vector and covariance matrix extracted from model
.