View source: R/fit_bayes_cjs.R
fit_bayes_cjs | R Documentation |
This wrapper function writes a text file describing a Bayesian Cormack Jolly-Seber model in the JAGS language, prepares the data, runs the MCMC and summarises the results.
fit_bayes_cjs(
file_path = NULL,
cap_hist_wide = NULL,
tag_meta = NULL,
drop_col_nm = "duty_cycle",
drop_values = c("batch_2", "batch_3"),
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,
...
)
file_path |
name (with file path) to save the model as. Probably a .txt file |
cap_hist_wide |
wide capture history, one row per tag, one column per detection site. Includes columns named |
tag_meta |
metadata for each tag, including a column named |
drop_col_nm |
name of column in |
drop_values |
character vector of values in |
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 |
tibble
Kevin See and Mike Ackerman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.