metasim_base: Base-level metapopulation simulation function

View source: R/RcppExports.R

metasim_baseR Documentation

Base-level metapopulation simulation function

Description

This is an Rcpp implementation of the main simulation. It is meant to be called by meta_sim.

Usage

metasim_base(
  n_pop,
  n_t,
  spawners_0,
  b,
  epsilon_mat,
  A_params,
  add_straying,
  stray_mat,
  assess_years,
  r_escp_goals,
  sigma_impl,
  add_impl_error,
  decrease_b,
  debug
)

Arguments

n_pop

Number of populations

n_t

The number of years.

spawners_0

A vector of spawner abundances at the start of the simulation. Length of the vector should equal the number of populations.

b

Ricker density-dependent parameter. A vector with one numeric value per population.

epsilon_mat

A matrix of recruitment deviations.

A_params

A matrix of Ricker a parameters

add_straying

Implement straying between populations?

stray_mat

A straying matrix.

assess_years

A vector of years to assess a and b in

r_escp_goals

A matrix of escapement goals.

sigma_impl

Implementation standard deviation for the implementation error beta distribution.

add_impl_error

Add implementation error? Implementation error is derived using impl_error.

decrease_b

A numeric value to decrease all streams by each generation. This is intended to be used to simulate habitat loss, for example though stream flow reduction with climate change.

debug

Boolean. Should some debuging messages be turned on?


metafolio documentation built on Oct. 21, 2023, 1:06 a.m.