
Validate Hydrological Model Performance
calc_validation_results.Rd
Calculates validation metrics for simulated versus observed runoff using various transformation types.
Usage
calc_validation_results(
ind,
period_name,
col_name = "period",
Qsim,
Qobs,
val_crit_transfo = "KGE__none"
)
Arguments
- Qsim
A numeric vector of simulated runoff values.
- Qobs
A numeric vector of observed runoff values.
- val_crit_transfo
A character vector specifying validation criteria and runoff transformations, separated by
"__"
. Optionally, a third part can specify a lambda parameter. Supported criteria are those from thehydroGOF
package and must be compatible withcalc_hydroGOF
. Supported transformations are described intransfo_q
.
Value
A long-format data frame with columns:
crit
– the validation criterion used (e.g., "KGE", "NSE").transfo
– the runoff transformation applied (e.g., "log", "inv", "none").lambda
– the lambda parameter used for transformation, if applicable.value
– the resulting validation metric value.
Details
The function splits each entry in val_crit_transfo
into components: validation criterion,
transformation type, and optionally a lambda value. It applies the transformation to both
Qsim
and Qobs
, computes the specified metric, and returns the results in a tidy format.
Examples
validate_model(
Qsim = 1:10,
Qobs = seq(2, 11),
val_crit_transfo = c("KGE__log", "NSE__inv", "VE__none", "pbias__none")
)
#> # A tibble: 4 × 4
#> crit transfo lambda value
#> <chr> <chr> <chr> <dbl>
#> 1 KGE log NA 0.650
#> 2 NSE inv NA -0.930
#> 3 VE none NA 0.846
#> 4 pbias none NA -15.4