Skip to contents

DOI

License: GPL (>= 2) Lifecycle: stable Dependencies Documentation

GitHub package version (development) CRAN status R-CMD-check CRAN downloads (monthly) Downloads

Description

hydroGOF is an R package developed to provide a rigorous and consistent framework for evaluating the performance of hydrological and environmental models. It implements a broad suite of widely used statistical and graphical goodness-of-fit metrics to compare simulatd values agains iits observed counterparts; such as the coefficient of determination (R²), Nash–Sutcliffe efficiency (NSE), Kling–Gupta efficiency (KGE), and percent bias (PBIAS); that support objective assessment of model behaviour during calibration, validation, and operational application.

The package is designed with practical modelling workflows in mind. Its functions facilitate transparent comparison between observed and simulated time series, enable systematic performance diagnostics, and handle common data challenges such as missing values in a controlled and reproducible manner. By standardising the computation of performance indicators, hydroGOF helps ensure that model evaluation remains methodologically consistent across studies and applications.

hydroGOF is widely used in research, teaching, and professional practice, which makes it particularly suitable for users who require dependable, well-documented tools to quantify model accuracy and communicate results with clarity. It provides a technically robust foundation for evidence-based model development, benchmarking, and decision support in hydrology and related environmental sciences.

Installation

Installing the latest stable version from CRAN:

install.packages("hydroGOF")

Alternatively, you can also try the under-development version from Github:

if (!require(devtools)) install.packages("devtools")
library(devtools)
install_github("hzambran/hydroGOF")

Reporting bugs, requesting new features

If you find an error in some function, or want to report a typo in the documentation, or to request a new feature (and wish it be implemented :) you can do it here

Citation

citation("hydroGOF")

To cite hydroGOF in publications use:

Zambrano-Bigiarini, Mauricio (2026). hydroGOF: Goodness-of-fit functions for comparison of simulated and observed hydrological time series. R package version 0.7-0. URL:https://cran.r-project.org/package=hydroGOF. doi:10.32614/CRAN.package.hydroGOF.

A BibTeX entry for LaTeX users is

@Manual{hydroGOF,
title = {hydroGOF: Goodness-of-fit functions for comparison of simulated and observed hydrological time series},
author = {Zambrano-Bigiarini, Mauricio},
note = {R package version 0.7-0},
year = {2026}, url = {https://cran.r-project.org/package=hydroGOF},
doi = {10.32614/CRAN.package.hydroGOF},
}

Goodness-of-fit measures

Quantitative statistics included in this package are:

Acronym Name Range of variation Main reference
me Mean Error -Inf to +Inf Hill et al. (2006)
mae Mean Absolute Error 0 to +Inf Hodson (2022)
mse Mean Squared Error 0 to +Inf Yapo et al. (1996)
rmse Root Mean Square Error 0 to +Inf Willmott and Matsuura (2005)
ubRMSE Unbiased Root Mean Square Error 0 to +Inf Entekhabi et al. (2010)
nrmse Normalized Root Mean Square Error 0 to +Inf Moriasi et al. (2007)
pbias Percent Bias -Inf to +Inf [%] Yapo et al. (1996)
rsr Ratio of RMSE to the Standard Deviation of the Observations 0 to +Inf Moriasi et al. (2007)
rSD Ratio of Standard Deviations 0 to +Inf Moriasi et al. (2007)
NSE Nash-Sutcliffe Efficiency -Inf to 1 Nash and Sutcliffe (1970)
mNSE Modified Nash-Sutcliffe Efficiency -Inf to 1 Krause et al. (2005)
rNSE Relative Nash-Sutcliffe Efficiency -Inf to 1 Legates and McCabe (1999)
wNSE Weighted Nash-Sutcliffe Efficiency -Inf to 1 Hundecha and Bardossy (2004)
wsNSE Weighted Seasonal Nash-Sutcliffe Efficiency -Inf to 1 Zambrano-Bigiarini and Bellin (2012)
d Index of Agreement 0 to 1 Willmott (1981)
dr Refined Index of Agreement -1 to 1 Willmott et al. (2012)
md Modified Index of Agreement 0 to 1 Krause et al. (2005)
rd Relative Index of Agreement 0 to 1 Krause et al. (2005)
cp Coefficient of Persistence 0 to 1 Kitanidis and Bras (1980)
rPearson Pearson Correlation Coefficient -1 to 1 Pearson (1920)
R2 Coefficient of Determination 0 to 1 Box (1966)
br2 Weighted Coefficient of Determination 0 to 1 Krause et al. (2005)
VE Volumetric Efficiency -Inf to 1 Criss and Winston (2008)
KGE Kling-Gupta Efficiency -Inf to 1 Gupta et al. (2009)
KGElf Kling-Gupta Efficiency with Focus on Low Flows -Inf to 1 Garcia et al. (2017)
KGEnp Non-parametric Kling-Gupta Efficiency -Inf to 1 Pool et al. (2018)
KGEkm Knowable Moments Kling-Gupta Efficiency -Inf to 1 Pizarro and Jorquera (2024)
JDKGE Joint Divergence Kling-Gupta Efficiency -Inf to 1 Ficchi et al. (2026)
LME Liu-Mean Efficiency -Inf to 1 Liu (2020)
LCE Lee and Choi Efficiency -Inf to 1 Lee and Choi (2022)
sKGE Split Kling-Gupta Efficiency -Inf to 1 Fowler et al. (2018)
APFB Annual Peak Flow Bias 0 to +Inf Mizukami et al. (2019)
HFB High Flow Bias 0 to +Inf Zambrano-Bigiarini (2026)
PMR Proxy for Model Robustness 0 to +Inf Royer-Gaspard et al. (2021)
rSpearman Spearman’s Rank Correlation Coefficient -1 to 1 Spearman (1961)
pbiasfdc PBIAS in the Slope of the Midsegment of the Flow Duration Curve 0 to +Inf Yilmaz et al. (2008)
ssq Sum of the Squared Residuals 0 to +Inf Willmott et al. (2009)
pfactor P-factor 0 to 1 Abbaspour et al. (2009)
rfactor R-factor 0 to +Inf Abbaspour et al. (2009)

References

Vignette

Here you can find an introductory vignette illustrating the use of several hydroGOF functions.

  • R: a statistical environment for hydrological analysis (EGU-2010) abstract, poster.

  • Comparing Goodness-of-fit Measures for Calibration of Models Focused on Extreme Events (EGU-2012) abstract, poster.

  • Using R for analysing spatio-temporal datasets: a satellite-based precipitation case study (EGU-2017) abstract, poster.