GoF: Wrapper function for the 'gof' function from 'hydroGOF'...

View source: R/GoF.R

GoFR Documentation

Wrapper function for the gof function from hydroGOF package

Description

A wrapper function for the gof function from hydroGOF package

Usage

GoF(eval, col_sim, col_obs, name)

Arguments

eval

A matrix or data.frame with n observations of at least two variables: simulations and observations.

col_sim

A numeric value defining the column in eval data.frame that contains the simulated vector time series.

col_obs

A numeric value defining the column in eval data.frame that contains the observed vector time series.

name

A character string that defines the name of the files (.csv and .RData) created with the results. If missing then no files are created.

Value

A vector with 20 elements for each one of the following measures of godness-of-fit: 1) ME, mean error; 2) MAE, mean absolute error; 3) MSE, mean squared error; 4) RMSE, root mean square error; 5) NRMSE %, normalized root square error; 6) PBIAS %, percent bias; 7) RSR, Ratio of RMSE to the standard deviation of the observations; 8) rSD, Ratio of Standard Deviations; 9) NSE, Nash-Sutcliffe Efficiency; 10) mNSE, modified Nash-Sutcliffe efficiency; 11) rNSE, relative Nash-Sutcliffe efficiency; 12) d, Index of Agreement; 13) md, Modified index of agreement; 14) rd, Relative Index of Agreement; 15) cp,Coefficient of persistence; 16) r, Pearson product-moment correlation coefficient; 17) R2, Coefficient of Determination; 18) bR2, Coefficient of determination (r2) multiplied by the slope of the regression line between sim and obs; 19) KGE,Kling-Gupta Efficiency; 20) VE, Volumetric Efficiency.

Author(s)

J.A. Torres-Matallana

References

Mauricio Zambrano-Bigiarini, 2014. hydroGOF: Goodness-of-fit functions for comparison of simulated and observed hydrological time series. R package version 0.3-8.
https://CRAN.R-project.org/package=hydroGOF.

Examples

library(stUPscales)

data_new <- rnorm(230, .25, .1)  
data_new <- cbind(data_new, data_new*1.2)
colnames(data_new) <- c("sim", "obs")
head(data_new)

gof.new <- GoF(data_new, 1, 2)
gof.new

# writing files
gof.new <- GoF(data_new, 1, 2, "GoF_results")

stUPscales documentation built on Sept. 18, 2023, 9:07 a.m.