Hydro3_Estimation {HydroPortailStats}R Documentation

Hydro3 estimation

Description

Main estimation function used in the HydroPortail. In short, this function estimates a distribution and the associated uncertainty, and returns all needed information to display and plot the results (parameter estimates, quantile curves, etc.)

Usage

Hydro3_Estimation(
  y,
  dist,
  Emeth = Emeth_def,
  Umeth = Umeth_def,
  options = options_def,
  mcmcoptions = mcmcoptions_def,
  prior = GetDefaultPrior(GetParNumber(dist)),
  do.KS = TRUE,
  do.MK = TRUE,
  do.Pettitt = TRUE
)

Arguments

y

numeric vector, data.

dist

character, distribution name. See dataset distInfo for a description of available distributions. In particular, type names(distInfo) for the list of available distributions, and distInfo[['GEV']] for more information on a particular distribution (here, GEV).

Emeth

character, estimation method. Default is 'LMOM' (L-Moments), available: 'MOM' (Moments), 'ML' (Maximum Likelihood), 'BAY' (Bayesian).

Umeth

character, uncertainty quantification method. Default is 'PBOOT' (Parametric bootstrap), available: 'BOOT' (Bootstrap, not recommended), 'NONE', 'ML' (only usable when Emeth='ML' as well), and 'BAY' (the only usable method when Emeth='BAY').

options

list, options, see details below.

mcmcoptions

list, MCMC options, see details below.

prior

list, prior distributions, only used when Emeth='BAY'. See ?GetEstimate_BAY for details.

do.KS, do.MK, do.Pettitt

logical, perform KS/MK/Pettitt tests?

Details

The argument 'options' allows controlling various properties of the analysis and results. It is a list with the following components:

The argument 'mcmcoptions' is only used when Emeth='BAY' and is a list controlling MCMC properties:

Value

A list with the following components:

dist

character, estimated distribution.

ok

logical, did estimation succeed?

err

integer, error code (0 if ok).

message

error message.

empirical

data frame, sorted data and empirical estimates (nonexceedance frequency, return period and reduced variate)

pcdf

data frame, estimated pdf and cdf

quantile

data frame, estimated quantiles and uncertainty intervals

par

data frame, estimated parameters and uncertainty intervals

KS

list, result of the Kolmogorov-Smirnov test, see ?KS

MK

list, result of the Mann-Kendall test, see ?MK

Pettitt

list, result of the Pettitt test, see ?Pettitt

u

list, parameter uncertainty in the form of a covariance matrix ($cov) and simulated parameter replicates ($sim). Also contains error-handling flags $ok, $err and $message.

Examples

y=stats::rnorm(50)
H3=Hydro3_Estimation(y,'Normal')
H3=Hydro3_Estimation(y,'GEV',Emeth='ML',Umeth='ML')

[Package HydroPortailStats version 1.0.3 Index]