BuildPrior {ggdmc} | R Documentation |
Specifying Parameter Prior Distributions
Description
BuildPrior
sets up parameter prior distributions for each model
parameter. p1
and p2
refer to the first and second parameters
a prior distribution.
Usage
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))
Arguments
p1 |
the first parameter of a distribution |
p2 |
the second parameter of a distribution |
lower |
lower support (boundary) |
upper |
upper support (boundary) |
dists |
a vector of character string specifying a distribution. |
untrans |
whether to do log transformation. Default is not |
types |
available distribution types |
Details
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).
Value
a list of list