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).
KKM_test(x, nsim = 1000, alpha = 0.05, report = TRUE, nc0 = 10000)
An object of the class ITtest
, which is a list inducing following components:
The calculated exact Monte Carlo p-value.
is not available for KKM_test
.
The number of Monte Carlo samples that are used to estimate p-value.
The value of the test statistic.
The name of the input dataset.
The name of the test.
The level of test.
The result of the test at the alpha level with some descriptions on the type of significant interaction.
a numeric matrix, \(a \times b\) data matrix where the number of row and column is corresponding to the number of factor levels.
a numeric value, the number of Monte Carlo samples for computing an exact Monte Carlo p-value. The default value is 10000.
a numeric value, the level of the test. The default value is 0.05.
logical: if TRUE
the result of the test is reported at the alpha
level.
a numeric value, the number of Monte Carlo samples for computing the unbiasing constant \(c_0\). The default value is 10000.
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.
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.
data(RDWW)
KKM_test(RDWW, nsim = 1000, nc0 = 1000)
Run the code above in your browser using DataLab