paradox_sim: Simulate biomass and effort trajectories

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Simulate biomass and effort trajectories

Usage

1
2
3
4
5
6
  paradox_sim(t_end = 1000L, num_pop = 10L,
    alpha = numeric(), beta = 1/150, m = 0.01, n = 1,
    sigma = 0.05, q = 0.01, cpar = 1.4, p = 0.5,
    effort_init = 10, biomass_init = 50, vuln_thresh = 0.1,
    burnin = 500L, return_ts = FALSE,
    print_diagnostics = FALSE)

Arguments

t_end

Number of time steps to simulate over

num_pop

Number of populations

alpha

alpha parameter in the Shepherd stock-recruit function (density-independent growth). Entered as a numeric vector with one alpha per population.

beta

beta parameter in the Shepherd stock-recruit function (capacity parameter)

m

Natural mortality

n

n parameter in the Shepherd stock-recruit function. Controls compensation level.

sigma

Standard deviation on the simulated alpha values

q

Effectiveness parameter in the effort function

cpar

Operational costs parameter in the effort function

p

Intrinsic value of the fishery parameter in the effort function

effort_init

Initial effort.

biomas_init

Initial population biomass. Recycled across all populations.

vuln_threshold

The vulnerability threshold. A proportion (between 0 and 1) indicating the fraction of the mean biomass of a subpopulation before that subpopulation is declared "vulnerable".

burnin

The number of years to discard as burnin.

return_ts

Logical indicating whether the time series should be returned as part of the output. FALSE by default to save memory if running many repetitions.

print_diagnostics

Logical indicating whether some print statements should be enabled to help debug.

Value

A list object. $performance contains the performance attributes. If return_ts = TRUE: $biomass contains the biomass matrix (time is incremented along the columns and populations down the rows; the burnin period has been removed); $effort contains the effort in a numeric vector with burnin removed.

The performance data.frame contains (in order of columns) the average-CV portfolio effect, the mean standard deviation of the subpopulation biomasses, the mean mean of the subpopulation biomasses, the standard deviation of the total biomass, the mean of the total biomass, and the Loreau and de Mazancourt synchrony index.

Author(s)

Original model developed by Justin Yeakel. C++ version originally ported by Sean Anderson.

Examples

1
2
3
4
5
6
7
8
out <- paradox_sim(alpha = rep(0.5, 10), return_ts = TRUE)
names(out)
print(out$performance)
op <- par(mfrow = c(2, 1), mar = c(4, 4, .5, .5))
matplot(t(out$biomass[, -c(1:500)]), type = "l", lty = 1, xlab = "Year",
  ylab = "Biomass")
plot(out$effort[-c(1:500)], type = "l", ylab = "Effort", xlab = "Year")
par(op)

jdyeakel/paradox documentation built on May 18, 2019, 11:41 p.m.