cohort.FLIBM: Simulate a single cohort

View source: R/cohort.FLIBM.R

cohort.FLIBMR Documentation

Simulate a single cohort

Description

Simulate a single cohort

Usage

cohort.FLIBM(
  obj = NULL,
  ssbfec = 1e+06,
  FM = 0.3,
  years = dimnames(obj$stock.a)$year,
  seed = 1,
  purgeProb = 0.2,
  monitor = FALSE,
  return.FLIBM = FALSE
)

Arguments

obj

FLIBM object.

ssbfec

numeric value. Single value describing constant spawning stock biomass (or fecundity), used in determining recruitment with obj$rec during the first year of simulation.

FM

numeric value. Fishing mortality to be applied.

years

character vector. Years to use in simulation (from dimnames(obj$stock.a@stock.n) )

seed

seed value for random number reproducibility (Default: 1). When seed = NULL, a random seed is used during each FM run.

purgeProb

numeric Value between 0 and 1, indicating the frequency that obj$inds are purged of empty rows (passed to 'remove.ids').

monitor

logical Monitor progress (default FALSE).

return.FLIBM

(default FALSE)

Value

a list

Examples



data(stkMed)

# obj$rec parameters should result in high recruitment for the given
# ssbfec setting (e.g. many thousands of individuals will result in
# smoother ypr pattern)
stkMed$rec$params$rmax <- 1e5
obj <- stkMed

res <- cohort.FLIBM(obj, ssbfec = 5e5, FM = 0.3, seed = 1, monitor = TRUE,
  return.FLIBM = TRUE)

plot(res$obj$stock.a@stock.n[,ac(1980:1995)])

stkYr <- simplifySeason(res$obj)
stkYr <- stkYr[-1,ac(1980:2000)]
plot(stkYr)



marchtaylor/FLIBM documentation built on Jan. 19, 2025, 10:56 p.m.