Learn R Programming

exptest (version 1.2)

we.exp.test: WE test for exponentiality

Description

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

Usage

we.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 WE test statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "WE test for exponentiality".
  • data.namea character string giving the name(s) of the data.

Details

The test is based on the following statistic $$WE =\sum_{i=1}^n{(X_i-\overline{X})^2}/{\left(\sum_{i=1}^n{X_i}\right)^2}.$$ The p-value is computed by Monte Carlo simulation.

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
we.exp.test(rexp(100))
we.exp.test(runif(100, min = 50, max = 100))

Run the code above in your browser using DataLab