Two parameter exponential distribution and L-moments

Description

EXP provides the link between L-moments of a sample and the two parameter exponential distribution.

Usage

1
2
3
4
5
6
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)

Arguments

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

Details

See http://en.wikipedia.org/wiki/Exponential_distribution for a brief introduction on the Exponential distribution.

Definition

Parameters (2): ξ (lower endpoint of the distribution), α (scale).

Range of x: ξ ≤ x < ∞.

Probability density function:

f(x) = α^{-1} \exp\{-(x-ξ)/α\}

Cumulative distribution function:

F(x) = 1 - \exp\{-(x-ξ)/α\}

Quantile function:

x(F) = ξ - α \log(1-F)

L-moments

λ_1 = ξ + α

λ_2 = 1/2 \cdot α

τ_3 = 1/3

τ_4 = 1/6

Parameters

If ξ is known, α is given by α = λ_1 - ξ and the L-moment, moment, and maximum-likelihood estimators are identical. If ξ is unknown, the parameters are given by

α = 2 λ_2

ξ = λ_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.

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.

Value

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, τ_3, τ_4), par.exp gives the parameters (xi, alfa), and rand.exp generates random deviates.

Note

For information on the package and the Author, and for all the references, see nsRFA.

See Also

rnorm, runif, GENLOGIS, GENPAR, GEV, GUMBEL, KAPPA, LOGNORM, P3; DISTPLOTS, GOFmontecarlo, Lmoments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.