Learn R Programming

hydroGOF (version 0.2-2)

gof: Numerical Goodness of Fit

Description

Numerical goodness of fit between sim and obs, with treatment of missing values. Several performance indexes for comparing two vectors, matrixes or data.frames

Usage

gof(sim, obs, ...)

## S3 method for class 'default': gof(sim, obs, na.rm=TRUE, do.spearman=FALSE, do.pbfdc=FALSE, digits=2,...)

Arguments

sim
numeric, zoo, matrix or data.frame with simulated values
obs
numeric, zoo, matrix or data.frame with observed values
na.rm
a logical value indicating whether 'NA' should be stripped before the computation proceeds. When an 'NA' value is found at the i-th position in obs OR sim, the i-th value of obs AND sim ar
do.spearman
logical. Indicates if the Spearman correlation has to be computed. The default is FALSE.
do.pbfdc
logical. Indicates if the Percent Bias in the Slope of the Midsegment of the Flow Duration Curve (pbiasfdc) has to be computed. The default is FALSE.
digits
decimal places used for rounding the goodness-of-fit indexes.
...
further arguments passed to or from other methods.

Value

  • meMean Error
  • maeMean Absolute Error
  • mseMean Squared Error
  • rmseRoot Mean Square Error
  • nrmseNormalized Root Mean Square Error ( -100% <= nrms="" <="100%" )<="" description="">
  • PBIASPercent Bias
  • pbiasfdcPBIAS in the slope of the midsegment of the Flow Duration Curve
  • RSRRatio of RMSE to the Standard Deviation of the Observations, RSR = rms / sd(obs). ( 0 <= rsr="" <="+Inf" )<="" description="">
  • rSDRatio of Standard Deviations, rSD = sd(sim) / sd(obs)
  • NSeffNash-Sutcliffe Efficiency ( -Inf <= nseff="" <="1" )<="" description="">
  • mNSeffModified Nash-Sutcliffe Efficiency
  • rNSeffRelative Nash-Sutcliffe Efficiency
  • dIndex of Agreement ( 0 <= d="" <="1" )<="" description="">
  • d1Modified Index of Agreement
  • rdRelative Index of Agreement
  • cpPersistence Index ( 0 <= pi="" <="1" )<="" description="">
  • rPearson Correlation coefficient ( -1 <= r="" <="1" )<="" description="">
  • r.SpearmanSpearman Correlation coefficient ( -1 <= r.spearman="" <="1" )<="" description="">
  • R2Coefficient of Determination ( 0 <= r2="" <="1" ).="" gives="" the="" proportion="" of="" variance="" one="" variable="" that="" is="" predictable="" from="" other="" variable<="" description="">
  • bR2R2 multiplied by the coefficient of the regression line between sim and obs ( 0 <= br2="" <="1" )<="" description="">
  • KGEKling-Gupta efficiency between sim and obs ( 0 <= kge="" <="1" )<="" description="">

References

Legates, D. R., and G. J. McCabe Jr. (1999), Evaluating the Use of "Goodness-of-Fit" Measures in Hydrologic and Hydroclimatic Model Validation, Water Resour. Res., 35(1), 233--241 Krause P., Boyle D.P., and B"{a}se F., Comparison of different efficiency criteria for hydrological model assessment, Advances in Geosciences 5 (2005), pp. 89--97 Moriasi, D.N., Arnold, J.G., Van Liew, M.W., Bingner, R.L., Harmel, R.D., Veith, T.L. 2007. Model evaluation guidelines for systematic quantification of accuracy in watershed simulations Transactions of the ASABE. 50(3):885-900 Boyle, D. P., H. V. Gupta, and S. Sorooshian (2000), Toward Improved Calibration of Hydrologic Models: Combining the Strengths of Manual and Automatic Methods, Water Resour. Res., 36(12), 3663--3674 Kitanidis, P. K., and R. L. Bras (1980), Real-Time Forecasting With a Conceptual Hydrologic Model 2. Applications and Results, Water Resour. Res., 16(6), 1034--1044 J.E. Nash and J.V. Sutcliffe, River flow forecasting through conceptual models. Part 1: a discussion of principles, J. Hydrol. 10 (1970), pp. 282--290 Yapo P. O., Gupta H. V., Sorooshian S., 1996. Automatic calibration of conceptual rainfall-runoff models: sensitivity to calibration data. Journal of Hydrology. v181 i1-4. 23--48 Yilmaz, K. K., H. V. Gupta, and T. Wagener (2008), A process-based diagnostic approach to model evaluation: Application to the NWS distributed hydrologic model, Water Resour. Res., 44, W09417, doi:10.1029/2007WR006716

See Also

me, mae, rmse, nrmse, pbias, pbiasfdc, rSD, NSeff, mNSeff, rNSeff, d, md, rd, cp, br2

Examples

Run this code
sim <- 1:10
obs <- 1:10
gof(sim, obs)

sim <- 2:11
obs <- 1:10
gof(sim, obs)

##################
# Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
require(zoo)
data(EgaEnEstellaQts)
obs <- EgaEnEstellaQts

# Generating a simulated daily time series, initially equal to the observed series
sim <- obs 

# Getting the numeric goodness of fit for the "best" (unattainable) case
gof(sim=sim, obs=obs)

# Randomly changing the first 2000 elements of 'sim', by using a normal distribution with mean 10 and standard deviation equal to 1 (default of 'rnorm').
sim[1:2000] <- obs[1:2000] + rnorm(2000, mean=10)

# Getting the new numeric goodness of fit
gof(sim=sim, obs=obs)

# Getting the graphical representation of 'obs' and 'sim' along with the numeric goodness of fit 
require(hydroTSM)
ggof(sim=sim, obs=obs)

Run the code above in your browser using DataLab