Learn R Programming

combinIT (version 2.0.0)

Boik_test: Boik's (1993) Locally Best Invariant (LBI) Test

Description

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\).

Usage

Boik_test(x, nsim = 10000, alpha = 0.05, report = TRUE)

Value

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

pvalue_exact

An exact Monte Carlo p-value when \(p>2\). For \(p=2\), an exact p-value is calculated.

pvalue_appro

An chi-squared asymptotic p-value.

statistic

The value of test statistic.

Nsim

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

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.

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 calculating 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.

Details

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.

References

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.

Examples

Run this code
data(MVGH)
Boik_test(MVGH, nsim = 1000)

Run the code above in your browser using DataLab