bootjack {gumboot}R Documentation

Bootstrap-jacknife of flow calibration statistics

Description

Bootstrap-jacknife of flow calibration statistics

Usage

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
)

Arguments

flows

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.

GOF_stat

Required. Name(s) of simulation goodness of fit statistic(s) to be calculated. Currently both NSE and KGE are supported.

nSample

Required. Number of samples for bootstrapping.

waterYearMonth

Required. Month of beginning of water year. Default is 10 (October). If the calendar year is required, set waterYearMonth = 13.

startYear

Optional. First year of data to be used. If NULL then not used.

endYear

Optional. Last year of data to be used. If NULL then not used.

minDays

Required. Minimum number of days per year with valid (i.e. greater than 0) flows. Default is 100.

minYears

Required. Minimum number years to be used. Default is 10.

returnSamples

Optional. Default is FALSE. If TRUE, then sample statistics are returned. This is primarily used for debugging/testing.

seed

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.

bootYearFile

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.

Value

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.

Author(s)

Martyn Clark and Kevin Shook

See Also

read_CAMELS

Examples

NSE_stats <- bootjack(flows_1030500, "NSE")

[Package gumboot version 1.0.1 Index]