BuildPrior
sets up parameter prior distributions for each model
parameter. p1
and p2
refer to the first and second parameters
a prior distribution.
BuildPrior(
p1,
p2,
lower = rep(NA, length(p1)),
upper = rep(NA, length(p1)),
dists = rep("tnorm", length(p1)),
untrans = rep("identity", length(p1)),
types = c("tnorm", "beta", "gamma", "lnorm", "unif", "constant", "tnorm2", NA)
)
a list of list
the first parameter of a distribution
the second parameter of a distribution
lower support (boundary)
upper support (boundary)
a vector of character string specifying a distribution.
whether to do log transformation. Default is not
available distribution types
Four distribution types are implemented:
Normal and truncated normal, where: p1 = mean, p2 = sd. It specifies a normal distribution when bounds are set -Inf and Inf,
Beta, where: p1 = shape1 and p2 = shape2 (see pbeta). Note the uniform distribution is a special case of the beta with p1 and p2 = 1),
Gamma, where p1 = shape and p2 = scale (see pgamma). Note p2 is scale, not rate,
Lognormal, where p1 = meanlog and p2 = sdlog (see plnorm).