Learn R Programming

hydroGOF (version 0.2-2)

KGE: Kling-Gupta Efficiency

Description

Kling-Gupta efficiency between sim and obs, with treatment of missing values.

This goodness-of-fit measure was developed by Gupta et al. (2009) to provide a diagnostically interesting decomposition of the Nash-Sutcliffe efficiency (and hence MSE), which facilitates the analysis of the relative importance of its different components in the context of hydrological modelling".

In the computation of this index, there are three main components involved: -) r : the Pearson product-moment correlation coefficient. Ideal value is r=1. -) Alpha: the ratio between the standard deviation of the simulated values and the standard deviation of the observed ones. Ideal value is Alpha=1. -) Beta : the ratio between the mean of the simulated values and the mean of the observed ones. Ideal value is Beta=1. In order to fully understand this index, please read the reference.

Usage

KGE(sim, obs, ...)

## S3 method for class 'default': KGE(sim, obs, s=c(1,1,1), na.rm=TRUE, ...)

## S3 method for class 'data.frame': KGE(sim, obs, s=c(1,1,1), na.rm=TRUE, ...)

## S3 method for class 'matrix': KGE(sim, obs, s=c(1,1,1), na.rm=TRUE, ...)

Arguments

sim
numeric, zoo, matrix or data.frame with simulated values
obs
numeric, zoo, matrix or data.frame with observed values
s
numeric of length 3, representing the scaling factors to be used for re-scaling the criteria space before computing the Euclidean distance from the ideal point c(1,1,1), i.e., s elements are used for adjusting the emphasis on different compon
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
...
further arguments passed to or from other methods.

Value

  • Kling-Gupta efficiency between sim and obs. If sim and obs are matrixes, the returned value is a vector, with the Kling-Gupta efficiency between each column of sim and obs.

Details

$$KGE = 1 - ED$$ $$ED = \sqrt{ (s[1]*(r-1))^2 +(s[2]*(\alpha-1))^2 + (s[3]*(\beta-1))^2 }$$ $$\alpha=\sigma_s/\sigma_o$$ $$\beta=\mu_s/\mu_o$$

Kling-Gupta efficiencies range from -Inf to 1. Essentially, the closer to 1, the more accurate the model is.

References

Hoshin V. Gupta, Harald Kling, Koray K. Yilmaz, Guillermo F. Martinez. Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling. Journal of Hydrology, Volume 377, Issues 1-2, 20 October 2009, Pages 80-91. DOI: 10.1016/j.jhydrol.2009.08.003. ISSN 0022-1694

See Also

mNSeff, rNSeff

Examples

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

obs <- 1:10
sim <- 2:11
KGE(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 

# Computing the 'KGE' for the "best" (unattainable) case
KGE(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)

# Computing the new 'KGE'
KGE(sim=sim, obs=obs)

Run the code above in your browser using DataLab