kolmogorov.unif.test: Kolmogorov-Smirnov test for uniformity

Description Usage Arguments Details Value Author(s) References Examples

Description

Performs Kolmogorov-Smirnov test for the hypothesis of uniformity, see Kolmogorov (1933).

Usage

1
kolmogorov.unif.test(x, nrepl=2000,k=0)

Arguments

x

a numeric vector of data values.

nrepl

the number of replications in Monte Carlo simulation.

k

variant the criterion.

Details

The Kolmogorov-Smirnov test for uniformity is based on the following statistics:

D^+ = max_i≤ft(x_i-\frac{i}{n+1}\right),\quad D^- = max_i≤ft(\frac{i}{n+1}-x_i\right),\quad D = max(D^+,D^-).

The p-value is computed by Monte Carlo simulation.

Value

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 uniformity".

data.name

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

Author(s)

Maxim Melnik and Ruslan Pusev

References

Kolmogorov A. (1933): Sulla determinazione empirica di una legge di distribuzione. — G. Ist. Ital. Attuari, vol. 4, pp. 83–91.

Examples

1
2

Example output

Loading required package: orthopolynom
Loading required package: polynom

	Kolmogorov-Smirnov test for uniformity

data:  runif(100, 0, 1)
D = 0.94463, p-value = 0.2225


	Kolmogorov-Smirnov test for uniformity

data:  runif(100, 0.1, 0.9)
D = 0.82991, p-value = 0.941

uniftest documentation built on May 1, 2019, 7:33 p.m.