Good of fitting

GOF(obs, sim, w, include.cv = FALSE, include.r = TRUE)

KGE(obs, sim, w = c(1, 1, 1), ...)

NSE(obs, sim, w, ...)

Arguments

obs

Numeric vector, observations

sim

Numeric vector, corresponding simulated values

w

Numeric vector, weights of every points. If w included, when calculating mean, Bias, MAE, RMSE and NSE, w will be taken into considered.

include.cv

If true, cv will be included.

include.r

If true, r and R2 will be included.

...

ignored

Value

  • RMSE root mean square error

  • NSE NASH coefficient

  • MAE mean absolute error

  • AI Agreement index (only good points (w == 1)) participate to calculate. See details in Zhang et al., (2015).

  • Bias bias

  • Bias_perc bias percentage

  • n_sim number of valid obs

  • cv Coefficient of variation

  • R2 correlation of determination

  • R pearson correlation

  • pvalue pvalue of R

References

  1. https://en.wikipedia.org/wiki/Coefficient_of_determination

  2. https://en.wikipedia.org/wiki/Explained_sum_of_squares

  3. https://en.wikipedia.org/wiki/Nash%E2%80%93Sutcliffe_model_efficiency_coefficient

  4. Zhang Xiaoyang (2015), http://dx.doi.org/10.1016/j.rse.2014.10.012

Examples

obs = rnorm(100)
sim = obs + rnorm(100)/4
GOF(obs, sim)
#> # A tibble: 1 × 11
#>       R   pvalue    R2   NSE   KGE  RMSE   MAE   Bias Bias_perc    AI n_sim
#>   <dbl>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>     <dbl> <dbl> <int>
#> 1 0.972 2.80e-63 0.944 0.941 0.709 0.254 0.211 0.0287     0.406 0.985   100