KKM_test {combinIT}R Documentation

Kharrati-Kopaei and Miller's (2016) Test for Interaction

Description

This function calculates the test statistic for testing H_0: There is no interaction, and corresponding Monte Carlo p-value proposed by Kharrati-Kopaei and Miller (2016).

Usage

KKM_test(x, nsim = 1000, alpha = 0.05, report = TRUE, nc0 = 10000)

Arguments

x

a numeric matrix, a \times b data matrix where the number of row and column is corresponding to the number of factor levels.

nsim

a numeric value, the number of Monte Carlo samples for computing an exact Monte Carlo p-value. The default value is 10000.

alpha

a numeric value, the level of the test. The default value is 0.05.

report

logical: if TRUE the result of the test is reported at the alpha level.

nc0

a numeric value, the number of Monte Carlo samples for computing the unbiasing constant c_0. The default value is 10000.

Details

Kharrati-Kopaei and Miller (2016) proposed a test statistic for testing interaction based on inspecting all pairwise interaction contrasts (PIC). This test depends on an unbiasing constant c_0 that is calculated by a Monte Carlo simulation. In addition, the null distribution of the test statistic is calculated by a Monte Carlo simulation. This test is not applicable when both a and b are less than three. Note that this test procedure is powerful when significant interactions are caused by some data cells.

Value

An object of the class ITtest, which is a list inducing following components:

pvalue_exact

The calculated exact Monte Carlo p-value.

pvalue_appro

is not available for KKM_test.

Nsim

The number of Monte Carlo samples that are used to estimate p-value.

statistic

The value of the test statistic.

data_name

The name of the input dataset.

test

The name of the test.

Level

The level of test.

Result

The result of the test at the alpha level with some descriptions on the type of significant interaction.

References

Kharrati-Kopaei, M., Miller, A. (2016). A method for testing interaction in unreplicated two-way tables: using all pairwise interaction contrasts. Statistical Computation and Simulation 86(6):1203-1215.

Shenavari, Z., Kharrati-Kopaei, M. (2018). A Method for Testing Additivity in Unreplicated Two-Way Layouts Based on Combining Multiple Interaction Tests. International Statistical Review 86(3): 469-487.

Examples

data(RDWW)
KKM_test(RDWW, nsim = 1000, nc0 = 1000)


[Package combinIT version 2.0.0 Index]