Nash-Sutcliffe Efficiency
Nash-Sutcliffe efficiency between sim
and obs
, with treatment of missing values.
NSE(sim, obs, ...) ## Default S3 method: NSE(sim, obs, na.rm=TRUE, FUN=NULL, epsilon=c(0, "Pushpalatha2012", "other"), epsilon.value=NA, ...) ## S3 method for class 'data.frame' NSE(sim, obs, na.rm=TRUE, FUN=NULL, epsilon=c(0, "Pushpalatha2012", "other"), epsilon.value=NA, ...) ## S3 method for class 'matrix' NSE(sim, obs, na.rm=TRUE, FUN=NULL, epsilon=c(0, "Pushpalatha2012", "other"), epsilon.value=NA, ...) ## S3 method for class 'zoo' NSE(sim, obs, na.rm=TRUE, FUN=NULL, epsilon=c(0, "Pushpalatha2012", "other"), epsilon.value=NA, ...)
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. |
FUN |
function to be applied to |
epsilon |
argument used to define a numeric value to be added to both |
epsilon.value |
numeric value to be added to both |
... |
further arguments passed to |
NSE = 1 - ( sum( (obs - sim)^2 ) / sum( (obs - mean(obs))^2 )
The Nash-Sutcliffe efficiency (NSE) 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).
NSE 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.
-) NSE = 1, corresponds to a perfect match of modelled to the observed data.
-) NSE = 0, indicates that the model predictions are as accurate as the mean of the observed data,
-) -Inf < NSE < 0, indicates that the observed mean is better predictor than the model.
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
.
obs
and sim
has to have the same length/dimension
The missing values in obs
and sim
are removed before the computation proceeds, and only those positions with non-missing values in obs
and sim
are considered in the computation
Mauricio Zambrano Bigiarini <mzb.devel@gmail.com>
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
Pushpalatha, R., Perrin, C., Le Moine, N. and Andreassian, V. (2012). A review of efficiency criteria suitable for evaluating low-flow simulations. Journal of Hydrology, 420, 171-182. DOI: 10.1016/j.jhydrol.2011.11.055
obs <- 1:10 sim <- 1:10 NSE(sim, obs) obs <- 1:10 sim <- 2:11 NSE(sim, obs) ################# # Computing NSE on the (natural) logarithm of simulated and observed values obs <- 1:10/10 sim <- 2:11/10 NSE(sim=sim, obs=obs, FUN=log) ################## # Loading daily streamflows of the Ega River (Spain), from 1961 to 1970 data(EgaEnEstellaQts) obs <- EgaEnEstellaQts # Generating a simulated daily time series, initially equal to the observed series sim <- obs # Computing the 'NSE' for the "best" (unattainable) case NSE(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 'NSE' NSE(sim=sim, obs=obs)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.