Takes a distribution with R parameterization, converts it to a BUGS parameterization, and then samples from the distribution using JAGS

bugs.rdist(
  prior = data.frame(distn = "norm", parama = 0, paramb = 1),
  n.iter = 1e+05,
  n = NULL
)

Arguments

prior

dataframe with distribution name and parameters

n.iter

number of MCMC samples. Output will have n.iter/4 samples

n

number of randomly chosen samples to return.

Value

vector of samples

Author

David LeBauer