multispic: Fit a multispecies surplus production model

View source: R/fit.R

multispicR Documentation

Fit a multispecies surplus production model

Description

Fit a multispecies surplus production model

Usage

multispic(
  inputs,
  center = TRUE,
  log_K_option = par_option(),
  log_B0_option = par_option(),
  log_r_option = par_option(),
  log_sd_B_option = par_option(),
  log_q_option = par_option(),
  log_sd_I_option = par_option(),
  logit_rho_option = par_option(),
  logit_phi_option = par_option(),
  K_betas_option = par_option(),
  pe_betas_option = par_option(),
  species_cor = "none",
  temporal_cor = "none",
  survey_groups = ~survey,
  K_groups = ~1,
  K_covariates = ~0,
  pe_covariates = ~0,
  n_forecast = 0,
  leave_out = NULL,
  start_par = NULL,
  nlminb_loops = 0,
  light = FALSE,
  silent = FALSE
)

Arguments

inputs

List that includes the following data.frames with required columns in parentheses: landings (species, year, landings), index (species, year, index). Process error covariates can be included in the landings data.frame and specified using the pe_covariates arguments (optional). Additional columns can also be included in the index data.frame to define survey_groups (i.e. effects for catchability and observation error).

center

Center input values to aid convergence?

log_K_option

Settings for the estimation of log_K; define using par_option().

log_B0_option

Settings for the estimation of the starting biomass; define using par_option().

log_r_option

Settings for the estimation of log_r; define using par_option().

log_sd_B_option

Settings for the estimation of sd for the process; define using par_option().

log_q_option

Settings for the estimation of log_q; define using par_option().

log_sd_I_option

Settings for the estimation of sd for the indices; define using par_option().

logit_rho_option

Setting for the estimation of the correlation across stocks; define using par_option().

logit_phi_option

Setting for the estimation of temporal correlation in the process errors; define using par_option().

K_betas_option

Setting for the estimation of covariate effects on K; define using par_option().

pe_betas_option

Setting for the estimation of covariate effects on the process errors; define using par_option().

species_cor

Correlation structure across species (rho). "none" will not estimate correlations across species, "one" will estimate one shared correlation parameter across species, and "all" will estimate correlation parameters across all combinations of species.

temporal_cor

Correlation structure across time (phi). "none" assumes no temporal dependence in the process errors, "rw" assumes a random walk, and "ar1" fits an AR1 process, estimating an extra parameter.

survey_groups

Formula specifying the grouping variables to use to estimate catchability, log_q, and observation error, log_sd_I. For example, a two-factor main-effects model will be assumed by supplying ~survey + species, and interactive-effects will be assumed by supplying ~survey * species. One parameter will be estimated if set to ~1.

K_groups

Formula specifying a grouping variable to use to estimate K and aggregate biomass in the production equation. Biomass from all species (stocks) will be aggregated and one K value estimated if set to ~1.

K_covariates

Formula describing covariate effects on carrying capacity, K. Intercepts are not estimated. No covariates are applied if set to ~0.

pe_covariates

Formula describing relationship between surplus production (process error) and covariates. Note that intercepts are not estimated. No covariates are applied if set to ~0.

n_forecast

Number of years to forecast. Assumes status quo landings and covariates (i.e. terminal values assumed through projected years).

leave_out

Specific index values to leave out from the analysis (row number). Useful for cross-validation. All data are kept if NULL.

start_par

List of starting parameter values. Start parameters are internally defined, however, it may be useful to supply parameters from a previous model fit to speed up convergence.

nlminb_loops

Number of times to repeat optimization to refine estimates.

light

Skip running TMB::sdreport() and limit output to speed things up?

silent

Disable tracing information?


PaulRegular/MSP documentation built on Dec. 16, 2024, 1:59 p.m.