Title: | Additivity Tests in the Two Way Anova with Single Sub-class Numbers |
---|---|
Description: | Implementation of the Tukey, Mandel, Johnson-Graybill, LBI, Tusell and modified Tukey non-additivity tests. |
Authors: | Marie Simeckova [aut], Thomas Rusch [aut], Petr Simecek [cre] |
Maintainer: | Petr Simecek <[email protected]> |
License: | GPL-3 |
Version: | 1.1-4 |
Built: | 2024-11-22 05:21:59 UTC |
Source: | https://github.com/simecek/additivitytests |
In many applications of statistical methods, it is assumed that the response variable is a sum of several factors and a random noise. In a real world this may not be an appropriate model. For example, some patients may react differently to the same drug treatment or the effect of fertilizer may be influenced by the type of a soil. There might exist an interaction between factors.
If there is more than one observation per cell then standard ANOVA techniques may be applied. Unfortunately, in many cases it is infeasible to get more than one observation taken under the same conditions. For instance, it is not logical to ask the same student the same question twice.
Six tests of additivity hypothesis (under various alternatives) are included in this package: Tukey test, modified Tukey test, Johnson-Graybill test, LBI test, Mandel test and Tussel test.
Testing for interaction in the two way ANOVA with single sub-class numbers.
Petr Simecek <[email protected]>
Performance of a multiple-headed machine used to fill bottles. Weights for six heads on five occasions were recorded.
data(Boik)
data(Boik)
Robert J. Boik: A comparison of three invariant tests of additivity in two-way classifications with no replications, Computational Statistics \& Data Analysis, 1993.
Compute the critical values by performing N simulation.
critical.values(a, b, N = 1e+05, alpha = 0.05)
critical.values(a, b, N = 1e+05, alpha = 0.05)
a |
number of rows |
b |
number of columns |
N |
number of simulations |
alpha |
level(s) of the test |
A list containing three components: critical values for Johnson-Graybill, LBI and Tusell tests, respectively.
johnson.graybill.test
, lbi.test
, tusell.test
data(Boik) critical.values(nrow(Boik), ncol(Boik), 0.01)
data(Boik) critical.values(nrow(Boik), ncol(Boik), 0.01)
Test for an interaction in two-way ANOVA table by the Johnson-Graybill test.
johnson.graybill.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
johnson.graybill.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
Y |
data matrix |
alpha |
level of the test |
critical.value |
result of |
Nsim |
number of simulations to be used for a critical value estimation |
The critical value can be computed in advance and given in the parameter critical value
.
If not a function critical.values
is called to do that.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Johnson, D.E. and Graybill, F.A.: An analysis of a two-way model with interaction and no replication, Journal of the American Statistical Association 67, pp. 862–868, 1972.
tukey.test
, mtukey.test
, mandel.test
,
lbi.test
, tusell.test
data(Boik) johnson.graybill.test(Boik)
data(Boik) johnson.graybill.test(Boik)
Test for an interaction in two-way ANOVA table by the LBI test.
lbi.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
lbi.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
Y |
data matrix |
alpha |
level of the test |
critical.value |
result of |
Nsim |
number of simulations to be used for a critical value estimation |
The critical value can be computed in advance and given in the parameter critical value
.
If not a function critical.values
is called to do that.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Boik, R.J.: Testing additivity in two-way classifications with no replications:the locally best invariant test, Journal of Applied Statistics 20,pp. 41–55, 1993.
tukey.test
, mtukey.test
, mandel.test
,
johnson.graybill.test
, tusell.test
data(Boik) lbi.test(Boik)
data(Boik) lbi.test(Boik)
Test for an interaction in two-way ANOVA table by the Mandel test.
mandel.test(data, alpha = 0.05, critical.value = NA)
mandel.test(data, alpha = 0.05, critical.value = NA)
data |
data matrix |
alpha |
level of the test |
critical.value |
result of |
The critical value can be computed in advance and given in the parameter critical value
.
If not a function critical.values
is called to do that.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Mandel, J.: Non-additivity in Two-way Analysis of Variance, Journal of the American Statistical Association 56, pp. 878–888, 1961.
tukey.test
, mtukey.test
, johnson.graybill.test
,
lbi.test
, tusell.test
data(Boik) mandel.test(Boik)
data(Boik) mandel.test(Boik)
Test for an interaction in two-way ANOVA table by the modified Tukey test.
mtukey.test(Y, alpha = 0.05, correction = 0, Nboot = 1000)
mtukey.test(Y, alpha = 0.05, correction = 0, Nboot = 1000)
Y |
data matrix |
alpha |
level of the test |
correction |
type of small sample size correction (0=none, 1=bootstrap without replacement, 2=sampling), see |
Nboot |
number of simulations to be used for small sample size correction |
The level of the modified Tukey test is unstable for a small sample size. In such cases
either bootstraping (correction=1
) or sampling (correction=2
) should be used to compute the critical value.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Simecek, Petr, and Simeckova, Marie. "Modification of Tukey's additivity test." Journal of Statistical Planning and Inference, 2012.
tukey.test
, mandel.test
, johnson.graybill.test
,
lbi.test
, johnson.graybill.test
data(Boik) mtukey.test(Boik) mtukey.test(Boik,correction=2,Nboot=2000)
data(Boik) mtukey.test(Boik) mtukey.test(Boik,correction=2,Nboot=2000)
Test for an interaction in two-way ANOVA table by the Tukey test.
tukey.test(data, alpha = 0.05, critical.value = NA)
tukey.test(data, alpha = 0.05, critical.value = NA)
data |
data matrix |
alpha |
level of the test |
critical.value |
result of |
The critical value can be computed in advance and given in the parameter critical value
.
If not a function critical.values
is called to do that.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Tukey, J.W.: One Degree of Freedom for Non-additivity, Biometrics 5, pp. 232–242, 1949.
tusell.test
, mtukey.test
, mandel.test
,
lbi.test
, johnson.graybill.test
data(Boik) tukey.test(Boik)
data(Boik) tukey.test(Boik)
Test for an interaction in two-way ANOVA table by the Tusell test.
tusell.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
tusell.test(Y, alpha = 0.05, critical.value = NA, Nsim = 1000)
Y |
data matrix |
alpha |
level of the test |
critical.value |
result of |
Nsim |
number of simulations to be used for a critical value estimation |
The critical value can be computed in advance and given in the parameter critical value
.
If not a function critical.values
is called to do that.
A list with class "aTest
" containing the following components:
test statistics stat
, critical value critical.value
and the result of
the test result
, i.e. whether the additivity hypothesis has been rejected.
Tusell, F.: Testing for Interaction in Two-way ANOVA Tables with no Replication, Computational Statistics \& Data Analysis 10, pp. 29–45, 1990
tukey.test
, mtukey.test
, mandel.test
,
lbi.test
, johnson.graybill.test
data(Boik) tusell.test(Boik)
data(Boik) tusell.test(Boik)