init_sim: Initialize Simulation

Description Usage Arguments Value

View source: R/1_gen_params_function.R

Description

Handles setting up the dimensional variables and drawing random quantities for driving the operating model and observation.

Usage

1
2
3
init_sim(nt = 42, a_min = 4, a_max = 7, U_msy, S_msy, U_SUM = 100,
  phi = 0.3, pi_grand = c(0.2, 0.4, 0.37, 0.03), min_S_cv = 0.1,
  max_S_cv = 0.2, min_C_cv = 0.1, max_C_cv = 0.2, x_ESS = 100)

Arguments

nt

Numeric vector of length 1: the number of calendar years with observations to simulate

a_min

Numeric vector of length 1: youngest age at maturity

a_max

Numeric vector of length 1: oldest age at maturity

U_msy

Numeric vector storing U_msy for each stock to simulate

S_msy

Same as S_msy, except S_msy. Must be the same length as U_msy

U_SUM

Numeric vector of length 1: beta sample size of implementation error

phi

Numeric vector of length 1: the autocorrelation coefficient for recruitment residuals. Set to zero to turn off the AR(1) process

pi_grand

Average maturity schedule across all stocks and years. Must have the same length as suggested by the number of ages of maturity calculated from supplied arguments a_min and a_max. Will be scaled to sum to 1 if does not already.

min_S_cv

Numeric vector of length 1: smallest observation CV for any substocks's escapement.

max_S_cv

Numeric vector of length 1: largest observation CV for any substocks's escapement.

min_C_cv

Numeric vector of length 1: smallest observation CV for any year's total harvest.

max_C_cv

Numeric vector of length 1: largest observation CV for any year's total harvest.

x_ESS

Numeric vector of length 1: the effective sample size for scale sampling on stocks that have age data.

Value

List object with elements needed to drive many of the other functions in this package via the params argument.


bstaton1/SimSR documentation built on Aug. 20, 2019, 9:43 a.m.