One-way analysis of variance (ANOVA).
Arguments
- x
S4 object of class
AnalysisData
- cls
a vector of sample info column names to analyse
- pAdjust
p value adjustment method
- comparisons
list of comparisons to perform
- returnModels
should models be returned
Examples
library(metaboData)
d <- analysisData(abr1$neg[,200:300],abr1$fact)
## Perform ANOVA
anova_analysis <- anova(d,cls = 'day')
## Extract significant features
explanatoryFeatures(anova_analysis)
#> # A tibble: 21 × 10
#> response comparison feature term df sumsq meansq statistic p.value
#> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 day 1~2~3~4~5~H N277 response 5 63072. 12614. 39.1 3.14e-23
#> 2 day 1~2~3~4~5~H N229 response 5 43549. 8710. 18.1 3.54e-13
#> 3 day 1~2~3~4~5~H N299 response 5 1211. 242. 16.4 3.87e-12
#> 4 day 1~2~3~4~5~H N295 response 5 271. 54.2 13.6 2.02e-10
#> 5 day 1~2~3~4~5~H N281 response 5 192. 38.5 12.5 1.16e- 9
#> 6 day 1~2~3~4~5~H N245 response 5 6268. 1254. 11.6 4.38e- 9
#> 7 day 1~2~3~4~5~H N255 response 5 5363. 1073. 11.0 1.14e- 8
#> 8 day 1~2~3~4~5~H N278 response 5 277. 55.4 10.9 1.48e- 8
#> 9 day 1~2~3~4~5~H N259 response 5 1236. 247. 10.8 1.72e- 8
#> 10 day 1~2~3~4~5~H N279 response 5 810. 162. 10.5 2.77e- 8
#> # ℹ 11 more rows
#> # ℹ 1 more variable: adjusted.p.value <dbl>