R/imd_anova.R
anova_test.Rd
This is the ANOVA part of the IMD-ANOVA test proposed in Webb-Robertson et al. (2010).
anova_test(
omicsData,
groupData,
comparisons,
pval_adjust_multcomp,
pval_adjust_fdr,
pval_thresh,
covariates,
paired,
equal_var,
parallel
)
A pmartR data object of any class
`data.frame` that assigns sample names to groups
`data.frame` with columns for "Control" and "Test" containing the different comparisons of interest. Comparisons will be made between the Test and the corresponding Control If left NULL, then all pairwise comparisons are executed.
character string specifying the type of multiple comparisons adjustment to implement. The default, "none", corresponds to no adjustment. Valid options include: "bonferroni", "holm", "tukey", and "dunnett".
character string specifying the type of FDR adjustment to implement. The default, "none", corresponds to no adjustment. Valid options include: "bonferroni", "BH", "BY", and "fdr".
numeric p-value threshold, below or equal to which peptides are considered differentially expressed. Defaults to 0.05
A character vector with no more than two variable names that will be used as covariates in the IMD-ANOVA analysis.
logical; should the data be paired or not? if TRUE then the `f_data` element of `omicsData` is checked for a "Pair" column, an error is returned if none is found
logical; should the variance across groups be assumed equal?
A logical value indicating if the t test should be run in parallel.
a list of `data.frame`s
Results | Edata cname, Variance Estimate, ANOVA F-Statistic, ANOVA p-value, Group means |
Fold_changes | Estimated fold-changes for each comparison |
Fold_changes_pvalues | P-values corresponding to the fold-changes for each comparison |
Fold_change_flags | Indicator of statistical significance (0/+-2 to if adjusted p-value>=pval_thresh or p-value<pval_thresh) |
The order in which different scenarios are handeled:
If the data are paired, then the pairing is accounted for first then each of the next steps is carried out on the new variable that is the difference in the paired individuals.<br>
If covariates are provided, their effect is removed before testing for group differences though mathematically covariates and grouping effects are accounted for simultaneously
ANOVA is executed to assess the effect of each main effects, results in a vector of group means for each biomolecule and variance estimate
Group comparisons defined by `comaprison` argument are implemented use parameter vector and variance estimates in ANOVA step
Webb-Robertson, Bobbie-Jo M., et al. "Combined statistical analyses of peptide intensities and peptide occurrences improves identification of significant peptides from MS-based proteomics data." Journal of proteome research 9.11 (2010): 5748-5756.