build_jabba: Creates a data list used as input to JAGS

Description Usage Arguments Value

View source: R/build_jabba.R

Description

Creates a data list with JABBA input and settings to be passed to fit_jabba()

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
build_jabba(
  catch = NULL,
  cpue = NULL,
  se = NULL,
  assessment = "bet_example",
  scenario = "test",
  model.type = c("Schaefer", "Fox", "Pella", "Pella_m"),
  add.catch.CV = TRUE,
  catch.cv = 0.1,
  Plim = 0,
  r.dist = c("lnorm", "range"),
  r.prior = c(0.2, 0.5),
  K.dist = c("lnorm", "range"),
  K.prior = NULL,
  psi.dist = c("lnorm", "beta"),
  psi.prior = c(0.9, 0.25),
  b.prior = c(FALSE, 0.3, NA, c("bk", "bbmsy", "ffmsy")[1]),
  BmsyK = 0.4,
  shape.CV = 0.3,
  sets.q = 1:(ncol(cpue) - 1),
  sigma.est = TRUE,
  sets.var = 1:(ncol(cpue) - 1),
  fixed.obsE = ifelse(is.null(se), 0.1, 0.001),
  sigma.proc = TRUE,
  proc.dev.all = TRUE,
  igamma = c(4, 0.01),
  projection = FALSE,
  TACs = NULL,
  TACint = NULL,
  imp.yr = NULL,
  pyrs = NULL,
  P_bound = c(0.02, 1.3),
  sigmaobs_bound = 1,
  sigmaproc_bound = 0.2,
  q_bounds = c(10^-30, 1000),
  K_bounds = c(0.01, 10^10),
  KOBE.plot = TRUE,
  KOBE.type = c("ICCAT", "IOTC")[2],
  Biplot = FALSE,
  harvest.label = c("Hmsy", "Fmsy")[2],
  catch.metric = "(t)"
)

Arguments

catch

catch time series, requires data.frame(year, catch)

cpue

cpue time series, requires data.frame(year, cpue.1,cpue.2,...,cpue.N)

se

optional log standard error (CV) time series,requires data.frame(year, se.1,se.2,...,se.N)

assessment

= "example",

scenario

= "s1",

model.type

= c("Schaefer","Fox","Pella","Pella_m"),

add.catch.CV

= c(TRUE,FALSE) option estimate catch with error

catch.cv

catch error on log-scale (default = 0.1)

Plim

= 0, # Set Plim = Blim/K where recruitment may become impaired (e.g. Plim = 0.25) PRIORS

r.dist

= c("lnorm","range"), # prior distribution for the intrinsic rate population increas

r.prior

= c(0.2,0.5), # prior(mu, lod.sd) for intrinsic rate of population increase

K.dist

= c("lnorm","range"), # prior distribution for unfished biomass K = B0

K.prior

= NULL, # prior(mu,CV) for the unfished biomass K = B0

psi.dist

= c("lnorm","beta"), # prior distribution for the initial biomass depletion B[1]/K

psi.prior

= c(0.9,0.25), # prior(mu, CV) for the initial biomass depletion B[1]/K

b.prior

= c(FALSE,0.3,NA,c("bk","bbmy","ffmsy")[1]), # depletion prior set as d.prior = c(mean,cv,yr,type=c("bk","bbmsy"))

BmsyK

= 0.4, # Inflection point of the surplus production curve, requires Pella-Tomlinson (model = 3 | model 4)

shape.CV

= 0.3, # CV of the shape m parameters, if estimated with Pella-Tomlinson (Model 4) VARIANCE options

sets.q

= 1:(ncol(cpue)-1), # assigns catchability q to different CPUE indices. Default is each index a seperate q

sigma.est

= TRUE, # Estimate additional observation variance

sets.var

= 1:(ncol(cpue)-1), # estimate individual additional variace

fixed.obsE

= c(0.01), # Minimum fixed observation erro

sigma.proc

= TRUE, # TRUE: Estimate observation error, else set to value

proc.dev.all

= TRUE, # TRUE: All year, year = starting year

igamma

= c(3,0.01), # prior for process error variance, default informative igamma ~ mean 0.07, CV 0.4

projection

= FALSE, # Switch on by Projection = TRUE

TACs

= NULL

TACint

= NULL, # default avg last 3 years

imp.yr

= NULL, # default last year plus ONE

pyrs

= NULL, # Set number of projections years

P_bound

= c(0.02,1.3), # Soft penalty bounds for b/k

sigmaobs_bound

= 1, # Adds an upper bound to the observation variance

sigmaproc_bound

= 0.2, # Adds an upper bound to the process variance

KOBE.plot

= TRUE, # Produces JABBA Kobe plot

KOBE.type

= c("ICCAT","IOTC")[2], # ICCAT uses 3 colors; IOTC 4 (incl. orange)

harvest.label

= c("Hmsy","Fmsy")[2], # choose label preference H/Hmsy versus Fmsy

catch.metric

"(t)" # Define catch input metric e.g. (tons) "000 t"

q_bounds=

c(10^-30,1000), # Defines lower and upper bounds for q

K_bounds=

c(0.01,10^10), # Defines lower and upper bounds for q

Biplot=

FALSE, # Produces a "post-modern" biplot with buffer and target zones (Quinn & Collie 2005)

Value

List to be used as data input to JABBA JAGS model.


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