Quantifies the aleatoric uncertainty for a single site estimate, by bootstrapping the sample
UncSS(x, func, conf = 0.95, RP = NULL)
A data.frame of three values; central, lower, and upper bootstrapped estimates.
a numeric vector. The sample of interest
the function to be applied
the confidence level of the intervals
return period. Necessary if func requires RP
Anthony Hammond
The bootstrapping procedure resamples from a sample N*500 times with replacement. After splitting into 500 samples of size N, the statsitic of interest is calculated on each. upper and lower quantiles of the resulting distribution are used as the quantification of uncertainty. Any function that provides an estimate based on a sample of data can be used. Including any function that provides estimates as a function of return period.
#Extract an AMAX sample and quantify uncertainty for the GEV estimated 50-year flow
AM.203018 <- GetAM(203018)
UncSS(AM.203018$Flow, func = GEVAM, RP = 50)
#Quantify uncertainty for the sample standard deviation at the 90 percent confidence level
UncSS(AM.203018$Flow, func = sd, conf = 0.90)
Run the code above in your browser using DataLab