Compares model predictions against observed values
spwb_validation(x, measuredData, type = "SWC", cohort = NULL, draw = TRUE,
plotType = "dynamics")
A data frame with observed/measured values. Dates should be in row names, whereas columns should be named according to the type of output to be evaluated (see details).
A string with the kind of model output to be evaluated. Accepted values are "SWC"
(soil moisture content), "ETR"
(total evapotranspiration), "E"
(transpiration per leaf area) and "WP"
(plant water potentials).
A string of the cohort to be compared (e.g. "T1_68"). If NULL
results for the first cohort will be evaluated.
A boolean flag to indicate that plots should be produced.
Plot type to draw, either "dynamics"
or "scatter"
.
A ggplot or evaluation statistics (a vector or a data frame depending on type
):
MAE
: Mean absolute error.
Bias
: Mean deviation (positive values correspond to model overestimations).
R2
: Squared linear correlation coefficient.
Users should provide the appropriate columns in measuredData
, depending on the type of output to be evaluated:
"SWC"
: A column named "SWC"
should be present, containing soil moisture content in percent volume.
"ETR"
: A column named "ETR"
should be present, containing stand's evapotranspiration in mm/day. Observed values will be compared against modelled evapotranspiration (i.e. sum of transpiration, soil evaporation and interception loss) as well as against the sum of transpiration and soil evaporation only.
"E"
: For each plant cohort whose transpiration is to be evaluated, a column starting with "E_"
and continuing with a cohort name (e.g. "E_T1_68"
) with transpiration in mm/day on a leaf area basis.
"WP"
: For each plant cohort whose transpiration is to be evaluated, two columns, one starting with "PD_"
(for pre-dawn) and the other with "MD_"
(for midday), and continuing with a cohort name (e.g. "PD_T1_68"
). They should contain leaf water potential values in MPa. These are compared against sunlit water potentials.
Additional columns may exist with the standard error of measured quantities. These should be named as the referred quantity, followed by "_err"
(e.g. "PD_T1_68_err"
), and are used to draw confidence intervals around observations.