Description Usage Arguments Details Value Author(s) References Examples
Performs Sarkadi-Kosik test for the hypothesis of uniformity.
1 | sarkadi.unif.test(x, nrepl=2000)
|
x |
a numeric vector of data values. |
nrepl |
the number of replications in Monte Carlo simulation. |
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.
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. |
Maxim Melnik and Ruslan Pusev
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.
1 2 | sarkadi.unif.test(runif(100,0,1))
sarkadi.unif.test(runif(100,0.1,0.9))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.