This function calculates the LBI test statistic for testing the null hypothesis \(H_0:\) There is no interaction. It returns an exact p-value when \(p=2\) where \(p=min\{a-1,b-1\}\). It returns an exact Monte Carlo p-value when \(p>2\). It also provides an asymptotic chi-squared p-value. Note that the p-value of the Boik.test is always one when \(p=1\).
Boik_test(x, nsim = 10000, alpha = 0.05, report = TRUE)
An object of the class ITtest
, which is a list inducing following components:
An exact Monte Carlo p-value when \(p>2\). For \(p=2\), an exact p-value is calculated.
An chi-squared asymptotic p-value.
The value of test statistic.
The number of Monte Carlo samples that are used to estimate p-value.
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 calculating 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.
The LBI test statistic is \(T_{B93}=(tr(R'R))^2/(p tr((R'R)^2))\) where \(p=min\{a-1,b-1\}\) and \(R\) is the residual matrix of the input data matrix, \(x\), under the null hypothesis \(H_0:\) There is no interaction. This test rejects the null hypothesis of no interaction when \(T_{B93}\) is small. Boik (1993) provided the exact distribution of \(T_{B93}\) when \(p=2\) under \(H_0\). In addition, he provided an asymptotic distribution of \(T_{B93}\) under \(H_0\) when \(q\) tends to infinity where \(q=max\{a-1,b-1\}\). Note that the LBI test is powerful when the \(a \times b\) matrix of interaction terms has small rank and one singular value dominates the remaining singular values or in practice, if the largest eigenvalue of \(RR'\) is expected to dominate the remaining eigenvalues.
Boik, R.J. (1993). Testing additivity in two-way classifications with no replications: the locally best invariant test. Journal of Applied Statistics 20(1): 41-55.
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(MVGH)
Boik_test(MVGH, nsim = 1000)
Run the code above in your browser using DataLab