MyNixOS website logo
Description

Additivity Tests in the Two Way Anova with Single Sub-Class Numbers.

Implementation of the Tukey, Mandel, Johnson-Graybill, LBI, Tusell and modified Tukey non-additivity tests.

additivityTests

additivityTests is R package for additivity tests in the two way ANOVA with just one observation per cell.

Introduction

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) have been included in this package: Tukey test, modified Tukey test, Johnson-Graybill test, LBI test, Mandel test and Tusell test.

Example

Let us generate 10 random subjects, 10 random treatmeants and combine them into a dataset (with no interaction):

    set.seed(123)
    subjects = rnorm(10)
    treatments = rnorm(10)
    noise = rnorm(100)/100
    Y = matrix(rep(subjects,10), 10, 10) + matrix(rep(treatments, each=10), 10, 10) + noise

The tests should not reject the additive hypothesis:

    tukey.test(Y)
    mandel.test(Y)
    lbi.test(Y)
    tusell.test(Y)
    johnson.graybill.test(Y)
    mandel.test(Y)
    mtukey.test(Y, correction=2, Nboot=1000)

Now, the extra effect will be added to the last 5 subjects. The tests should reject the additive hypothesis:

    Y[1:5,] = Y[1:5,] + 10*rep(treatments, each=5)
    
    tukey.test(Y)
    mandel.test(Y)
    lbi.test(Y)
    tusell.test(Y)
    johnson.graybill.test(Y)
    mandel.test(Y)
    mtukey.test(Y, correction=2, Nboot=1000)

Installation

To install the additivityTests from Github, it's easiest to use the devtools package:

    # install.packages("devtools")
    library(devtools)
    install_github("simecek/additivityTests")

Or you can access the stable package version available on [CRAN]

References

Simecek, Petr and Simeckova, Marie. "Modification of Tukey's additivity test." Journal of Statistical Planning and Inference (2012). [ScienceDirect][arXiv]

Rasch, Dieter, et al. "Tests of additivity in mixed and fixed effect two-way ANOVA models with single sub-class numbers." Statistical Papers 50.4 (2009): 905-916. [Springer]

Metadata

Version

1.1-4.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows