lmomgev | R Documentation |
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{.}
lmomgev(para)
para |
The parameters of the distribution. |
An R list
is returned.
lambdas |
Vector of the L-moments. First element is
|
ratios |
Vector of the L-moment ratios. Second element is
|
trim |
Level of symmetrical trimming used in the computation, which is |
leftrim |
Level of left-tail trimming used in the computation, which is |
rightrim |
Level of right-tail trimming used in the computation, which is |
source |
An attribute identifying the computational source of the L-moments: “lmomgev”. |
W.H. Asquith
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.
pargev
, cdfgev
, pdfgev
, quagev
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.