jags_examples: Coded examples of JAGS models and R runs.

View source: R/jags_examples.R

jags_examplesR Documentation

Coded examples of JAGS models and R runs.

Description

jags_examples() gives an example of code in JAGS for model specification, and code that could be passed to run.jags function.

Usage

jags_examples(example, runme = T)

Arguments

example

Character string. Prints example models using JAGS specific code and parametrization. Options are "model1" or "model2.

runme

Logical. If TRUE the R code to run the JAGS model will also be displayed. The default value is runme = TRUE.

Models

example

model 1

logistic regression for a Bernoulli random variable. Linearity on eta, with a and b normal prior distributions.

model 2

logarithmic regression for a Poisson random variable.

runme

specification of initial values and distributions for the JAGS model, as well as run.jags example code.

See Also

run.jags

Examples

jags_examples("model1")


mlebertheyl/myJpackage documentation built on May 18, 2022, 5:35 p.m.