Learn R Programming

hydroGOF (version 0.2-2)

NSeff: Nash-Sutcliffe Efficiency

Description

Nash-Sutcliffe efficiency between sim and obs, with treatment of missing values.

Usage

NSeff(sim, obs, ...)

## S3 method for class 'default': NSeff(sim, obs, na.rm=TRUE, ...)

## S3 method for class 'data.frame': NSeff(sim, obs, na.rm=TRUE, ...)

## S3 method for class 'matrix': NSeff(sim, obs, na.rm=TRUE, ...)

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
...
further arguments passed to or from other methods.

Value

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

Details

$$NSeff = 1 -\frac { \sum_{i=1}^N { \left( S_i - O_i \right)^2 } } { \sum_{i=1}^N { \left( O_i - \bar{O} \right)^2 } }$$

The Nash-Sutcliffe efficiency (NSeff) is a normalized statistic that determines the relative magnitude of the residual variance ("noise") compared to the measured data variance ("information") (Nash and Sutcliffe, 1970). NSeff indicates how well the plot of observed versus simulated data fits the 1:1 line. Nash-Sutcliffe efficiencies range from -Inf to 1. Essentially, the closer to 1, the more accurate the model is. -) NSeff = 1, corresponds to a perfect match of modelled to the observed data. -) NSeff = 0, indicates that the model predictions are as accurate as the mean of the observed data, -) -Inf < NSeff < 0, indicates that the observed mean is better predictor than the model.

References

Nash, J. E. and J. V. Sutcliffe (1970), River flow forecasting through conceptual models part I -A discussion of principles, Journal of Hydrology, 10 (3), 282-290 http://en.wikipedia.org/wiki/Nash%E2%80%93Sutcliffe_model_efficiency_coefficient

See Also

mNSeff, rNSeff

Examples

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

obs <- 1:10
sim <- 2:11
NSeff(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 'NSeff' for the "best" (unattainable) case
NSeff(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 'NSeff'
NSeff(sim=sim, obs=obs)

Run the code above in your browser using DataLab