make_ptable: Make a performance table. Trajectories must be based on...

Description Usage Arguments Value Examples

View source: R/26_make_ptable.R

Description

Make a performance table. Trajectories must be based on 100-year simulations.

Usage

1
make_ptable(traj.list, depletion, mnpl = NA)

Arguments

traj.list

A list of trajectories from Projections()

depletion

A vector of starting depletions (abundance relative to carrying capacity)

mnpl

Max net productivity level (MNPL) defined by user. If MNPL is specified, that value is used. If the user does not specify MNPL, it is calculated from the life history parameters.

Value

A dataframe containing performance metrics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
parms <- list(S0 = 0.944, S1plus = 0.99, K1plus = 9000, AgeMat = 18, nages = 20,
              z = 2.39, lambdaMax = 1.02)
initdepl.vec <- c(0.2, 0.5, 0.9)
nyears <- 100
high.list.const <- lapply(
  X = initdepl.vec,
  function(x) {
    projections(
      NOut = 50,
      ConstantBycatch = list(Catch = 25, CV = 0.3),
      InitDepl = x,
      lh.params = parms,
      nyears = nyears,
      obs_CV = 0.1
    )
  }
)
med.list.const <- lapply(
  X = initdepl.vec,
  function(x) {
    projections(
      NOut = 50,
      ConstantBycatch = list(Catch = 12, CV = 0.3),
      InitDepl = x,
      lh.params = parms,
      nyears = nyears,
      obs_CV = 0.1
    )
  }
)
low.list.const <- lapply(
  X = initdepl.vec,
  function(x) {
    projections(
      NOut = 50,
      ConstantBycatch = list(Catch = 2, CV = 0.3),
      InitDepl = x,
      lh.params = parms,
      nyears = nyears,
      obs_CV = 0.1
    )
  }
)
zero.list.const <- lapply(
  X = initdepl.vec,
  function(x) {
    projections(
      NOut = 50,
      ConstantBycatch = list(Catch = 0, CV = 0),
      InitDepl = x,
      lh.params = parms,
      nyears = nyears,
      obs_CV = 0.1
    )
  }
)
traj.list <- list(
  high.list.const,
  med.list.const,
  low.list.const,
  zero.list.const
)
make_ptable(traj.list = traj.list, depletion = initdepl.vec, mnpl = 0.5)

ktmurray1219/mmrefpoints documentation built on Dec. 21, 2021, 8:40 a.m.