Performs Kolmogorov-Smirnov test for the composite hypothesis of exponentiality, see e.g. Henze and Meintanis (2005, Sec. 2.1).

1 | ```
ks.exp.test(x, nrepl=2000)
``` |

`x` |
a numeric vector of data values. |

`nrepl` |
the number of replications in Monte Carlo simulation. |

The Kolmogorov-Smirnov test for exponentiality is based on the following statistic:

*
KS_n =\sup_{x≥q0}|F_n(x)-(1-\exp(-x))|,
*

where *F_n* is the empirical distribution function of the scaled data *Y_j=X_j/\overline{X}*. The p-value is computed by Monte Carlo simulation.

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

`statistic` |
the value of the Kolmogorov-Smirnov statistic. |

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

`method` |
the character string "Kolmogorov-Smirnov test for exponentiality". |

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

Ruslan Pusev and Maxim Yakovlev

Henze, N. and Meintanis, S.G. (2005): Recent and classical tests for exponentiality: a partial review with comparisons. — Metrika, vol. 61, pp. 29–45.

1 2 | ```
ks.exp.test(rexp(100))
ks.exp.test(runif(100, min = 50, max = 100))
``` |

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.