Performs one-way ANOVA at each time point and channel across multiple conditions.
Value
A list containing:
- f_values
Matrix of F-statistics (time x channel)
- p_values
Matrix of p-values (time x channel)
- df_between
Between-group degrees of freedom
- df_within
Within-group degrees of freedom
- group_means
Array of group means (time x channel x group)
References
Maris, E. & Oostenveld, R. (2007). "Nonparametric statistical testing of EEG- and MEG-data." Journal of Neuroscience Methods, 164(1), 177-190. doi:10.1016/j.jneumeth.2007.03.024
See also
tTestEpochs() for pairwise comparisons,
clusterPermutationTest() for multiple comparison correction,
effectSize() for Cohen's d effect size.
Examples
# Create example epoched data with conditions
set.seed(123)
epochs <- array(rnorm(100 * 4 * 30 * 1), dim = c(100, 4, 30, 1))
pe <- PhysioExperiment(
assays = list(epoched = epochs),
samplingRate = 100,
metadata = list(
epoch_info = S4Vectors::DataFrame(
condition = rep(c("A", "B", "C"), each = 10)
)
)
)
# ANOVA across conditions
result <- anovaEpochs(pe, groups = "condition")