Learn R Programming

HybridMTest (version 1.16.0)

row.oneway.anova: Perform one-way ANOVA for many variables.

Description

For each row of Y, use one-way ANOVA to compare means across groups defined by grplbl.

Usage

row.oneway.anova(Y, grplbl)

Arguments

Y
data matrix with variables in rows and subjects in columns
grplbl
vector of group labels for the subjects

Value

  • A data.frame with three columns:
  • stata vector with the ANOVA F-statistic for each row of Y
  • pvala vector with the ANOVA p-value for each row of Y
  • ebpa vector with the empirical Bayes probability of equal means for each row of Y

Details

The alternative hypothesis is that, for each gene, there are at least two groups of different mean. The null hypothesis is that all groups have the same mean for each gene studied.

References

Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S, Wadsworth & Brooks/Cole.

Examples

Run this code
####################Three group comparison###################
# load data
data(GroupComp.data)
# Read the expression values   
brain.express.set <- exprs(GroupComp.data)
head(brain.express.set)
# Read the phenotype
brain.pheno.data <- pData(GroupComp.data)
brain.pheno.data[,1] 
# ANOVA test
row.oneway.anova(brain.express.set,brain.pheno.data[,1])

Run the code above in your browser using DataLab