comparePercChange: comparePercChange

View source: R/Module_comparePercChange.R

comparePercChangeR Documentation

comparePercChange

Description

this function calculates 3 alternative versions of the Perc Change metric: 1 deterministic (MLE) and 2 Bayesian (JAGS via rjags, STAN via RStanArm)

Usage

comparePercChange(
  du.label,
  du.df,
  yrs.window,
  calc.yr,
  samples.out = TRUE,
  plot.pattern = TRUE,
  plot.posteriors = TRUE,
  plot.boxes = TRUE
)

Arguments

du.label

short label for the the Designatable Unit (DU)

du.df

data frame with the DU time series for : 2 columns, first one is "Year", second the abundance.

yrs.window

number of years to use for the percent change calculation (e.g. 3 gen +1)

calc.yr

year for which the perc change is calculated

samples.out

if TRUE, include the posterior samples in the output

plot.pattern

if TRUE, create a plot of the time series with alternative slope estimates

plot.boxes

if TRUE, create a plot of the posterior distributions (box plots)

plot.distributions

if TRUE, create a plot of the posterior distributions (kernel density plot)


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