Skip to contents

Fit a Bulletin 17C (log-Pearson Type III) flood-frequency model by the generalized method of moments and return the Cohn-style delta-method confidence intervals, the fitted parameters, and the sandwich covariance. Wraps the shared C++ Bulletin17CAnalysis.

Usage

bulletin17c_analysis(
  data,
  uncertainty_method = "MultivariateNormal",
  output_length = 10000L,
  seed = 12345L,
  confidence_level = 0.9,
  exceedance_probabilities = NULL
)

Arguments

data

numeric vector of annual peak observations.

uncertainty_method

uncertainty-quantification method: "MultivariateNormal" (default), "Bootstrap", "LinkedMultivariateNormal", or "BiasCorrectedBootstrap".

output_length

number of parameter-set draws used for uncertainty quantification.

seed

PRNG seed for the uncertainty draw.

confidence_level

confidence level for the intervals (e.g. 0.90).

exceedance_probabilities

optional numeric vector of exceedance probabilities; when NULL, the 25 standard default ordinates are used.

Value

A named list: exceedance_probabilities, point_estimates (log10 space), lower_ci, upper_ci (discharge space), confidence_level, beta1, nu, quantile_variance, parameters (fitted location/scale/shape), and covariance (the p x p sandwich covariance).

Examples

peaks <- c(12500, 15300, 8900, 22100, 18700, 14200, 9800, 28500, 17400, 11600,
           19200, 13800, 25600, 10500, 16900)
ci <- bulletin17c_analysis(peaks, output_length = 200, seed = 12345)
ci$confidence_level
#> [1] 0.9