GUMBEL {nsRFA} | R Documentation |
GUMBEL
provides the link between L-moments of a sample and the two parameter
Gumbel distribution.
f.gumb (x, xi, alfa) F.gumb (x, xi, alfa) invF.gumb (F, xi, alfa) Lmom.gumb (xi, alfa) par.gumb (lambda1, lambda2) rand.gumb (numerosita, xi, alfa)
x |
vector of quantiles |
xi |
vector of gumb location parameters |
alfa |
vector of gumb scale parameters |
F |
vector of probabilities |
lambda1 |
vector of sample means |
lambda2 |
vector of L-variances |
numerosita |
numeric value indicating the length of the vector to be generated |
See http://en.wikipedia.org/wiki/Fisher-Tippett_distribution for an introduction to the Gumbel distribution.
Definition
Parameters (2): ξ (location), α (scale).
Range of x: -∞ < x < ∞.
Probability density function:
f(x) = α^{-1} \exp[-(x-ξ)/α] \exp\{- \exp[-(x-ξ)/α]\}
Cumulative distribution function:
F(x) = \exp[-\exp(-(x-ξ)/α)]
Quantile function: x(F) = ξ - α \log(-\log F).
L-moments
λ_1 = ξ + α γ
λ_2 = α \log 2
τ_3 = 0.1699 = \log(9/8)/ \log 2
τ_4 = 0.1504 = (16 \log 2 - 10 \log 3)/ \log 2
Here γ is Euler's constant, 0.5772...
Parameters
α=λ_2 / \log 2
ξ = λ_1 - γ α
Lmom.gumb
and par.gumb
accept input as vectors of equal length. In f.gumb
, F.gumb
, invF.gumb
and rand.gumb
parameters (xi
, alfa
) must be atomic.
f.gumb
gives the density f, F.gumb
gives the distribution function F, invF.gumb
gives
the quantile function x, Lmom.gumb
gives the L-moments (λ_1, λ_2, τ_3, τ_4)), par.gumb
gives the parameters (xi
, alfa
), and rand.gumb
generates random deviates.
For information on the package and the Author, and for all the references, see nsRFA
.
rnorm
, runif
, EXP
, GENLOGIS
, GENPAR
, GEV
, KAPPA
, LOGNORM
, P3
; DISTPLOTS
, GOFmontecarlo
, Lmoments
.
data(hydroSIMN) annualflows[1:10,] summary(annualflows) x <- annualflows["dato"][,] fac <- factor(annualflows["cod"][,]) split(x,fac) camp <- split(x,fac)$"45" ll <- Lmoments(camp) parameters <- par.gumb(ll[1],ll[2]) f.gumb(1800,parameters$xi,parameters$alfa) F.gumb(1800,parameters$xi,parameters$alfa) invF.gumb(0.7686843,parameters$xi,parameters$alfa) Lmom.gumb(parameters$xi,parameters$alfa) rand.gumb(100,parameters$xi,parameters$alfa) Rll <- regionalLmoments(x,fac); Rll parameters <- par.gumb(Rll[1],Rll[2]) Lmom.gumb(parameters$xi,parameters$alfa)