View source: R/Module_comparePercChange.R
comparePercChange | R Documentation |
this function calculates 3 alternative versions of the Perc Change metric: 1 deterministic (MLE) and 2 Bayesian (JAGS via rjags, STAN via RStanArm)
comparePercChange( du.label, du.df, yrs.window, calc.yr, samples.out = TRUE, plot.pattern = TRUE, plot.posteriors = TRUE, plot.boxes = TRUE )
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) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.