Learn R Programming

exptest (version 1.2)

moran.exp.test: Moran test for exponentiality

Description

Performs Moran test for the composite hypothesis of exponentiality, see e.g. Moran (1951) and Tchirina (2005).

Usage

moran.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.

Value

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

Details

The Moran test for exponentiality is based on the following statistic: $$T_n^+ = \gamma + \frac{1}{n}\sum_{i=1}^n{\log\frac{X_i}{\overline{X}}},$$ where $\gamma$ is Euler-Mascheroni constant. The statistic is asymptotically normal: $$\sqrt{n}\,T_n^+ \to N\left(0,\frac{\pi^2}{6} - 1\right).$$

References

Moran, P.A.P. (1951): The random division of an interval--Part II. --- Journal of the Royal Statistical Society. Series B (Methodological), vol. 13, pp. 147-150. Tchirina, A.V. (2005): Bahadur efficiency and local optimality of a test for exponentiality based on the Moran statistics. --- Journal of Mathematical Sciences, vol. 127, No. 1, pp. 1812--1819.

Examples

Run this code
moran.exp.test(rexp(100))
moran.exp.test(rchisq(100,3))

Run the code above in your browser using DataLab