nsRFA (version 0.7-15)

GUMBEL: Two parameter Gumbel distribution and L-moments

Description

GUMBEL provides the link between L-moments of a sample and the two parameter Gumbel distribution.

Usage

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)

Arguments

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

Value

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 (\(\lambda_1\), \(\lambda_2\), \(\tau_3\), \(\tau_4\))), par.gumb gives the parameters (xi, alfa), and rand.gumb generates random deviates.

Details

See http://en.wikipedia.org/wiki/Fisher-Tippett_distribution for an introduction to the Gumbel distribution.

Definition

Parameters (2): \(\xi\) (location), \(\alpha\) (scale).

Range of \(x\): \(-\infty < x < \infty\).

Probability density function: $$f(x) = \alpha^{-1} \exp[-(x-\xi)/\alpha] \exp\{- \exp[-(x-\xi)/\alpha]\}$$

Cumulative distribution function: $$F(x) = \exp[-\exp(-(x-\xi)/\alpha)]$$

Quantile function: \(x(F) = \xi - \alpha \log(-\log F)\).

L-moments

$$\lambda_1 = \xi + \alpha \gamma$$ $$\lambda_2 = \alpha \log 2$$ $$\tau_3 = 0.1699 = \log(9/8)/ \log 2$$ $$\tau_4 = 0.1504 = (16 \log 2 - 10 \log 3)/ \log 2$$

Here \(\gamma\) is Euler's constant, 0.5772...

Parameters

$$\alpha=\lambda_2 / \log 2$$ $$\xi = \lambda_1 - \gamma \alpha$$

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.

See Also

rnorm, runif, EXP, GENLOGIS, GENPAR, GEV, KAPPA, LOGNORM, P3; DISTPLOTS, GOFmontecarlo, Lmoments.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab