| EXP {nsRFA} | R Documentation |
EXP provides the link between L-moments of a sample and the two parameter
exponential distribution.
f.exp (x, xi, alfa) F.exp (x, xi, alfa) invF.exp (F, xi, alfa) Lmom.exp (xi, alfa) par.exp (lambda1, lambda2) rand.exp (numerosita, xi, alfa)
x |
vector of quantiles |
xi |
vector of exp location parameters |
alfa |
vector of exp 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 |
See http://en.wikipedia.org/wiki/Exponential_distribution for a brief introduction on the Exponential distribution.
Definition
Parameters (2): xi (lower endpoint of the distribution), α (scale).
Range of x: xi <= x < infty.
Probability density function:
f(x) = α^{-1} exp{-(x-xi)/α}
Cumulative distribution function:
F(x) = 1 - exp{-(x-xi)/α}
Quantile function:
x(F) = xi - α log(1-F)
L-moments
λ_1 = xi + α
λ_2 = 1/2 cdot α
tau_3 = 1/3
tau_4 = 1/6
Parameters
If xi is known, α is given by α = λ_1 - xi and the L-moment, moment, and maximum-likelihood estimators are identical. If xi is unknown, the parameters are given by
α = 2 λ_2
xi = λ_1 - α
For estimation based on a single sample these estimates are inefficient, but in regional frequency analysis they can give reasonable estimates of upper-tail quantiles.
f.exp gives the density f, F.exp gives the distribution function F, invFexp gives
the quantile function x, Lmom.exp gives the L-moments (λ_1, λ_2, tau_3, tau_4), par.exp gives the parameters (xi, alfa), and rand.exp generates random deviates.
Lmom.exp and par.exp accept input as vectors of equal length. In f.exp, F.exp, invF.exp and rand.exp parameters (xi, alfa) must be atomic.
Alberto Viglione, e-mail: alviglio@tiscali.it.
Hosking, J.R.M. and Wallis, J.R. (1997) Regional Frequency Analysis: an approach based on L-moments, Cambridge University Press, Cambridge, UK.
rnorm, runif, GENLOGIS, GENPAR, GEV, GUMBEL, KAPPA, LOGNORM, P3; DISTPLOTS, GOFmontecarlo, Lmoments.
data(hydroSIMN) annualflows summary(annualflows) x <- annualflows["dato"][,] fac <- factor(annualflows["cod"][,]) split(x,fac) camp <- split(x,fac)$"45" ll <- Lmoments(camp) parameters <- par.exp(ll[1],ll[2]) f.exp(1800,parameters$xi,parameters$alfa) F.exp(1800,parameters$xi,parameters$alfa) invF.exp(0.7870856,parameters$xi,parameters$alfa) Lmom.exp(parameters$xi,parameters$alfa) rand.exp(100,parameters$xi,parameters$alfa) Rll <- regionalLmoments(x,fac); Rll parameters <- par.exp(Rll[1],Rll[2]) Lmom.exp(parameters$xi,parameters$alfa)