Get parameter samples from a fitted model object of class epimodel
.
# S3 method for epimodel as.matrix( x, ..., pars = NULL, regex_pars = NULL, par_models = NULL, par_types = NULL, par_groups = NULL ) # S3 method for epimodel as.array( x, ..., pars = NULL, regex_pars = NULL, par_models = NULL, par_types = NULL, par_groups = NULL ) # S3 method for epimodel as.data.frame( x, ..., pars = NULL, regex_pars = NULL, par_models = NULL, par_types = NULL, par_groups = NULL )
x | A fitted model object returned by |
---|---|
... | Not used. |
pars | Character vector of parameter names to return. Same as as.matrix.stanreg |
regex_pars | Character vector of regular expressions against which to match parameter names.Same as as.matrix.stanreg |
par_models | A character vector that restricts parameters to a subset of
model components. For example, "R" only uses parameters in the transmission model,
"inf" uses parameters in infection model. Strings giving the name of the
response in an observation model (i.e. LHS of the |
par_types | A character vector that restricts parameters based on their type. The vector can include any of "fixed", "autocor", "random", "aux", "latent", or "seeds". The default is c("fixed", "aux", "seeds"), to avoid printing a very large number of parameters. If NULL, all types are used. |
par_groups | A character vector restricting parameters to those used for a subset of regions in which the epidemic is modeled. Defaults to NULL in which case all regions are used. |
A matrix
, array
or data.frame
object.
as.matrix
, as.array
and as.data.frame
each return
a sample of parameter draws from objects of class epimodel
. The
returned parameters include those in the regression for \(R_{tm}\)$, but also
other parameters in the model. These methods closely resemble those
for stanreg
objects in rstanarm. Please see as.matrix.stanreg
for a general explanation of these methods.