Learn R Programming

MetStaT (version 1.0)

QStat.Calculate: Global test for metabolic pathway differences between conditions

Description

Calculates the Q statistic of Goeman's global test for metabolomic pathways. Also performs a permutation test, which can either be run for all possible permutations, or for a certain number of random permutations. See references for more details.

Usage

QStat.Calculate(X, y.boolean, permutations = "all")

Arguments

X
matrix with sampling data per row.
y.boolean
boolean. A vector of TRUE/FALSE values on whether each sample adheres to a certain condition.
permutations
argument to determine the type of permutation test. Can be either 'all', in which case all possible permutations are calculated (caution, this might take a long time), or a fixed number of random permutations. Set to 0 in case no permutation test is to be performed.

Value

A list will be returned with the following contents:
y.boolean
The original y.boolean input vector.
X
The original X input vector.
Q
The calculated Q statistic.
p
The p value found after the permutation test.

References

Global test for metabolic pathway differences between conditions. Diana M. Hendrickx, Huub C.J. Hoefsloot, Margriet M.W.B. Hendriks, Andre. Canelas and Age K. Smilde. Analytica Chimica Acta, Volume 719 (2012), pages 8 - 15

Examples

Run this code
data(QStat)
QStat.Calculate(QStatX, QStatY, 1000)

Run the code above in your browser using DataLab