parblock: Define a parameter block for an MCMC kernel

View source: R/parblock.R

parblockR Documentation

Define a parameter block for an MCMC kernel

Description

Define a parameter block for an MCMC kernel

Usage

parblock(
  pars_nat,
  pars_est,
  priors,
  alg,
  sigma,
  initializer = NULL,
  control = NULL
)

Arguments

pars_nat

character vector of parameter names on their natural scales (i.e., corresponding to parameters supplied to stem_dynamics)

pars_est

character vector of parameter names on their estimation scale (i.e., corresponding to row/column names in the kernel covariance matrix). IMPORTANT: the estimation scale for a parameter should be unconstrained, e.g., if mu is the recovery rate in an SIR model, it is natural to use the log infectious period duration, -log(mu) as the estimation scale.

priors

A list of three functions supplied by the user with names "logprior", "to_estimation_scale", and "from_estimation_scale" (N.B. All three must be supplied). The first of these functions should take as an argument a numeric vector of parameters on their estimation scales. The functions for converting parameters to and from their estimation scales. The priors should not include priors for the initial compartment counts or time-varying parameters.

alg

either "mvnmh" or "mvnss" for multivariate normal metropolis hastings updates or multivariate normal slice sampling updates, respectively.

sigma

initial covariance matrix for the parameter block, possibly to be adapted.

initializer

optional function for initializing the parameters in the parameter block

control

list of mcmc control settings, generated by a call to mvnmh_control or mvnss_control as appropriate.

Value

parameter block for use in MCMC kernel


fintzij/stemr documentation built on March 25, 2022, 12:25 p.m.