log_mean: One mean value or a vector of means, in log scale, of length equal to years for sim_R or a matrix of means with rows equaling the number of ages and columns equaling the number of years for sim_Z.
log_sd: Standard deviation of the variable in the log scale.
random_walk: Simulate recruitment as a random walk?
plot: produce a simple plot of the simulated values?
phi_age: Autoregressive parameter for the age dimension.
phi_year: Autoregressive parameter for the year dimension.
N0: Either specify "exp" or numeric vector of starting abundance excluding the first age. If "exp" is specified using sim_N0, then abundance at age are calculated using exponential decay.
Returns
Returns a function for use inside sim_abundance.
Details
sim_R generates uncorrelated recruitment values or random walk values from a log normal distribution. sim_Z does the same as sim_R when phi_age and phi_year are both 0, otherwise values are correlated in the age and/or year dimension. The covariance structure follows that described in Cadigan (2015).
Cadigan, Noel G. 2015. A State-Space Stock Assessment Model for Northern Cod, Including Under-Reported Catches and Variable Natural Mortality Rates. Canadian Journal of Fisheries and Aquatic Sciences 73 (2): 296-308.