Project recruitment deviates
Usage
project_rec_devs(
data,
obj,
mcmc = NULL,
first_yr = 2021,
last_yr = 2035,
samp_years = 1931:2022,
iters = NULL,
max.p = 5,
max.d = 5,
max.q = 5,
option = "auto",
bootstrap = TRUE
)Arguments
- data
A
listcontaining model data including dimensions and years.- obj
A TMB model
objectreturned fromMakeADFun.- mcmc
Optional MCMC fit object from
SparseNUTS. IfNULL, uses MLE parameters.- first_yr
An
integerspecifying the first projection year (default: 2021).- last_yr
An
integerspecifying the last projection year (default: 2035).- samp_years
An
integervector of historical years to sample recruitment deviates from (default: 1931:2022).- iters
An
integervector specifying which MCMC iterations to use. IfNULL, uses all iterations.- max.p
An
integerspecifying the maximum AR order to consider in ARIMA model selection (default: 5).- max.d
An
integerspecifying the maximum degree of differencing for stationarity (default: 5).- max.q
An
integerspecifying the maximum MA order to consider in ARIMA model selection (default: 5).- option
A
characterstring specifying the ARIMA fitting method: "auto" for automatic selection or "AR1" for AR(1) model (default: "auto").- bootstrap
A
logicalindicating whether to bootstrap residuals (TRUE) or use normal random errors (FALSE) (default:TRUE).
Value
A list containing:
- rdev_y
A
matrixof historical recruitment deviates with dimensions \[n_iter, n_years\].- proj_rdev_y
A
matrixof projected recruitment deviates with dimensions \[n_iter, n_proj\].- arima_pars
A
matrixof ARIMA(p,d,q) specifications with dimensions \[n_iter, 3\].- ar_pars
A
matrixof AR coefficients with dimensions \[n_iter, max.p\].- ma_pars
A
matrixof MA coefficients with dimensions \[n_iter, max.q\].
