run_jags_cjs: Run Bayesian CJS Model

View source: R/run_jags_cjs.R

run_jags_cjsR Documentation

Run Bayesian CJS Model

Description

Generate MCMC samples from the posteriors of a Bayesian Cormack Jolly-Seber model.

Usage

run_jags_cjs(
  file_path = NULL,
  jags_data = NULL,
  n_chains = 4,
  n_adapt = 1000,
  n_burnin = 2500,
  n_iter = 2500,
  n_thin = 5,
  params_to_save = c("phi", "p", "survship"),
  rng_seed = 4
)

Arguments

file_path

name (with file path) to save the model as. Probably a .txt file

jags_data

list of data to be fed into the JAGS CJS model. Generated from prep_jags_cjs.

n_chains

the number of parallel chains for the model

n_adapt

the number of iterations for adaptation. If n_adapt = 0 then no adaptation takes place.

n_burnin

the number of iterations of the Markov chain to run during the burn-in phase

n_iter

the number of iterations to monitor

n_thin

the thinning interval for monitors

params_to_save

a character vector giving the names of variables to be monitored

rng_seed

random number generator seed, to make results reproducible

...

other parameters to be fed to rjags::jags.model, update.jags or rjags::coda.samples

Value

mcmc.list

Author(s)

Kevin See and Mike Ackerman


mackerman44/telemetyr documentation built on Feb. 15, 2025, 1:08 a.m.