TestStatExpectation: Expectation of Cramer test statistics
Description
Calculates the expectation of the test statistics calculated using the Cramer test.
Usage
TestStatExpectation(sample, Regions)
Arguments
sample
a (non-empty) numeric vector of data values.
Regions
a (non-empty) numeric vector of grid points to be used in the integration.
Details
sample should be the two samples of data that is to be tested using the Cramer test, concatinated.
Regions must be sorted from smallest to largest number. Regions must not contain any numbers smaller than the minimum value or larger than the maximum value of sample.
The result is more accurate when more grid points are used, however the use of more grid points could make the function run slower. It is recommended to use equally spaced grid points.