GOF_summary {HyMETT}R Documentation

Calculate Goodness-of-fit metrics and output into table

Description

Calculate Goodness-of-fit (GOF) metrics for correlation, Kling–Gupta efficiency, mean absolute error, mean error, Nash–Sutcliffe efficiency, percent bias, root-mean-square error, normalized root-mean-square error, and volumetric efficiency, and output into a table.

Usage

GOF_summary(
  mod,
  obs,
  metrics = c("cor", "kge", "mae", "me", "nse", "pb", "rmse", "nrmse", "ve"),
  censor_threshold = NULL,
  censor_symbol = NULL,
  na.rm = TRUE,
  kge_modified = FALSE,
  nse_j = 2,
  rmse_normalize = c("mean", "range", "stdev", "iqr", "iqr-1", "iqr-2", "iqr-3", "iqr-4",
    "iqr-5", "iqr-6", "iqr-7", "iqr-8", "iqr-9", NULL),
  ...
)

Arguments

mod

'numeric' vector. Modeled or simulated values. Must be same length as obs.

obs

'numeric' vector. Observed or comparison values. Must be same length as mod.

metrics

'character' vector. Which GOF metrics should be computed and output. Default is c("cor", "kge", "mae", "me", "nse", "pb", "rmse", "nrmse", "ve").
"cor". Correlation tests computed from GOF_correlation_tests.
"kge". Kling–Gupta efficiency computed from GOF_kling_gupta_efficiency.
"mae". Mean absolute error computed from GOF_mean_absolute_error.
"me". Mean error computed from GOF_mean_error.
"nse". Nash–Sutcliffe efficiency computed from
GOF_nash_sutcliffe_efficiency with option for modified NSE specified by parameter nse_j.
"pb". Percent bias computed from GOF_percent_bias.
"rmse". Root-mean-square error computed from GOF_rmse.
"nrmse". Normalized root-mean-square error computed from GOF_rmse and "normalize" option specified in parameter rmse_normalize.
"ve". Volumetric efficiency computed from GOF_volumetric_efficiency.

censor_threshold

'numeric' value. Threshold to censor values on utilizing censor_values function. Default is NULL, no censoring. If level specified, must also specify
censor_symbol.

censor_symbol

'character' string. Inequality symbol to censor values based on censor_threshold utilizing censor_values function. Accepted values are
"gt" (greater than),
"gte" (greater than or equal to),
"lt" (less than),
or "lte" (less than or equal to).
Default is NULL, no censoring. If symbol specified, must also specify censor_value.

na.rm

'boolean' TRUE or FALSE. Should NA values be removed before computing. If any NA values are present in mod or obs, the ith position from each will be removed before calculating. If NA values are present and na.rm = FALSE, then function will return NA. Default is TRUE.

kge_modified

'boolean' TRUE or FALSE. Should the KGE calculation use the original variability ratio in the standard deviations (kge_modified = FALSE) or the modified variability ratio in the coefficient of variations (kge_modified = TRUE). Default is FALSE.

nse_j

'numeric' value. Exponent value for modified NSE (mNSE) equation, utilized if "nse" option is in parameter metrics. Default value is nse_j = 2, which is traditional NSE equation.

rmse_normalize

'character' value. Normalize option for NRMSE, utilized if "nrmse" option is in paramter metrics. Default is "mean". Options are
'mean'. RMSE is normalized by the mean of obs.
'range'. RMSE is normalized by the range (max - min) of obs.
'stdev'. RMSE is normalized by the standard deviation of obs.
'iqr-#'. RMSE is normalized by the inter-quartile range of obs, with distribution type (see stats::quantile function) indicated by integer number (for example "iqr-8"). If no type specified, default type is iqr-7, the quantile function default.

...

Further arguments to be passed to or from stats::cor.test if "cor" is in metrics.

Details

See GOF_correlation_tests, GOF_kling_gupta_efficiency,
GOF_mean_absolute_error, GOF_mean_error,
GOF_nash_sutcliffe_efficiency, GOF_percent_bias, GOF_rmse,
and GOF_volumetric_efficiency.

Value

A tibble (see tibble::tibble) with GOF metrics

See Also

censor_values, GOF_correlation_tests, GOF_kling_gupta_efficiency, GOF_mean_absolute_error, GOF_mean_error,
GOF_nash_sutcliffe_efficiency, GOF_percent_bias, GOF_rmse,
GOF_volumetric_efficiency

Examples

GOF_summary(mod = example_mod$streamflow_cfs, obs = example_obs$streamflow_cfs)


[Package HyMETT version 1.1.2 Index]