lmomgev: L-moments of the Generalized Extreme Value Distribution

lmomgevR Documentation

L-moments of the Generalized Extreme Value Distribution

Description

This function estimates the L-moments of the Generalized Extreme Value distribution given the parameters (\xi, \alpha, and \kappa) from pargev. The L-moments in terms of the parameters are

\lambda_1 = \xi + \frac{\alpha}{\kappa}(1-\Gamma(1+\kappa)) \mbox{,}

\lambda_2 = \frac{\alpha}{\kappa}(1-2^{-\kappa})\Gamma(1+\kappa) \mbox{,}

\tau_3 = \frac{2(1-3^{-\kappa})}{1-2^{-\kappa}} - 3 \mbox{, and}

\tau_4 = \frac{5(1-4^{-\kappa})-10(1-3^{-\kappa})+6(1-2^{-\kappa})}{1-2^{-\kappa}} \mbox{.}

Usage

lmomgev(para)

Arguments

para

The parameters of the distribution.

Value

An R list is returned.

lambdas

Vector of the L-moments. First element is \lambda_1, second element is \lambda_2, and so on.

ratios

Vector of the L-moment ratios. Second element is \tau, third element is \tau_3 and so on.

trim

Level of symmetrical trimming used in the computation, which is 0.

leftrim

Level of left-tail trimming used in the computation, which is NULL.

rightrim

Level of right-tail trimming used in the computation, which is NULL.

source

An attribute identifying the computational source of the L-moments: “lmomgev”.

Author(s)

W.H. Asquith

References

Hosking, J.R.M., 1990, L-moments—Analysis and estimation of distributions using linear combinations of order statistics: Journal of the Royal Statistical Society, Series B, v. 52, pp. 105–124.

Hosking, J.R.M., 1996, FORTRAN routines for use with the method of L-moments: Version 3, IBM Research Report RC20525, T.J. Watson Research Center, Yorktown Heights, New York.

Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis—An approach based on L-moments: Cambridge University Press.

See Also

pargev, cdfgev, pdfgev, quagev

Examples

lmr <- lmoms(c(123,34,4,654,37,78))
lmomgev(pargev(lmr))

## Not run: 
# The Gumbel is a limiting version of the maxima regardless of parent. The GLO,
# PE3 (twice), and GPA are studied here. A giant number of events to simulate is made.
# Then numbers of events per year before the annual maxima are computed are specified.
# The Gumbel is a limiting version of the maxima regardless of parent. The GLO,
# PE3 (twice), and GPA are studied here. A giant number of events to simulate is made.
# Then numbers of events per year before the annual maxima are computed are specified.
nevents <- 100000
nev_yr <- c(1,2,3,4,5,6,10,15,20,30,50,100,200,500); n <- length(nev_yr)
pdf("Gumbel_in_the_limit.pdf", useDingbats=FALSE)
# Draw the usually L-moment ratio diagram but only show a few of the
# three parameter families.
plotlmrdia(lmrdia(), xlim=c(-.5,0.5), ylim=c(0,0.3), nopoints=TRUE,
           autolegend=TRUE, noaep4=TRUE, nogov=TRUE, xleg=0.1, yleg=0.3)
gum <- lmrdia()$gum # extract the L-skew and L-kurtosis of the Gumbel
points(gum[1], gum[2], pch=10, cex=3, col=2) # draw the Gumbel

para <- parglo(vec2lmom(c(1,.1,0))) # generalized logistic
t3 <- t4 <- rep(NA, n) # define
for(k in 1:n) { # generate GLO time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/nev_yr[k], function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=3)

para <- parglo(vec2lmom(c(1,.1,0.3))) # generalized logistic
t3 <- t4 <- rep(NA, n) # define
for(k in 1:n) { # generate GLO time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/nev_yr[k], function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=3)

para <- parglo(vec2lmom(c(1,.1,-0.3))) # generalized logistic
t3 <- t4 <- rep(NA, n) # define
for(k in 1:n) { # generate GLO time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/nev_yr[k], function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=3)

para <- parpe3(vec2lmom(c(1,.1,.4))) # Pearson type III
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate PE3 time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=6)

para <- parpe3(vec2lmom(c(1,.1,0))) # Pearson type III
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate another PE3 time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=6)

para <- parpe3(vec2lmom(c(1,.1,-.4))) # Pearson type III
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate PE3 time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=6)

para <- pargpa(vec2lmom(c(1,.1,0))) # generalized Pareto
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate GPA time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=4)

para <- pargpa(vec2lmom(c(1,.1,.4))) # generalized Pareto
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate GPA time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=4)

para <- pargpa(vec2lmom(c(1,.1,-.4))) # generalized Pareto
t3 <- t4 <- rep(NA, n) # reset
for(k in 1:n) { # generate GPA time series of annual maxima with k-events per year
   lmr <- lmoms(sapply(1:nevents/k, function(i) max(rlmomco(nev_yr[k], para))))
   t3[k] <- lmr$ratios[3]; t4[k] <- lmr$ratios[4]
}
lines(t3, t4, lwd=0.8); points(t3, t4, lwd=0.8, pch=21, bg=4)
dev.off() #
## End(Not run)

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.