gini.exp.test: Test for exponentiality based on the Gini statistic

Description Usage Arguments Details Value Author(s) References Examples

View source: R/gini.exp.test.R

Description

Performs test for the composite hypothesis of exponentiality based on the Gini statistic, see e.g. Gail and Gastwirth (1978).

Usage

1
gini.exp.test(x, simulate.p.value=FALSE, nrepl=2000)

Arguments

x

a numeric vector of data values.

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.

Details

The test is based on the Gini statistic

G_n = \frac{∑_{i,j=1}^n |X_i-X_j|}{2n(n-1)\overline{X}}.

Under exponentiality, the normalized statistic (12(n-1))^{1/2}(G_n-0.5) is asymptotically standard normal (see, e.g., Gail and Gastwirth (1978)).

Value

A list with class "htest" containing the following components:

statistic

the value of the Gini statistic.

p.value

the p-value for the test.

method

the character string "Test for exponentiality based on the Gini statistic".

data.name

a character string giving the name(s) of the data.

Author(s)

Alexey Novikov, Ruslan Pusev and Maxim Yakovlev

References

Gail, M.H. and Gastwirth, J.L. (1978): A scale-free goodness-of-fit test for the exponential distribution based on the Gini statistic. — J. R. Stat. Soc. Ser. B, vol. 40, No. 3, pp. 350–357.

Examples

1
2
gini.exp.test(rexp(100))
gini.exp.test(runif(100, min = 0, max = 1))

Example output

	Test for exponentiality based on the Gini statistic

data:  rexp(100)
Gn = 0.45513, p-value = 0.122


	Test for exponentiality based on the Gini statistic

data:  runif(100, min = 0, max = 1)
Gn = 0.32778, p-value = 2.921e-09

exptest documentation built on May 1, 2019, 8:01 p.m.