calcLongTermTrend: calcLongTermTrend

Description Usage Arguments

View source: R/Module_calcLongTermTrend.R

Description

this function applies a basic long-term trend to a data frame of Year x Stock, with various user options (e.g. log transform, gen avg smoothing, time window to use). For a single vector, use calcLongTermTrendSimple()

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
calcLongTermTrend(
  X,
  gen.in = 4,
  recent.num.gen = 1,
  extra.yrs = 0,
  min.lt.yrs = 20,
  avg.type = "geomean",
  tracing = FALSE,
  recent.excl = 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 Trend for

extra.yrs

to handle COSEWIC "extra year"

avg.type

"mean","geomean", or "median"

recent.excl

if TRUE, then don't use the values from the recent gen as part of the LT avg


SOLV-Code/MetricsTest documentation built on Feb. 19, 2021, 10:12 p.m.