format_input: TMB input formatting

Description Usage Arguments Value Author(s)

View source: R/format_input.R

Description

format_input Formats data, parameters, random effects, and mapped parameters for TMB input

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
format_input(
  input,
  data_avail,
  Fpen,
  SigRpen,
  SigRprior,
  LFdist,
  C_type,
  est_more,
  fix_more,
  est_F_ft,
  f_startval_ft,
  rdev_startval_t,
  est_selex_f,
  vals_selex_ft,
  est_rdev_t,
  mirror,
  est_totalF,
  prop_f
)

Arguments

input

tagged list of LIME inputs. Output from create_inputs.

data_avail

types of data included, must at least include LCX where X is the number of years of length composition data. May also include "Catch" or "Index" separated by underscore. For example, "LC10", "Catch_LC1", "Index_Catch_LC20".

Fpen

penalty on fishing mortality 0= off, 1=on

SigRpen

penalty on sigmaR, 0=off, 1=on

SigRprior

vector with prior info for sigmaR penalty, first term is the mean and second term is the standard deviation

LFdist

likelihood distribution for length composition data, default=0 for multinomial, alternate=1 for dirichlet-multinomial

C_type

default=0, NO catch data available. Copt=1 means the catch is in numbers, Copt2 means the catch is in weight.

est_more

list of variance parameters to estimate, must match parameter names: log_sigma_R, log_sigma_C, log_sigma_I, log_CV_L, log_sigma_F

fix_more

default=FALSE - parameters are fixed depending on the data available. Can also list vector of parameter names to fix at their starting values (use param_adjust and val_adjust to set these adjustments)

est_F_ft

default=TRUE, otherwise 0 for off and 1 for on

f_startval_ft

default=NULL and F starting values are at 0 for all years. Can also specify vector of F starting values for all years to be modeled (can start at truth for debugging).

rdev_startval_t

default=NULL and Recruitment deviation starting values are at 0 for all years. Can also specify vector of recruitment deviation starting values for all years to be modeled (can start at truth for debugging)

est_selex_f

default=TRUE to estimate selectivity parameters, can set to FALSE for all or multiple fleets

vals_selex_ft

input selectivity-at-length (columns) by fleet (rows) - negative values in the first column indicate to estimate selectivity

est_rdev_t

default=TRUE to estimate recruitment deviations, or specify vector with 0 to turn off deviations in a specific year and 1 to keep them on

mirror

vector of parameter names to mirror between fleets

est_totalF

TRUE estimate total F instead of by fleet

prop_f

proportion of catch from each fleet

Value

List, a tagged list of Data, Parameters, Random, Map

Author(s)

M.B. Rudd


merrillrudd/LIME documentation built on June 20, 2020, 2:58 p.m.