fit_jabba: Fit JABBA model

Description Usage Arguments Value Examples

View source: R/fit_jabba.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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,
  save.all = FALSE,
  save.jabba = FALSE,
  save.csvs = FALSE,
  save.prjkobe = FALSE,
  output.dir = getwd(),
  quickmcmc = FALSE
)

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.K

= NULL,

init.r

= NULL,

init.q

= NULL,# vector

peels

= NULL, # retro peel option

save.all

= FALSE

save.jabba

= FALSE

output.dir

path to save plot. default is getwd()

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)
jbplot_cpuefits(bet1)
jbplot_ppdist(bet1)
par(mfrow=c(3,2),mar = c(3.5, 3.5, 0.5, 0.1))
jbplot_trj(bet1,type="B",add=T)
jbplot_trj(bet1,type="F",add=T)
jbplot_trj(bet1,type="BBmsy",add=T)
jbplot_trj(bet1,type="FFmsy",add=T)
jbplot_spphase(bet1,add=T)
jbplot_kobe(bet1,add=T)

zanbi/jabbamodel-JABBA documentation built on June 27, 2020, 12:23 a.m.