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
kOverA, lm
Examples
set.seed(123)
af <- Anova(c(rep(1,5),rep(2,5)), .01)
af(rnorm(10))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(genefilter)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/genefilter/Anova.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Anova
> ### Title: A filter function for Analysis of Variance
> ### Aliases: Anova
> ### Keywords: manip
>
> ### ** Examples
>
> set.seed(123)
> af <- Anova(c(rep(1,5),rep(2,5)), .01)
> af(rnorm(10))
[1] FALSE
>
>
>
>
>
> dev.off()
null device
1
>