Numerical goodness-of-fit measures between sim and obs, with treatment of missing values.
gof(sim, obs, ...)# S3 method for default
gof(
sim,
obs,
na.rm = TRUE,
do.spearman = FALSE,
s = c(1, 1, 1),
method = c("2009", "2012"),
start.month = 1,
digits = 2,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
valindex(sim, obs, ...)
# S3 method for default
valindex(sim, obs, ...)
rPearson(sim, obs, ...)
# S3 method for default
rPearson(
sim,
obs,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
sKGE(sim, obs, ...)
# S3 method for default
sKGE(
sim,
obs,
s = c(1, 1, 1),
na.rm = TRUE,
method = c("2009", "2012"),
start.month = 1,
out.PerYear = FALSE,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
KGE(sim, obs, ...)
# S3 method for default
KGE(
sim,
obs,
s = c(1, 1, 1),
na.rm = TRUE,
method = c("2009", "2012", "2021"),
out.type = c("single", "full"),
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
NSE(sim, obs, ...)
# S3 method for default
NSE(
sim,
obs,
na.rm = TRUE,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
pbias(sim, obs, ...)
# S3 method for default
pbias(
sim,
obs,
na.rm = TRUE,
dec = 1,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
mae(sim, obs, ...)
# S3 method for default
mae(
sim,
obs,
na.rm = TRUE,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
VE(sim, obs, ...)
# S3 method for default
VE(
sim,
obs,
na.rm = TRUE,
fun = NULL,
...,
epsilon.type = c("none", "Pushpalatha2012", "otherFactor", "otherValue"),
epsilon.value = NA
)
gof
Returns a matrix of goodness of fit statistics. mae
, pbias
, NSE
, rPearson
, sKGE
, and KGE
return a numeric of the goodness of fit statistic.
numeric, vector of simulated values
numeric, vector of observed values
further arguments passed to/from other methods.
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 are removed before the computation.
logical, indicates if the Spearman correlation should be computed. The default is FALSE
.
argument passed to the KGE
function.
argument passed to the KGE
function.
argument passed to the sKGE
function.
integer, numer of decimal places used for rounding the goodness of fit indexes.
function to be applied to sim
and obs
in order to obtain transformed values thereof before applying any goodness-of-fit function
argument used to define a numeric value to be added to both sim
and obs
before applying fun. It was designed to allow the use of
logarithm and other similar functions that do not work with zero values. It must be one of the following possible values:
none: no value added to sim
or obs
.
Pushpalatha2012: one hundredth of the mean observed values is added to both sim
and obs
as described in Pushpalatha et al., 2012.
otherFactor: the numeric value defined in epsilon.value
is used to multiply the mean observed values instead of the one hundredth (1/100)
described in Pushpalatha et al., (2012). The resulting value is then added to both sim
and obs
.
otherValue: the numeric value defined in epsilon.value
is directly added to both sim
and obs
.
numeric, value to be added to both sim
and obs
when epsilon
= "otherValue".
logical, argument passed to the sKGE
function.
argument passed to the KGE
function.
argument passed to the pbias
function.
The gof
, mae
, pbias
, NSE
, rPearson
, sKGE
, and KGE
functions are provided to calculate goodness of fit statistics.
The functions were adapted from the hydroGOF package https://github.com/hzambran/hydroGOF.
gof(sim = sample(1:100), obs = sample(1:100))
Run the code above in your browser using DataLab