Learn R Programming

exptest (version 1.2)

lorenz.exp.test: Lorenz test for exponentiality

Description

Performs Lorenz test for the composite hypothesis of exponentiality, see e.g. Gail and Gastwirth (1978).

Usage

lorenz.exp.test(x, p=0.5, simulate.p.value=FALSE, nrepl=2000)

Arguments

x
a numeric vector of data values.
p
a parameter of the test (see below).
simulate.p.value
a logical value indicating whether to compute p-values by Monte Carlo simulation.
nrepl
the number of replications in Monte Carlo simulation.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the Lorenz statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "Lorenz test for exponentiality".
  • data.namea character string giving the name(s) of the data.

Details

The Lorenz test for exponentiality is based on the following statistic: $$L = \sum_{i=1}^{np}{X_{(i)}}/\sum_{i=1}^n{X_{(i)}}$$ The statistic $\sqrt{n}(L-p-(1-p)\log(1-p))$ is asymptotically standard normal.

References

Gail, M.H. and Gastwirth, J.L. (1978): A scale-free goodness-of-fit test for the exponential distribution based on the Lorenz curve. --- Journal of the American Statistical Association, vol. 73, pp. 787--793.

Examples

Run this code
lorenz.exp.test(rexp(100))
lorenz.exp.test(rchisq(100,7))

Run the code above in your browser using DataLab