Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Anova

A filter function for Analysis of Variance


Description

Anova returns a function of one argument with bindings for cov and p. The function, when evaluated, performs an ANOVA using cov as the covariate. It returns TRUE if the p value for a difference in means is less than p.

Usage

Anova(cov, p=0.05, na.rm=TRUE)

Arguments

cov

The covariate. It must have length equal to the number of columns of the array that Anova will be applied to.

p

The p-value for the test.

na.rm

If set to TRUE any NA's will be removed.

Details

The function returned by Anova uses lm to fit a linear model of the form lm(x ~ cov), where x is the set of gene expressions. The F statistic for an overall effect is computed and if it has a p-value less than p the function returns TRUE, otherwise it returns FALSE for that gene.

Value

Anova returns a function with bindings for cov and p that will perform a one-way ANOVA.

The covariate can be continuous, in which case the test is for a linear effect for the covariate.

Author(s)

R. Gentleman

See Also

Examples

set.seed(123)
  af <- Anova(c(rep(1,5),rep(2,5)), .01)
  af(rnorm(10))

genefilter

genefilter: methods for filtering genes from high-throughput experiments

v1.72.1
Artistic-2.0
Authors
R. Gentleman, V. Carey, W. Huber, F. Hahne
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.