gaussian_draws {gratia} | R Documentation |
Posterior samples using a simple Metropolis Hastings sampler
Description
Posterior samples using a simple Metropolis Hastings sampler
Usage
gaussian_draws(model, ...)
## S3 method for class 'gam'
gaussian_draws(
model,
n,
n_cores = 1L,
index = NULL,
frequentist = FALSE,
unconditional = FALSE,
mvn_method = "mvnfast",
...
)
## S3 method for class 'scam'
gaussian_draws(
model,
n,
n_cores = 1L,
index = NULL,
frequentist = FALSE,
parametrized = TRUE,
mvn_method = "mvnfast",
...
)
Arguments
model |
a fitted R model. Currently only models fitted by |
... |
arguments passed to methods. |
n |
numeric; the number of posterior draws to take. |
n_cores |
integer; number of CPU cores to use when generating
multivariate normal distributed random values. Only used if
|
index |
numeric; vector of indices of coefficients to use. Can be used
to subset the mean vector and covariance matrix extracted from |
frequentist |
logical; if |
unconditional |
logical; if |
mvn_method |
character; one of |
parametrized |
logical; use parametrized coefficients and covariance
matrix, which respect the linear inequality constraints of the model. Only
for |