Description Usage Arguments Details Value
View source: R/as.matrix.epimodel.R
Get parameter samples from a fitted model object of class epimodel
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## S3 method for class 'epimodel'
as.matrix(
x,
...,
pars = NULL,
regex_pars = NULL,
par_models = NULL,
par_types = NULL,
par_groups = NULL
)
## S3 method for class 'epimodel'
as.array(
x,
...,
pars = NULL,
regex_pars = NULL,
par_models = NULL,
par_types = NULL,
par_groups = NULL
)
## S3 method for class '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. |
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.
A matrix
, array
or data.frame
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.