Description Usage Arguments Details Value Author(s) References Examples
Performs the two sample Cramer Test on two vectors of data.
1 | Cram.test(Data1, Data2, P.Value = T, GridPoints=50)
|
Data1 |
a (non-empty) numeric vector of data values. |
Data2 |
a (non-empty) numeric vector of data values. |
P.Value |
logical, if true will return the p-value of the test as well as the statistic. |
GridPoints |
an integer indicating the number of grid points to be used for the integration when calculating the moments of the test statistics. |
Consider data x_1, x_2, ..., x_n and y_1, y_2, ..., y_m as two samples, assumed to have come from probability density functions f and g, respectively. Let F and G be the cumulative density functions, respectively. We are interested to test the null hypothesis H_0: F=G. The main function is Cram.test()
which will calculate the test statistic
T_{n,m}=\int_{-∞}^{∞}(F(t)-G(t))^2 dt
and its corresponding p-value based on the approximation of the generalized Pareto distribution to the test statistic.
Statistic |
the value of Cramer test statistic. |
p.value |
the p-value for the test. |
Alison Telford <mm11ajt@leeds.ac.uk>
For further information, refer to "Properties, Advantages and a Faster p-value Calculation of the Cramer test" (submitted for review).
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.