fit_jabba: Fit JABBA model

View source: R/fit_jabba.R

fit_jabbaR Documentation

Fit JABBA model

Description

Fits JABBA model in JAGS and produce output object as list()

Usage

fit_jabba(
  jbinput,
  ni = 30000,
  nt = 5,
  nb = 5000,
  nc = 2,
  init.values = FALSE,
  init.K = NULL,
  init.r = NULL,
  init.q = NULL,
  peels = NULL,
  do.ppc = TRUE,
  save.trj = TRUE,
  save.all = FALSE,
  save.jabba = FALSE,
  save.csvs = FALSE,
  output.dir = getwd(),
  quickmcmc = FALSE,
  seed = 123,
  jagsdir = NULL,
  verbose = TRUE
)

Arguments

jbinput

List of input variables as output by build_jabba() MCMC settings

ni

number of iterations

nt

thinning interval of saved iterations

nb

burn-in

nc

number of mcmc chains Initial values

init.values

= FALSE,

init.r

= NULL,

init.q

= NULL,# vector

peels

= NULL, # retro peel option

do.ppc

conducts and saves posterior predictive checks

save.trj

adds posteriors of stock, harvest and bk trajectories

save.all

add complete posteriors to fitted object

save.jabba

saves jabba fit as rdata object

save.csvs

option to write csv outputs

output.dir

path to save plot. default is getwd()

quickmcmc

option to run short mcmc

seed

default 123, set random by e.g. sample.int(999,1)

verbose

option show cat comments and progress

initK

= NULL,

Value

A result list containing estimates of model input, settings and results

Examples

data(iccat)
jbinput <- build_jabba(catch=iccat$bet$catch,cpue=iccat$bet$cpue,se=iccat$bet$se,model.type="Fox")
bet1 = fit_jabba(jbinput,quickmcmc=TRUE,verbose=TRUE)
jbplot_summary(bet1)

jabbamodel/JABBA documentation built on Nov. 2, 2024, 12:50 p.m.