Davies (version 1.1-9)

expected.gld: expected value of the Generalized Lambda Distribution

Description

Returns the expected value of the Generalized Lambda Distribution

Usage

expected.gld(n=1, i=1, params)
expected.gld.approx(n=1, i=1, params)

Arguments

n

Number of observations

i

Order statistic: \(i=1\) means the smallest of \(n\), and \(n=i\) means the largest

params

The four parameters of a GLD distribution

Details

expected.gld and expected.approx return the exact and approximate values of the expected value of a Generalized Lambda Distribution RV.

Exploits the fact that the gld quantile function is the sum of a constant and two davies quantile functions

References

A. Ozturk and R. F. Dale, “Least squares estimation of the parameters of the generalized lambda distribution”, Technometrics 1985, 27(1):84 [it does not appear to be possible, as of R-2.9.1, to render the diacritic marks in the first author's names in a nicely portable way]

See Also

Gld , expected.value

Examples

Run this code
# NOT RUN {
params <- c(4.114,0.1333,0.0193,0.1588)
mean(rgld(1000,params))
expected.gld(n=1,i=1,params)
expected.gld.approx(n=1,i=1,params)


f <- function(n){apply(matrix(rgld(n+n,params),2,n),2,min)}
#ie f(n) gives the smaller of 2 rgld RVs, n times.

mean(f(1000))
expected.gld(n=2,i=1,params)
expected.gld.approx(n=2,i=1,params)

plot(1:100,expected.gld.approx(n=100,i=1:100,params)-expected.gld(n=100,i=1:100,params))
# not bad, eh? ....yyyeeeeesss, but the parameters given by Ozturk give
# an almost zero second derivative for d(qgld)/dp, so the good agreement
# isn't surprising really.  Observe that the error is minimized at about
# p=0.2, where the point of inflection is.
# }

Run the code above in your browser using DataLab