Malik_test {combinIT}R Documentation

Malik's (2016) et al. Test for Interaction

Description

The Malik's (2016) et al. test statistic is calculated and the corresponding exact p-value is calculated by a Monte Carlo simulation.

Usage

Malik_test(x, nsim = 10000, alpha = 0.05, report = TRUE, Elapsed_time = TRUE)

Arguments

x

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.

Elapsed_time

logical: if TRUE the progress will be printed in the console.

Details

Malik (2016) et al. proposed to partition the residuals into three clusters using a suitable clustering method like “k-means clustering”. The hypothesis of no interaction can be interpreted as the effect of the three clusters are equal. Therefore, the result of the test may depend on the method of clustering. In this package, clustering is done by kmeans function in RcppArmadillo. The speed_mode parameter on the kmeans clustering was set as static_subset. Note that the Malik's et al. test performs well when there are some outliers in the residuals; i.e. some cells produce large negative or positive residuals due to the significant interaction. Further, the distribution of the Malik's et al. test statistic is not known under additivity and the corresponding p-value is calculated by a Monte Carlo simulation.

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

statistic

The value of the 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.

References

Malik, W.A., Mohring, J., Piepho, H.P. (2016). A clustering-based test for non-additivity in an unreplicated two-way layout. Communications in Statistics-Simulation and Computation 45(2):660-670.

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(IDCP)
Malik_test(IDCP, nsim = 1000, Elapsed_time = FALSE)


[Package combinIT version 2.0.0 Index]