TestStatMoment3: The third moment of the Cramer test statistics

Description Usage Arguments Details Author(s) Examples

View source: R/RcppExports.R

Description

Calculates the third moment of the test statistics calculated using the Cramer test.

Usage

1
TestStatMoment3(n1, n2, sample, Regions)

Arguments

n1

an integer referring to the number of observations in the first sample.

n2

an integer reffering to the number of observations in the second sample.

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.

Author(s)

Alison Telford <mm11ajt@leeds.ac.uk>

Examples

1
2
3
4
5
	data1 = rnorm(100)
	data2 = rnorm(100)
	data = c(data1, data2)
	regions = seq(min(data), max(data), length = 50)
	TestStatMoment3(100, 100, data, regions)

CramTest documentation built on May 2, 2019, 5:08 a.m.