Learn R Programming

UKFE (version 0.3.4)

UncSS: Uncertainty for the single site

Description

Quantifies the aleatoric uncertainty for a single site estimate, by bootstrapping the sample

Usage

UncSS(x, func, conf = 0.95, RP = NULL)

Value

A data.frame of three values; central, lower, and upper bootstrapped estimates.

Arguments

x

a numeric vector. The sample of interest

func

the function to be applied

conf

the confidence level of the intervals

RP

return period. Necessary if func requires RP

Author

Anthony Hammond

Details

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.

Examples

Run this code
#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