writeJAGSmodel: Write JAGS model

View source: R/writeJAGSmodel.R

writeJAGSmodelR Documentation

Write JAGS model

Description

Writes a text file version of the model to be used by JAGS

Usage

writeJAGSmodel(
  file_name = NULL,
  win_model = c("neg_bin", "neg_bin2", "pois", "quasi_pois", "log_space"),
  trap_est = T
)

Arguments

file_name

name (with file path) to save the model as

win_model

what type of distribution should be used when modeling the window counts. neg_bin is a standard negative binomial distribution. neg_bin2 is a more flexible version of a negative binomial, allowing the mean-variance relationship to take different forms. pois is a Poisson distribution. quasi_pois is the quasi-Poisson distribution. log_space assumes that the window counts have normal errors in log-space.

trap_est

should an estimate of escapement based on the adult fish trap rate be used as a second observation of true total escapement, together with the window counts? Default is TRUE. If FALSE, win_model is automatically set to pois.

Author(s)

Kevin See

Examples

writeJAGSmodel()


KevinSee/STADEM documentation built on March 7, 2024, 12:50 p.m.