sarkadi.unif.test: Sarkadi-Kosik test for uniformity

Description Usage Arguments Details Value Author(s) References Examples

Description

Performs Sarkadi-Kosik test for the hypothesis of uniformity.

Usage

1
sarkadi.unif.test(x, nrepl=2000)

Arguments

x

a numeric vector of data values.

nrepl

the number of replications in Monte Carlo simulation.

Details

The Sarkadi-Kosik test for uniformity is based on the following statistic:

J = n^2∑_{i=1}^{n}{≤ft( \frac{x_i-\frac{i}{n+1}}{i≤ft(n-i+1\right)} \right)^2}-n≤ft(∑_{i=1}^{n}{\frac{x_i-\frac{i}{n+1}}{i≤ft(n-i+1\right)}} \right)^2.

The p-value is computed by Monte Carlo simulation.

Value

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

statistic

the value of the Sarkadi-Kosik statistic.

p.value

the p-value for the test.

method

the character string "Sarkadi-Kosik test for uniformity".

data.name

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

Author(s)

Maxim Melnik and Ruslan Pusev

References

Kosik P., Sarkadi K. A new goodness-of-fit test // Proc. of 5-th Pannonian Symp. of Math. Stat., Visegrad, Hungary, 20 24 May, 1985. P. 267 272.

Examples

1
2

Example output

Loading required package: orthopolynom
Loading required package: polynom

	Sarkadi-Kosik test for uniformity

data:  runif(100, 0, 1)
J = 0.0010726, p-value < 2.2e-16


	Sarkadi-Kosik test for uniformity

data:  runif(100, 0.1, 0.9)
J = 0.025744, p-value < 2.2e-16

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