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

1 | ```
epstein.exp.test(x, simulate.p.value=FALSE, nrepl=2000)
``` |

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

The test is based on the following statistic:

*
EPS_n =\frac{2n≤ft(\log≤ft(n^{-1}∑_{i=1}^nD_i\right)-n^{-1}∑_{i=1}^n\log(D_i)\right)}{1+(n+1)/(6n)},
*

where *D_i=(n-i+1)(X_{(i)}-X_{(i-1)})*, *X_{(0)}=0* and *X_{(1)}≤q…≤q X_{(n)}* are the order statistics.
Under exponentiality, *EPS* is approximately distributed as a chi-square with *n-1* degrees of freedom.

A list with class "htest" containing the following components:

`statistic` |
the value of the test statistic. |

`p.value ` |
the p-value for the test. |

`method` |
the character string "Epstein test for exponentiality". |

`data.name` |
a character string giving the name(s) of the data. |

Alexey Novikov, Ruslan Pusev and Maxim Yakovlev

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

1 2 | ```
epstein.exp.test(rexp(100))
epstein.exp.test(rweibull(100,2))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.