Bootstrap-jacknife of flow calibration statistics
bootjack(
flows,
GOF_stat = c("NSE", "KGE"),
nSample = 1000,
waterYearMonth = 10,
startYear = NULL,
endYear = NULL,
minDays = 100,
minYears = 10,
returnSamples = FALSE,
seed = NULL,
bootYearFile = NULL
)Returns a data frame containing the goodness of fit statistic name
(i.e. NSE and/or KGE), and seJack = standard error of
jacknife, seBoot = standard error of bootstrap, p05, p50, p95,
the 5th, 50th and 95th percentiles of the estimates, score = jackknife
score, biasJack = bias of jackknife, biasBoot = bias of bootstap,
seJab = standard error of jackknife after bootstrap.
Required. Data frame containing the date, observed and simulated
flows. The variable names must be date, obs, and sim,
respectively. The date must be a standard R date.
Required. Name(s) of simulation goodness of fit statistic(s)
to be calculated. Currently both NSE and KGE are supported.
Required. Number of samples for bootstrapping.
Required. Month of beginning of water year. Default
is 10 (October). If the calendar year is required, set
waterYearMonth = 13.
Optional. First year of data to be used. If NULL
then not used.
Optional. Last year of data to be used. If NULL then
not used.
Required. Minimum number of days per year with valid (i.e. greater than 0) flows. Default is 100.
Required. Minimum number years to be used. Default is 10.
Optional. Default is FALSE. If TRUE, then
sample statistics are returned. This is primarily used for debugging/testing.
Optional. If NULL (the default) then no seed is specified
for the random number generator used for the bootstrapping. If a value is specified
then the bootstrapping will always use the same set of pseudo-random numbers.
Optional. If NULL (the default) the years used for
the bootstrapping are neither output nor input. If a file is specified, and it
it does not already exist, then the bootstrap years will be written to a .csv
file as a table with the dimensions of years x nSample. If a file is specified,
and it _does_ exist, then the years will be read in, and used for the bootstrapping.
Martyn Clark and Kevin Shook
read_CAMELS
NSE_stats <- bootjack(flows_1030500, "NSE")
Run the code above in your browser using DataLab