Malik_test | R Documentation |
The Malik's (2016) et al. test statistic is calculated and the corresponding exact p-value is calculated by a Monte Carlo simulation.
Malik_test(x, nsim = 10000, alpha = 0.05, report = TRUE, Elapsed_time = TRUE)
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 |
Elapsed_time |
logical: if |
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.
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 |
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. |
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.
data(IDCP) Malik_test(IDCP, nsim = 1000, Elapsed_time = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.