calcMetrics: calcMetrics

View source: R/Module_calcMetrics.R

calcMetricsR Documentation

calcMetrics

Description

Main function that applies all the individual metric functions and produces a summary output

Usage

calcMetrics(
  series.in,
  yrs.in,
  gen.in,
  stk.label = "Stock",
  species.label = "Species",
  series.label = "DataVersion",
  slope.specs = list(num.gen = 3, extra.yrs = 0, filter.sides = 1, log.transform =
    TRUE, out.exp = TRUE, na.rm = FALSE),
  avg.specs = list(avg.type = "geomean", recent.excl = FALSE, min.lt.yrs = 20),
  metric.bm = list(RelAbd = c(NA, NA), AbsAbd = c(1000, 10000), LongTrend = c(0.5,
    0.75), PercChange = c(-25, -15), ProbDeclBelowLBM = c(NA, NA)),
  retro.start = NULL,
  tracing = TRUE
)

Arguments

series.in

vector with numeric values

yrs.in

vector of years corresponding to the values in series.in (missing yrs need to be included as NA values in series.in)

gen.in

integer value with avg generation time

stk.label

label to be used in output file (e.g. "EStu")

species.label

label to be used in output file (e.g. "Sk")

series.label

label to be used in output file (e.g. "LogSm_TotSpn")

slope.specs

list with arguments for the slope function NAME, see details there

avg.specs

list with arguments for the avg function NAME, see details there

metric.bm

list with upper and lower benchmarks for each metric

retro.start

user-specified year. if NULL, do retrospective for last 9 yrs of the series

tracing

if TRUE, print lots of diagnostic/tracking info to the command lines


SOLV-Code/MetricsCOSEWIC documentation built on Nov. 3, 2022, 8:59 p.m.