Skip to contents

Extend data and parameter lists for projection simulations.

Usage

prepare_proj(
  data,
  parameters,
  map,
  obj,
  adfit = NULL,
  mod_proj,
  n_proj,
  iters = 1000,
  seed = 42,
  type = "do_dynamics"
)

Arguments

data

A list containing model data structure.

parameters

A list containing model parameters.

map

A list specifying which parameters are fixed or mapped.

obj

A fitted TMB model object from initial fit.

adfit

An MCMC posterior sample object, or NULL if not using MCMC.

mod_proj

An integer specifying the number of terminal model years to overwrite with recruitment projections.

n_proj

An integer specifying the number of projection years to add.

iters

An integer specifying the number of samples from posterior distribution.

seed

An integer random seed for reproducibility.

type

A character specifying output type: "do_dynamics" outputs everything for do_dynamics function; "obj" outputs for creating obj for MP.

Value

a list with data and parameters extended for projection years.