make_PMobj: Make a performance metric

View source: R/plot_proj.R

make_PMobjR Documentation

Make a performance metric

Description

Function that defines and returns performance measures.

Usage

make_PMobj(
  x,
  type = c("SSB", "SSB0", "SSBMSY", "F", "SPR", "Catch", "SSB50%Rmax", "SSB90%R/S"),
  frac = 0.4,
  year_range,
  label,
  ...
)

Arguments

x

An object of class MSE, or a shiny reactivevalues object containing a slot named MSEproj which is the MSE object.

type

The response variable for the performance metric.

frac

The reference value for calculating probability of exceeding this value.

year_range

The length two vector for the range of years (relative to OM@CurrentYr) during which to calculate the performance measure.

label

Optional character that describes the performance measure.

...

Additional arguments depending on type. See details.

Details

  • type = "SSB" calculates SSB relative to historical SSB. Provide the reference year with argument SSBhist_yr.

  • type = "SSB0" calculates SSB relative to SSB0 (either "Dynamic", "Initial", or "Equilibrium"). Provide the type with argument SSB0_type.

  • type = "SSBMSY" calculates SSB relative to SSBMSY.

  • type = "F" calculates F relative to FMSY.

  • type = "SPR" calculates SPR relative to frac.

  • type = "Catch" calculates catch relative to historical catch. Provide the reference year with argument Chist_yr.

  • type = "SSB50%Rmax" calculates SSB relative to that at half of maximum predicted recruitment. See LRP_50Rmax.

  • type = "SSB90%R/S" calculates SSB relative to the SSB at 90th percentile of the historical replacement line. See LRP_RPS90.

Value

A PMobj object.

Examples


library(MSEtool)
MSE <- MSEtool::runMSE(OM = MSEtool::testOM, MPs = c("NFref", "FMSYref"))
PM <- make_PMobj(MSE, type = "SSB", frac = 0.75, year_range = 51:100, SSBhist_yr = 50)


Blue-Matter/RPC documentation built on Feb. 3, 2025, 11:20 a.m.