if (FALSE) {
# This example was used to numerically back into the TL-moments and the
# relation between \alpha and \lambda_2.
"lmomtrim1" <- function(para) {
bigF <- 0.999
minX <- para$para[1] - para$para[2]*qnorm(1 - bigF) / qunif(1 - bigF)
maxX <- para$para[1] + para$para[2]*qnorm( bigF) / qunif(1 - bigF)
minF <- cdfsla(minX, para); maxF <- cdfsla(maxX, para)
lmr <- theoTLmoms(para, nmom = 6, leftrim = 1, rightrim = 1)
}
U <- -10; i <- 0
As <- seq(.1,abs(10),by=.2)
L1s <- L2s <- T3s <- T4s <- T5s <- T6s <- vector(mode="numeric", length=length(As))
for(A in As) {
i <- i + 1
lmr <- lmomtrim1(vec2par(c(U, A), type="sla"))
L1s[i] <- lmr$lambdas[1]; L2s[i] <- lmr$lambdas[2]
T3s[i] <- lmr$ratios[3]; T4s[i] <- lmr$ratios[4]
T5s[i] <- lmr$ratios[5]; T6s[i] <- lmr$ratios[6]
}
print(summary(lm(L2s~As-1))$coe)
print(mean(T4s))
print(mean(T6s))
}
Run the code above in your browser using DataLab