EXP {nsRFA} | R Documentation

## 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

    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): 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.

`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, tau_3, tau_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

    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)

[Package nsRFA version 0.6-9 Index]