Fits an extreme value distribution using L-moments to the values provided. In the presence of zero flow observations a mixed distribution is fitted.
evfit(x, distribution, zeta = NULL, check = TRUE,
extreme = c("minimum", "maximum"))
An object of class 'evfit'
containing the L-moments and the estimated parameters is returned. Objects of class 'evfit'
are basically a list with the following elements:
the values x
used for fitting.
a character vector of length one. Frequency of zero flow observations.
logical, if the censored time was used for fitting.
a list as long as distribution
containing the estimated parameters for each distribution.
sample L-moments of the censored series (only containing non-zero values).
character vector of length one, indicating what kind of extreme value was fitted.
optional. If quantiles have been computed they a stored in a matrix with return periods in rows and distributions in columns.
numeric vector. Data which is an extreme value distribution is fitted to.
A character vector of distributions to fit. Basically all distributions provided by Hosking's lmom-package
and their reversed counterparts can be chosen. See reversing
.
numeric vector of length one for manually setting a lower bound. Only a few distributions allow for a lower bound, namely 'gpa'
, 'ln3'
, 'wak'
and 'wei'
. The default value of NULL
results in not bounding the distribution, therefore the parameter zeta
is estimated.
logical, should check_distribution
get called?
character vector of length one. Can be either 'minimum'
or 'maximum'
. Helps to choose a correct distribution.
This function is vectorized over distribution
.
According to paragraph 7.4.2 of the WNO manual, special care has to be taken in the presence of zero flow observations. A cdf called G(x) is fitted to the non-zero values of the original time series.
If a distribution is fitted which allows for finite lower bound (zeta
), and zeta
is estimated being negative, estimation is repeated constraining zeta = 0
. If this behavior is not desired, the parameter zeta
has to be set explicitly.
There are methods for printing summarizing objects of class 'evfit'
.
evfit
data("ngaruroro")
ng <- as.xts(ngaruroro)
minima <- as.vector(apply.yearly(ng$discharge, min, na.rm = TRUE))
evfit(x = minima, distribution = c("wei", "gevR"),
extreme = "minimum")
Run the code above in your browser using DataLab