Description Usage Arguments Details Value See Also Examples
CalcStatCont
inputs a data.table or data.frame having two columns of
observation and model/forecast and computes some verification measures of
continous variables. It also produce some plots based on how many statistics
have been calculated. If there is only one group, then scatter plot, qq_plot,
box_plot will be produce, desplayed on screen and returned in the output
under plotList. If there is more than one group, then histogram of all the
calculated statistics will be plotted and returned under plotList.
1 2 3 4 5 6  CalcStatCont(DT, obsCol, modCol, groupBy = NULL, obsMissing = NULL,
modMissing = NULL, obsCondRange = c(Inf, Inf), modCondRange = c(Inf,
Inf), statList = c("numPaired", "meanObs", "meanMod", "pearsonCor", "RMSE",
"multiBias"), probs = NULL, plot.it = TRUE, title = "",
plot.list = c("scatterPlot", "qqPlot", "boxPlot", "bivarHist"),
bins_histogram = 30, bins_stat_bin2d = 30)

DT 
A data.table or dataframe: containing two columns of observation (truth) and the model 
obsCol 
Character: name of the observation column. 
modCol 
Character: name of the model/forecast column. 
groupBy 
Character vector: Name of all the columns in 
obsMissing 
Numeric/Character vector: defining all the missing values in the observation 
modMissing 
Numeric/Character vector: defining all the missing values in the model/forecats 
obsCondRange 
Numeric vector: containing two elements (DEFAULT = c(Inf,Inf)). Values are used as the lower and upper boundary for observation in calculating conditional statistics. If conditioning only at one tail, leave the second value as Inf or Inf. For eaxmple, if interested on only values greater than 2, then obsCondRange = c(2, Inf) 
modCondRange 
Numeric vector: containing two elements (DEFAULT = c(Inf,Inf)). Values are used as the lower and upper boundary for model/forecast in calculating conditional statistics. If conditioning only at one tail, leave the second value as Inf or Inf. For eaxmple, if interested on only values greater than 2, then obsCondRange = c(2, Inf) 
statList 
Character vector: list of all the statistics you are interested. 
probs 
Numeric vector: probabilities with values in [0,1]. Only required if "quantiles" is one of the requested statistics. In that case, quantiles would be one column of the return data.frame, which will be contain a list of quantiles. 
plot.it 
Logical(DEFAULT = TRUE), define as FALSE if you do not need any plot. 
title 
Character: title to be used for plots. 
plot.list 
Vector: list of desired plot. It can plot scatter plot, QQ plot, boxPlot and Bivariate Histograms. By default, all will be plotted and returned in the output under plotList. 
bins_histogram 
Numeric: specifing the number of bins to be used in histograms 
bins_stat_bin2d 
Numeric: specifing the number of bins to be used in ggplot::stat_bin2d 
The calculated statistics are the following:
numPaired: number of paired datapoint
minObs: min of observation time series
minMod: min of model simulation/forecast time series
maxObs: max of observation time series
maxMod: max of model simulation/forecast time series
meanObs: mean of observation time series
meanMod: mean of model simulation/forecast time series
stdObs: standard deviation of observation time series
stdMod: standard deviation of model simulation/forecast time series
pearsonCor: Pearson correlation coefficient
spearmanCor: spearman correlation coefficient
kendallCor: kendall tau correlation coefficient (taub)
ME:mean error
multiBias: mutliplicative bias
MSE: mean square error
RMSE: root mean square error
MAE: mean absolute error
MAD: median absolute deviation
IQR: inter quantile range of the errors
E10: 10 percent of errors
E25: 25 percent of errors
E50: 50 percent of errors
E75: 75 percent of errors
E90: 90 percent of errors
RmseNorm, Kge, Nse, NseLog, BiasNorm and Bias which are rwrfhydro functions
For more information refer to Model Evaluation Tool (MET) documentation
list containing two elements: 1) stat: A data.frame containing all the requested verification measures. 2) plotList: A list of all plots produced
Other modelEvaluation: CalcModPerfMulti
,
CalcModPerf
,
CalcNoahmpFluxes
,
CalcNoahmpWatBudg
,
CalcStatCategorical
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  ## Not run:
ExampleDF < data.frame(obs=rnorm(1000), mod=rnorm(1000), stringsAsFactors=FALSE)
stat < CalcStatCont(DT = ExampleDF, obsCol = "obs", modCol = "mod")
ExampleDF < data.frame(obs=rnorm(10000000), mod=rnorm(10000000), stringsAsFactors=FALSE)
stat < CalcStatCont(DT = ExampleDF, obsCol = "obs", modCol = "mod", plot.it = FALSE)
ExampleDF < data.frame(siteId = rep(1:100, 10), obs=seq(1,1000),
mod=seq(1000,1), stringsAsFactors=FALSE)
stat < CalcStatCont(DT = ExampleDF, obsCol = "obs", modCol = "mod", groupBy = "siteId")
ExampleDF < data.frame(siteId = rep(1:10, 6), RFC = rep(c("ABRFC", "WGRFC", "MARFC"),each = 20),
obs=seq(1,60), mod=seq(60,1))
stat < CalcStatCont(DT = ExampleDF, obsCol = "obs",
modCol = "mod", groupBy = c("siteId", "RFC"))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.