AnovaTest {MM4LMM}R Documentation

Type I and Type III Tests for mixed models.

Description

This function computes Type I and Type III tests for each fixed effect of a model, as displayed by the MMEst function. Alternatively, a specific linear combination of the fixed parameters may be tested (at 0).

Usage

AnovaTest(ResMMEst , TestedCombination=NULL , Type = "TypeIII" , NbCores=1)

Arguments

ResMMEst

A list as displayed by the MMEst function.

TestedCombination

A contrast matrix or a list of contrast matrices C_m. Each matrix corresponds to a (set of) linear combination to be (jointly) tested at 0.

Type

Either "TypeI" of "TypeIII" (default is "TypeIII"). AnovaTest will compute tests of the given type for each fixed effect in the model. The option is ignored if a TestedCombination is provided.

NbCores

The number of cores to be used.

Details

If no TestedCombination is provided, the function performs either Type I or Type III tests for each fixed effect in the model (default is Type III). If TestedCombination is provided, each linear combination in TestedCombination is tested at 0 using a Wald test. No check is performed regarding the estimability of the linear combination to be tested. If the dimension of the combination does not match with the dimension of ResMMEst, a NA is returned.

Value

The output of the function is a list with as many items as in the original input list ResMMEst. For each item of ResMMEst, a table is provided that contains the Wald test statistics, p-values and degrees of freedom for all tested hypotheses.

Author(s)

F. Laporte and T. Mary-Huard

Examples

  require('MM4LMM')
  data(QTLDetectionExample)
  Pheno <- QTLDetectionExample$Phenotype
  Geno <- QTLDetectionExample$Genotype
  Kinship <- QTLDetectionExample$Kinship

  ##Build the VarList object
  VL <- list(Additive = Kinship , Error = diag(1,length(Pheno)))
  
  ##Perform inference
  Result <- MMEst(Y=Pheno , X = Geno , VarList = VL)

  ##Compute tests
  AOV <- AnovaTest(Result,Type="TypeI")
  
  ##Test specific contrast matrix
  TC = matrix(c(0,1),nrow=1)
  AOV2 <- AnovaTest(Result, TestedCombination = TC)

[Package MM4LMM version 1.1.5 Index]