BuildPrior: Specifying Parameter Prior Distributions

Description Usage Arguments Details Value

View source: R/prior.R

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

1
2
3
4
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:

  1. Normal and truncated normal, where: p1 = mean, p2 = sd. It specifies a normal distribution when bounds are set -Inf and Inf,

  2. 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),

  3. Gamma, where p1 = shape and p2 = scale (see pgamma). Note p2 is scale, not rate,

  4. Lognormal, where p1 = meanlog and p2 = sdlog (see plnorm).

Value

a list of list


ggdmc documentation built on May 2, 2019, 9:59 a.m.