# neyman.unif.test: Neyman-Barton test for uniformity In uniftest: Tests for Uniformity

## Description

Performs Neyman-Barton test for the hypothesis of uniformity.

## Usage

 1 neyman.unif.test(x, nrepl=2000, k=5) 

## Arguments

 x a numeric vector of data values.
 nrepl the number of replications in Monte Carlo simulation. k the number of Legendre polynomials.

## Details

The Neyman-Barton test for uniformity is based on the following statistic:

N_k = ∑_{j=1}^{k}{≤ft(\frac{1}{√{n}}∑_{i=1}^{n}{π_j(x_i)}\right)^2},

where π_j(x_i) are Legendre polynomials orthogonal on the interval [0,1].

The p-value is computed by Monte Carlo simulation.

## Value

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

 statistic the value of the Neyman-Barton statistic. p.value  the p-value for the test. method the character string "Neyman-Barton test for uniformity". data.name a character string giving the name(s) of the data.

## Author(s)

Maxim Melnik and Ruslan Pusev

## References

Neyman J. "Smooth" test for goodness-of-fit // Scand. Aktuarietidsrift. 1937. V. 20. P. 149-199.

## Examples

 1 2 neyman.unif.test(runif(100,0,1)) neyman.unif.test(runif(100,0.1,0.9)) 

### Example output

Loading required package: orthopolynom

Neyman test for uniformity

data:  runif(100, 0, 1)
N = 4.2142, p-value = 0.5165

Neyman test for uniformity

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


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