r2bugs.distributions: convert R parameterizations to BUGS paramaterizations

Description Usage Arguments Details Value Author(s) Examples

Description

convert R parameterizations to BUGS paramaterizations

Usage

1
  r2bugs.distributions(priors, direction = "r2bugs")

Arguments

priors

data.frame with columns distn = distribution name, parama, paramb using R default parameterizations

direction,

one of 'r2bugs' (default), 'bugs2r'. Determines if function should convert from R to BUGS, or vice-versa. The bugs2r.distributions does the reverse.

Details

R and BUGS have different parameterizations for some distributions. This function transforms the distributions from R defaults to BUGS defaults. BUGS is an implementation of the BUGS language, and these transformations are expected to work for bugs.

Value

priors dataframe using JAGS default parameterizations

Author(s)

David LeBauer, Ben Bolker

Examples

1
2
3
4
priors <- data.frame(distn = c('weibull', 'lnorm', 'norm', 'gamma'),
                     parama = c(1, 1, 1, 1),
                     paramb = c(2, 2, 2, 2))
r2bugs.distributions(priors)

dlebauer/r2bugs documentation built on May 15, 2019, 9:14 a.m.