Learn R Programming

uniftest (version 1.1)

hegazy.unif.test: Hegazy-Green test for uniformity

Description

Performs Hegazy-Green test for the hypothesis of uniformity.

Usage

hegazy.unif.test(x, nrepl=2000, p=1)

Arguments

x
a numeric vector of data values.
p
a parameter of the test (see below).
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 uniformity".
  • data.namea character string giving the name(s) of the data.

Details

The Hegazy-Green test for uniformity is based on the following statistic: $$T_p = \frac{1}{n}\sum_{i=1}^{n}{\left|X_{(i)}-\frac{i}{n+1}\right|^p}.$$ 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
hegazy.unif.test(runif(100,0,1))
hegazy.unif.test(runif(100,0.1,0.9))

Run the code above in your browser using DataLab