runSTADEMmodel: Run JAGS model

View source: R/runSTADEMmodel.R

runSTADEMmodelR Documentation

Run JAGS model

Description

Run the JAGS model

Usage

runSTADEMmodel(
  file_name = NULL,
  mcmc_chainLength = 100,
  mcmc_burn = 10,
  mcmc_thin = 2,
  mcmc_chains = 1,
  jags_data = NULL,
  weekly_params = FALSE,
  seed = NULL,
  verbose = FALSE,
  parallel = TRUE,
  DIC = FALSE,
  win_model = c("neg_bin", "neg_bin2", "pois", "quasi_pois", "log_space"),
  trap_est = TRUE,
  use_jagsUI = FALSE
)

Arguments

file_name

name (with file path) to save the model as

mcmc_burn

number of burn-in samples in each MCMC chain

mcmc_thin

thinning interval for MCMC samples to save

mcmc_chains

number of MCMC chains

jags_data

list of data being passed to JAGS model, created by prepJAGS

weekly_params

should weekly estimates be saved? Default is FALSE

seed

starting seed value for RNG, to make results reproducible

verbose

passed to the jags function

parallel

passed to the jags function

DIC

passed to the jags function

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.

use_jagsUI

should the 'jagsUI' package be used to fit the model? Default is 'FALSE', meaning the 'rjags' package is used instead.

mcmc_chainlength

number of total samples in each MCMC chain

Value

mcmc.list

Author(s)

Kevin See

Examples

#runSTADEMmodel()

KevinSee/STADEM documentation built on Oct. 21, 2024, 5:42 a.m.