Forecast from Larkin and Ricker stock-recruitment models
- Install the R package
cmdstanr
(see https://mc-stan.org/cmdstanr/index.html).
install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
- Install CmdStan (see https://mc-stan.org/cmdstanr/articles/cmdstanr.html).
cmdstanr::check_cmdstan_toolchain()
cmdstanr::install_cmdstan(cores = parallel::detectCores())
- Install
larkin
.
remotes::install_github("pbs-assess/larkin")
Changes implemented on 21 July 2023
- forecast no longer includes random error. A single, deterministic forecast is generated for each posterior draw.
- timevary input parameter was removed as this is determined by value of prior on omega
- the MLE of larkin model was included as an alternative to Bayesian estimation, in forecast() using cmdstanr's optimize() function