Simulate log-recruitment
Arguments
- n_patches
number of patches
- n_time
number of timepoints
- x_rec
matrix of environmental factors affecting recruitment
- pars
a named
list
of parameters used to simulate log-recruitment. It must contain a vector named"beta_r"
with length equal to the number of columnts inx_rec
. In addition, ifar_time = TRUE
, the list must also contain a namedvector
called "ar". This namedvector
must contain an element calledalpha
(the autocorrelation parameter) and another calledtau
(the conditional SD).- ar_time
a
boolean
indicating whether an AR(1) term should be included to the log-recruitment.