Description Usage Arguments Value Author(s) See Also Examples
Calculate the relative error (RE; [EM - OM]/OM) of
parameters and derived quantities stored in a scalar or time series
data frame generated by get_results_all
.
1 | calculate_re(dat, add = TRUE)
|
dat |
An input data frame. Should be either a scalar or time series
data frame as returned from |
add |
Logical: should the relative error columns be added to |
The default is to return a data frame structured the same as the
input data frame, i.e., dat
, but with additional columns, where
'_re'
is appended to the base string of the column name.
All NAN
and Inf
values are returned as NA
values,
typically because you cannot divide by zero.
Sean Anderson and Cole Monnahan
get_results_all
, link{get_results_scenario}
1 2 3 4 5 6 7 | # Example with built in package data:
data("ts_dat", package = "ss3sim")
data("scalar_dat", package = "ss3sim")
head(calculate_re(ts_dat))
head(calculate_re(ts_dat, add = FALSE))
head(calculate_re(scalar_dat, add = FALSE))
rm("ts_dat", "scalar_dat")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.