Learn R Programming

exptest (version 1.2)

hegazy2.exp.test: Hegazy-Green test for exponentiality

Description

Performs Hegazy-Green test for the composite hypothesis of exponentiality, see e.g. Hegazy and Green (1975).

Usage

hegazy2.exp.test(x, nrepl=2000)

Arguments

x
a numeric vector of data values.
nrepl
the number of replications in Monte Carlo simulation.

Value

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

Details

The Hegazy-Green test for exponentiality is based on the following statistic: $$T_2 = n^{-1}\sum{\left(X_{(i)}+\ln{\left(1-\frac{i}{n+1}\right)}\right)^2}.$$ The p-value is computed by Monte Carlo simulation.

References

Hegazy, Y. A. S. and Green, J. R. (1975): Some new goodness-of-fit tests using order statistics. --- Journal of the Royal Statistical Society. Series C (Applied Statistics), vol. 24, pp. 299--308.

Examples

Run this code
hegazy2.exp.test(rexp(100))
hegazy2.exp.test(rweibull(100,1.5))

Run the code above in your browser using DataLab