stockSim: Simulation of a stock

Description Usage Arguments Details Value References Examples

View source: R/stockSim.R

Description

stockSim simulates a stock using variable fishing mortality and stock recruitment relationship

Usage

1
stockSim(params, nyears = 100, Ft = 0, env_at = 1, env_bt = 1)

Arguments

params

List of parameters for the population. Applies a single cohort simulation for the initial population state using cohortSim function

nyears

number of years in the simulation

Ft

time series vector for fishing mortality. If a single value, then the function assumes a constant fishing mortality for the entire simulation (default=0)

env_at

time series vector for environmental effects to maximum recruitment (e.g. srrFecBH_a in srrFecBH) (default=1).

env_bt

time series vector for environmental effects to half maximum recruitment parameter (e.g. srrFecBH_b in srrFecBH) (default=1).

Details

params list should contain the following parameters:

For fitting an optimal time series of fishing mortalities, Ft, see optim.stockSim (Walters and Martell, 2004).

Value

A list

References

Walters, C. J., Martell, S. J., 2004. Fisheries ecology and management. Princeton University Press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(tilapia)
params <- tilapia
params$knife_edge_size <- 20
params$N0 <- 1e9
nyears <- 50
Ft <- rep(0.5, nyears)
set.seed(1)
env_at <- runif(nyears, min=0.5, max=1.5)
env_bt <- rep(1, nyears); env_bt[20:35] <- 0.5
tmp <- stockSim(Ft=Ft, params=params, nyears=nyears, env_at=env_at, env_bt=env_bt)
plot(tmp$Bt, t="l")
plot(tmp$Yt, t="l")
sum(tmp$Yt/1e6, na.rm=TRUE)

marchtaylor/fishdynr documentation built on May 21, 2019, 11:27 a.m.