calcPercChange: calcPercChange

View source: R/Module_calcPercChange.R

calcPercChangeR Documentation

calcPercChange

Description

this function applies a basic deterministic with various user options (e.g. log transform, gen avg smoothing, time window to use). For a single vector, use calcPercChangeSimple()

Usage

calcPercChange(
  X,
  gen.in = 4,
  slope.num.gen = 3,
  extra.yrs = 0,
  genmean.smoothing = TRUE,
  log.transform = TRUE,
  out.exp = FALSE,
  tracing = FALSE
)

Arguments

X

a data frame with Years x Stocks. Row labels are years, no missing years allowed, NA are possible, but will result in NA for

gen.in

= average generation time

slope.num.gen

number of generations over which to calculate the perc change

extra.yrs

to handle COSEWIC "extra year". default is 0

genmean.smoothing

if TRUE, apply the smoothSeries() function. default is TRUE

log.transform

if TRUE, log-transform the time series before calculating the smoothed series. default is TRUE

out.exp

if TRUE, take the exponent of the smoothed series before calculating the perc change. default is FALSE

tracing

if TRUE, print various diagnostics to the command line. default is FALSE


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