Learn R Programming

exptest (version 1.2)

gnedenko.exp.test: Gnedenko F-test of exponentiality

Description

Performs Gnedenko F-test for the composite hypothesis of exponentiality, see e.g. Ascher (1990).

Usage

gnedenko.exp.test(x, R=length(x)/2, simulate.p.value=FALSE, nrepl=2000)

Arguments

x
a numeric vector of data values.
R
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 test statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "Gnedenko's F-test of exponentiality".
  • data.namea character string giving the name(s) of the data.

Details

The test is based on the following statistic: $$Q_n(R) =\frac{\sum_{i=1}^RD_i/R}{\sum_{i=R+1}^nD_i/(n-R)},$$ where $D_i=(n-i+1)(X_{(i)}-X_{(i-1)})$, $X_{(0)}=0$ and $X_{(1)}\leq\ldots\leq X_{(n)}$ are the order statistics. Under exponentiality, $Q_n(R)$ has an F distribution with $2R$ and $2(n-R)$ degrees of freedom.

References

Ascher, S. (1990): A survey of tests for exponentiality. --- Communications in Statistics -- Theory and Methods, vol. 19, pp. 1811--1825.

Examples

Run this code
gnedenko.exp.test(rexp(100))
gnedenko.exp.test(rweibull(100,2))

Run the code above in your browser using DataLab