eva | R Documentation |
Statistical (or categorical) evaluation from 2 data.frames. The input data.frames (model and observation) must contain a "date" column (containing POSIXlt). The function perform some simple case tests and perform the time pairing of observations and model data and can calculate the statistical evaluation or categorical evaluation.
eva(
mo,
ob,
rname = site,
table = NULL,
site = "ALL",
wd = FALSE,
fair = NULL,
cutoff = NA,
cutoff_NME = NA,
no_tz = FALSE,
nobs = 8,
eval_function = stat,
time = "date",
verbose = TRUE,
...
)
mo |
data.frame with model data |
ob |
data.frame with observation data |
rname |
row name of the output (default is site argument) |
table |
data.frame to append the results |
site |
name of the stations or "ALL" (default), see notes |
wd |
default is FALSE, see notes |
fair |
model data.frame (or list of names) to perform a fair comparison, see notes |
cutoff |
minimum (optionally the maximum) valid value for observation |
cutoff_NME |
minimum (optionally the maximum) valid value for observation for NME |
no_tz |
ignore tz from input (force GMT) |
nobs |
minimum number of valid observations, default is 8 |
eval_function |
evaluation function (default is stat) |
time |
name of the time column (containing time in POSIXct) |
verbose |
display additional information |
... |
arguments to be passing to stats and plot |
data.frame with statistical values from stat or cate functions.
fair can be a data.frame or a character string to be used for the analysis, alternatively the function
for wind direction a rotation of 360 (or -360) is applied to minimize the wind direction difference.
If site == 'ALL' (default) all the columns from observations are combined in one column (same for observation) and all the columns are evaluated together.
Special thanks to Kiarash and Libo to help to test the wind direction option.
stat
for additional information about the statistical evaluation and cate
for categorical evaluation.
model <- readRDS(paste0(system.file("extdata",package="eva3dm"),
"/model.Rds"))
obs <- readRDS(paste0(system.file("extdata",package="eva3dm"),
"/obs.Rds"))
# if there is no observed data
# the function return an empty row
table <- eva(mo = model, ob = obs, site = "VVIbes")
print(table)
# if the site are not in the input data frame a message is displayed
# and the function return an empty row
table <- eva(mo = model, ob = obs, site = "Ibirapuera")
print(table)
# calculating statistical with a few observed values
table <- eva(mo = model, ob = obs, site = "Americana")
print(table)
# calculating categorical (using 2 for threshold) with a few observed values
table <- eva(mo = model, ob = obs, site = "Americana",
eval_function = cate, threshold = 2)
print(table)
# calculating categorical (using 2 for threshold) with a few observed values
table <- eva(mo = model, ob = obs, site = "Americana",
eval_function = cate, threshold = 10)
print(table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.