Multtest package

Let’s start by installing the multtest package. This package is not available directly on the CRAN. More precisely it belongs to a package group focused on biological data analysis, called Bioconductor.

source("http://bioconductor.org/biocLite.R")
biocLite("multtest")

Let’s now load the package:

library(multtest)

Load the dataset liver.toxicity available in the mixOmics package:

# install.packages('mixOmics')
data("liver.toxicity", package = "mixOmics")
help(liver.toxicity, package = "mixOmics")
x <- liver.toxicity$gene
y <- liver.toxicity$clinic$ALB.g.dL.
dim(x)
m <- ncol(x)
x[1:6, 1:6]
str(y)

1 Test of association of gene n°1 with the response

Let’s consider the first gene. What do you propose as a statistical test for determine whether the expression of this gene varies significantly with the stimulation?

2 All individual tests and naive p-value

We now want to obtain the m naive p-values corresponding to all the individual tests. Calculate these p-values.

3 Correction of p-values by multiple testing procedures

3.1 Correction of p-values

Using the function mt.rawp2adjp(), correct previous naive p-values. We consider the 3 procedures: Bonferroni, Holm and Benjamini-Hochberg.

3.2 FWER control at 5% level

How many genes are significantly related albumine level if we want an overall level of FWER controlled by 5% ? Keep these genes in an object named fwer.

3.3 FDR control at 5% level

How many genes are significantly related to the albumine level if we want an overall level of 5% FDR controlled by 5% ? Keep these genes in an object named fdr.