Skip to contents

Returns a data frame of parameters with their types, dimensions and definitions in the specified model.

Usage

par_defs(
  stan_model = c("IPM_SS_np", "IPM_SSiter_np", "IPM_SS_pp", "IPM_SSiter_pp",
    "IPM_SMS_np", "IPM_SMS_pp", "IPM_SMaS_np", "IPM_LCRchum_pp", "RR_SS_np", "RR_SS_pp"),
  pars = c("all", "hyper", "group", "states", "ppd"),
  SR_fun = "BH",
  RRS = "none",
  par_models = NULL,
  object = NULL
)

Arguments

stan_model

Character string giving the name of the model. See salmonIPM() for details.

pars

An optional character vector specifying one or more hierarchical levels of parameters. Options are "all" (the default), "hyper" (top-level hyperparameters that are given priors), "group" (pop- or year-level parameters shared by multiple states), "states" (the lowest level, corresponding to unique rows in fish_data), and "ppd" (only if model == "RR", observation-level predictions drawn from the posterior predictive distribution).

SR_fun

One of "exp" (density-independent discrete exponential), "BH" (Beverton-Holt, the default), or "Ricker", indicating which spawner-recruit function to fit. Synonyms "DI", "B-H", "bh", "b-h" and "ricker" are accepted.

RRS

A character string or vector of strings naming parameters of the function specified by SR_fun that differ between wild- and hatchery-origin spawners, such that the relative reproductive success of hatchery spawners is not equal to 1. If pool_pops == TRUE, these should be the names of the population-specific parameters, not their hyper-means. For example, if life_cycle %in% c("SS","SSiter"), the options are "none" (the default), "alpha", "Rmax", or c("alpha","Rmax"). Currently RRS is only implemented for pool_pops == FALSE.

par_models

Optional list of two-sided formulas of the form theta ~ x1 + ... + xK, where theta is a (hyper)parameter or state in the model specified by stan_model that accepts covariates (see Details for available model-parameter combinations) and x1 + ... + xK are terms involving variables in fish_data. Standard formula syntax such as : and * may be used; see stats::formula().

object

A salmonIPMfit object. If this is provided then SR_fun, RRS and par_models are not needed and will be ignored; their values are extracted from object.

Value

Data frame with columns listing the parameters and/or states and their definitions, types and dimensions.