pairs.epimodel {epidemia}R Documentation

Pairs method for epimodel objects

Description

Interface to bayesplot's mcmc_pairs function. Closely mirrors the functionality of pairs.stanreg. Remember not to specify too many paramaters. They will render slowly, and be difficult to interpret.

Usage

## S3 method for class 'epimodel'
pairs(
  x,
  pars = NULL,
  regex_pars = NULL,
  par_models = NULL,
  par_types = NULL,
  par_groups = NULL,
  condition = pairs_condition(nuts = "accept_stat__"),
  ...
)

Arguments

x

A fitted model object returned by epim. See epimodel-objects.

pars

A character vector giving parameter names.

regex_pars

A character vector of regular expressions to select parameters. If pars is also used, regex_pars is used in conjunction with pars.

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 formula in epiobs) can also be used. If NULL (the default), all components are used.

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.

condition

Same as mcmc_pairs, except that the default is accept_stat__, as in pairs.stanreg. Please see the documentation for pairs.stanreg for more details on this default.

...

Arguments passed to mcmc_pairs. The arguments np, lp, and max_treedepth are automatically handled, and therefore do not need to be specified.

Value

Multiple ggplot objects in a grid using bayesplot_grid.


[Package epidemia version 1.0.0 Index]