| regfit {lmomRFA} | R Documentation |
Fits a frequency distribution to a vector of regional average
L-moments. Returns an object of class "rfd",
which contains the specification of the regional frequency distribution:
the quantile function, parameters of the regional growth curve,
and the index-flood values (site-specific scale factors) for each site.
regfit(regdata, dist)
regdata |
Object of class regdata, containing
summary statistics of the data for the sites in a region. |
dist |
Character string specifying the distribution to be fitted. See “Details” below. |
The function computes regional average L-moments
(by calling regavlmom) and fits a probability distribution
to the regional average L-moments.
For distribution dist there should exist a function to estimate
the parameters of the distribution given a set of L-moments.
The function should have a name that is the character string "pel"
followed by the character string dist.
It should accept a single argument, a vector containing L-moments
l_1, l_2, t_3, t_4, etc.,
and return a vector of distribution parameters.
For distribution dist there should also exist a quantile function,
which should have a name that is the character string
"qua" followed by the character string dist.
It should accept two arguments: a vector of probabilities
and a vector containing the parameters of the distribution.
The estimation routines and quantile functions in package lmom
have the form described here. For example, to fit a
generalized extreme value distribution set dist to be
the string "gev"; then the fitting function pelgev
and the quantile function quagev will be used.
An object of class "rfd",
containing the specification of the regional frequency distribution:
It is a list with the following elements:
dist |
The character string dist. |
para |
Vector containing the parameters of the fitted regional distribution. |
qfunc |
The quantile function of distribution dist.
It is a function that takes a single argument, a vector of probabilities,
and returns a vector of quantiles. |
rmom |
The regional average L-moments. |
index |
Index flood values at each site. This is a named vector
whose values are the index flood values at each site, from regdata[[3]],
and whose names are the site names, from regdata[[1]]. |
J. R. M. Hosking hosking@watson.ibm.com
data(Cascades) # An object of class "regdata"
rfit <- regfit(Cascades, "gno") # Fit a generalized normal distribution
rfit # Print details of the fitted distribution
# (components 'dist' and 'para')
rfit$index # Index flood values
evplot(rfit) # Plot the regional growth curve
evplot(qfunc=rfit$qfunc) # The same, but with more typing
evplot(qfunc=regqfunc(rfit)) # The same, with still more typing