Define prior distributions for stochastic parameters

select_prior(
  param,
  pars,
  starting.point = NULL,
  prior.dist = NULL,
  prior.pars = list(),
  shift_only = FALSE
)

Arguments

param

A param.seiqhrf object containing model parameters, can be generated by param_seiqhrf.

pars

A vector of the names of random parameters.

starting.point

A vector of starting points of randomness for each parameter. Before starting point, parameters are taken as constants; after starting point, parameters are simulated from given or default priors. If NULL, all starting points are 1's, i.e. all parameters are generated from prior distributions from the first time point.

prior.dist

Prior probability distributions of the parameters in par.

prior.pars

Probability distribution parameters in prior.dist.

shift_only

In effect only for parameters (in param) that have length longer than 1. If TRUE, only parameter used at the first time point is simulated from the prior distribution, those used for the latter time points are shifted from the input values in param by the same amount as the first time point.

Value

A prior object

Examples

params <- param_seiqhrf() priors <- select_prior(params, c("act.rate.q", "inf.prob.i")) priors
#> Prior distributions for SEIQHRF Parameters #> =========================================== #> act.rate.q : N( mean = 2.5 , sd = 0.1 ) #> inf.prob.i : Beta( a = 50 , b = 950 ), mean = 0.05 , s.e = 0.007 #> ===========================================