rm(list = ls()) # clean workspace
try(dev.off(), silent = TRUE) # close all plots
library(tidyverse)
library(afex)
library(lmerTest)
library(emmeans)
library(GGally)
library(easystats)theme_set(
theme_minimal()
)
a_posteriori <- function(afex_aov, sig_level = .05) {
factors <- as.list(rownames(afex_aov$anova_table))
for (j in 1:length(factors)) {
if (grepl(":", factors[[j]])) {
factors[[j]] <- unlist(strsplit(factors[[j]], ":"))
}
}
p_values <- afex_aov$anova_table$`Pr(>F)`
for (i in 1:length(p_values)) {
if (p_values[i] <= sig_level) {
cat(rep("_", 80), '\n', sep = "")
print(emmeans(afex_aov, factors[[i]], contr = "pairwise"))
} else {
print(emmeans(afex_aov, factors[[i]]))
}
}
}
a_posteriori_lmer <- function(lmer_obj, sig_level = .05) {
anova_lmer <- anova(lmer_obj)
factors <- as.list(row.names(anova_lmer))
for (j in 1:length(factors)) {
if (grepl(':', factors[[j]])) {
factors[[j]] <- unlist(strsplit(factors[[j]], ':'))
}
}
p_values <- anova_lmer$`Pr(>F)`
for (i in 1:length(p_values)) {
if (p_values[i] <= sig_level) {
cat(rep('_', 60), '\n', sep = '')
print(emmeans(lmer_obj, factors[[i]], contr = 'pairwise'))
}
}
}
linplat <- function(x, a, b, clx)
{ifelse(x < clx, a + b * x, a + b * clx)}alpha_power_data <- read.table('foof_data_2_to_48_Hz.csv', header = TRUE, strip.white = TRUE, sep = ",") |>
mutate(Amplitude = ifelse(Subject==15 & Electrode=='E093-Fp1', NaN, Amplitude))
sorted_rs <- sort(alpha_power_data$r_squared)
r2s_df <- tibble(i = 1:length(sorted_rs), R2 = sorted_rs)
(elbow <- pathviewr::find_curve_elbow(r2s_df))[1] 156
r2_elbow <- r2s_df$R2[elbow]
plot(r2s_df, type = 'l', ylab = expression(R^2), main = 'elbow')
abline(v = elbow); abline(h = r2_elbow)
fit_ini <- lm(R2 ~ i, data = r2s_df)
model_plt <- nls(R2 ~ linplat(i, a, b, clx),
data = r2s_df,
start = list(a = fit_ini$coefficients[1],
b = fit_ini$coefficients[2],
clx = mean(r2s_df$i)),
trace = FALSE, nls.control(maxiter = 1000))
(plateau <- round(model_plt$m$getPars()[3]))clx
176
r2_plateau <- r2s_df$R2[plateau]
rcompanion::plotPredy(data = r2s_df,
x = i,
y = R2,
model = model_plt, pch = 20,
cex = .5,
main = 'linear plateau',
xlab = 'i',
ylab = expression(R^2))
abline(v = plateau); abline(h = r2_plateau)U1.i
92
r2_breakp <- r2s_df$R2[breakp]
plot(r2s_df, type = 'l', ylab = expression(R^2), main = 'break point')
plot(segfit, add=TRUE)abline(v = breakp); abline(h = r2_breakp)
text(x = breakp, y = r2_breakp-.05, toString(format(r2_breakp, digits = 3)), pos = 4)
alpha_power_data <- alpha_power_data|>
mutate(Amplitude = ifelse(r_squared<r2_breakp, NaN, Amplitude))
alpha_power_data$Dataset <- factor(alpha_power_data$Dataset)
alpha_power_data$Electrode <- factor(alpha_power_data$Electrode)
alpha_power_data$Subject <- factor(alpha_power_data$Subject)
alpha_power_data$hemisphere[alpha_power_data$Electrode %in% c('E093-Fp1', 'E092-AF3a', 'E094-AF7', 'E089-F1a', 'E100-F3a', 'E101-F5a', 'E103-F7', 'E088-FC1a')] <- 'Left'
alpha_power_data$hemisphere[alpha_power_data$Electrode %in% c('E080-Fp2', 'E079-AF4a', 'E072-AF8', 'E076-F2a', 'E068-F4a', 'E069-F6a', 'E071-F8', 'E075-FC2a')] <- 'Right'
alpha_power_data$hemisphere <- factor(alpha_power_data$hemisphere)
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E093-Fp1' , 'E080-Fp2')] <- 'Fp1-Fp2'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E092-AF3a', 'E079-AF4a')] <- 'AF3-AF4'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E094-AF7' , 'E072-AF8')] <- 'AF7-AF8'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E089-F1a' , 'E076-F2a')] <- 'F1-F2'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E100-F3a' , 'E068-F4a')] <- 'F3-F4'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E101-F5a' , 'E069-F6a')] <- 'F5-F6'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E103-F7' , 'E071-F8')] <- 'F7-F8'
alpha_power_data$electrode_pair[alpha_power_data$Electrode %in% c('E088-FC1a', 'E075-FC2a')] <- 'FC1-FC2'
alpha_power_data$electrode_pair <- factor(alpha_power_data$electrode_pair, levels = c('Fp1-Fp2', 'AF3-AF4', 'AF7-AF8', 'F1-F2', 'F3-F4','F5-F6', 'F7-F8', 'FC1-FC2'))
group_id <- read.table("/home/alvaro/Insync/Drive/00EEG/Proyectos/Huepe/fdcyt_2017/Registro-Evaluaciones-FDCYT-DH-2017 - General ANONIMO.csv",
sep = ",", header = TRUE, col.names = c("full.id", "Subject", "Sex", "Group", "Stress"))
group_id$Sex <- factor(group_id$Sex)
group_id$Group <- factor(group_id$Group)
levels(group_id$Sex) <- list(female = "F", male = "M")
levels(group_id$Group) <- list(Control = "CN", "low-SES" = "EX")
group_id <- group_id[c('Subject', 'Group', 'Sex')]
alpha_power_data <- merge(alpha_power_data, group_id, by = 'Subject')
write.csv(alpha_power_data, 'alpha_power_data_clean.csv', row.names = FALSE)
asymmetry_Fp2_Fp1 <- c()
asymmetry_AF4_AF3 <- c()
asymmetry_AF8_AF7 <- c()
asymmetry_F2_F1 <- c()
asymmetry_F4_F3 <- c()
asymmetry_F6_F5 <- c()
asymmetry_F8_F7 <- c()
asymmetry_FC2_FC1 <- c()
Subject <- unique(alpha_power_data$Subject)
for (subj in Subject) {
subject_data <- subset(alpha_power_data, Subject == subj)
asymmetry_Fp2_Fp1 <- c(asymmetry_Fp2_Fp1, subject_data[which(subject_data$Electrode == 'E080-Fp2') , 5] - subject_data[which(subject_data$Electrode=='E093-Fp1') , 5])
asymmetry_AF4_AF3 <- c(asymmetry_AF4_AF3, subject_data[which(subject_data$Electrode == 'E079-AF4a'), 5] - subject_data[which(subject_data$Electrode=='E092-AF3a'), 5])
asymmetry_AF8_AF7 <- c(asymmetry_AF8_AF7, subject_data[which(subject_data$Electrode == 'E072-AF8') , 5] - subject_data[which(subject_data$Electrode=='E094-AF7') , 5])
asymmetry_F2_F1 <- c(asymmetry_F2_F1 , subject_data[which(subject_data$Electrode == 'E076-F2a') , 5] - subject_data[which(subject_data$Electrode=='E089-F1a') , 5])
asymmetry_F4_F3 <- c(asymmetry_F4_F3 , subject_data[which(subject_data$Electrode == 'E068-F4a') , 5] - subject_data[which(subject_data$Electrode=='E100-F3a') , 5])
asymmetry_F6_F5 <- c(asymmetry_F6_F5 , subject_data[which(subject_data$Electrode == 'E069-F6a') , 5] - subject_data[which(subject_data$Electrode=='E101-F5a') , 5])
asymmetry_F8_F7 <- c(asymmetry_F8_F7 , subject_data[which(subject_data$Electrode == 'E071-F8') , 5] - subject_data[which(subject_data$Electrode=='E103-F7') , 5])
asymmetry_FC2_FC1 <- c(asymmetry_FC2_FC1, subject_data[which(subject_data$Electrode == 'E075-FC2a'), 5] - subject_data[which(subject_data$Electrode=='E088-FC1a'), 5])
}
alpha_asymmetry_data <- data.frame(Subject, asymmetry_Fp2_Fp1, asymmetry_AF4_AF3, asymmetry_AF8_AF7, asymmetry_F2_F1, asymmetry_F4_F3, asymmetry_F6_F5, asymmetry_F8_F7, asymmetry_FC2_FC1)
alpha_asymmetry_data <- merge(alpha_asymmetry_data, group_id, by = 'Subject')
alpha_asymmetry_data_long <- pivot_longer(alpha_asymmetry_data,
cols = asymmetry_Fp2_Fp1:asymmetry_FC2_FC1,
names_to = 'Electrodes' ,
names_prefix = 'asymmetry_',
names_ptypes = factor(),
values_to = 'Asimmetry')
write.csv(alpha_asymmetry_data , 'alpha_asymmetry_data_clean.csv' , row.names = FALSE)
write.csv(alpha_asymmetry_data_long, 'alpha_asymmetry_data_clean_long.csv', row.names = FALSE)options(width = 100)
mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_data)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 19 20 39
low-SES 24 14 38
Sum 43 34 77
Each individual PSD is regarded as a combination of an aperiodic
component, characterized by an offset and a
slope, and putative periodic oscillatory peaks:
The process goes like this…
Power Spectrum P Fit: \[P = L + \sum_{n=0}^N G_n\]
Where: \[L = aperiodic\ signal\] \[G_n = Gaussian\ fit\ to\ a\ peak\] \[N = total\ peaks\ extracted\]
Aperiodic (background) Fit L: \[L = b - \log_{10}(k + F^\chi)\]
Where: \[b = broadband\
offset\] \[k = ``knee"\
parameter\] \[F = vector\ of\
frequencies\] \[\chi = aperiodic\
slope\]
Subject asymmetry_Fp2_Fp1 asymmetry_AF4_AF3 asymmetry_AF8_AF7 asymmetry_F2_F1
1 : 1 Min. :-0.206149 Min. :-0.412796 Min. :-0.437897 Min. :-0.21493
2 : 1 1st Qu.:-0.073571 1st Qu.:-0.088355 1st Qu.:-0.098969 1st Qu.:-0.02875
4 : 1 Median : 0.022938 Median : 0.010689 Median :-0.003623 Median : 0.02006
5 : 1 Mean : 0.006232 Mean :-0.004215 Mean :-0.005782 Mean : 0.01927
6 : 1 3rd Qu.: 0.074394 3rd Qu.: 0.075316 3rd Qu.: 0.090055 3rd Qu.: 0.04651
7 : 1 Max. : 0.347914 Max. : 0.380950 Max. : 0.498119 Max. : 0.20971
(Other):71 NA's :24 NA's :20 NA's :19 NA's :7
asymmetry_F4_F3 asymmetry_F6_F5 asymmetry_F8_F7 asymmetry_FC2_FC1 Group
Min. :-0.203212 Min. :-0.393810 Min. :-0.51034 Min. :-0.20251 Control:39
1st Qu.:-0.074084 1st Qu.:-0.127847 1st Qu.:-0.14638 1st Qu.:-0.02932 low-SES:38
Median : 0.004824 Median :-0.007187 Median :-0.02325 Median : 0.01538
Mean : 0.000905 Mean :-0.032748 Mean :-0.05060 Mean : 0.02035
3rd Qu.: 0.066567 3rd Qu.: 0.063976 3rd Qu.: 0.02053 3rd Qu.: 0.05149
Max. : 0.267287 Max. : 0.268483 Max. : 0.26139 Max. : 0.48270
NA's :15 NA's :22 NA's :22 NA's :6
Sex
female:43
male :34
asymmetry_pairs <- c('asymmetry_Fp2_Fp1', 'asymmetry_AF4_AF3', 'asymmetry_AF8_AF7', 'asymmetry_F2_F1', 'asymmetry_F4_F3', 'asymmetry_F6_F5', 'asymmetry_F8_F7', 'asymmetry_FC2_FC1')
asymmetry_pairs_pairs <- ggpairs(alpha_asymmetry_data,
columns = asymmetry_pairs,
aes(colour = Group, alpha = .25),
progress = FALSE,
lower = list(continuous = wrap("points")))
suppressWarnings(print(asymmetry_pairs_pairs))options(width = 100)
rosner_mu <- EnvStats::rosnerTest(alpha_asymmetry_data_long$Asimmetry, 5)
mu_outliers <- rosner_mu$all.stats$Value[rosner_mu$all.stats$Outlier == TRUE]
EnvStats::print(rosner_mu)
Results of Outlier Test
-------------------------
Test Method: Rosner's Test for Outliers
Hypothesized Distribution: Normal
Data: alpha_asymmetry_data_long$Asimmetry
Number NA/NaN/Inf's Removed: 135
Sample Size: 481
Test Statistics: R.1 = 3.902537
R.2 = 3.922472
R.3 = 3.868746
R.4 = 3.490958
R.5 = 3.464906
Test Statistic Parameter: k = 5
Alternative Hypothesis: Up to 5 observations are not
from the same Distribution.
Type I Error: 5%
Number of Outliers Detected: 3
i Mean.i SD.i Value Obs.Num R.i+1 lambda.i+1 Outlier
1 0 -0.004114865 0.1297169 -0.510340 455 3.902537 3.852849 TRUE
2 1 -0.003060229 0.1277713 0.498119 339 3.922472 3.852296 TRUE
3 2 -0.004106532 0.1258295 0.482696 40 3.868746 3.851741 TRUE
4 3 -0.005124948 0.1239694 -0.437897 51 3.490958 3.851185 FALSE
5 4 -0.004217669 0.1225007 -0.428671 115 3.464906 3.850627 FALSE
if (length(mu_outliers) != 0) {
alpha_asymmetry_df <- alpha_asymmetry_data_long |>
filter(! Asimmetry %in% mu_outliers )
} else {
alpha_asymmetry_df <- alpha_asymmetry_data_long
}
summary(alpha_asymmetry_data_long) Subject Group Sex Electrodes Asimmetry
1 : 8 Control:312 female:344 Fp2_Fp1: 77 Min. :-0.510340
2 : 8 low-SES:304 male :272 AF4_AF3: 77 1st Qu.:-0.070553
4 : 8 AF8_AF7: 77 Median : 0.006295
5 : 8 F2_F1 : 77 Mean :-0.004115
6 : 8 F4_F3 : 77 3rd Qu.: 0.063526
7 : 8 F6_F5 : 77 Max. : 0.498119
(Other):568 (Other):154 NA's :135
alpha_asymmetry_lmer = lmer(Asimmetry ~ Group*Sex + (1|Subject) + (1|Electrodes), alpha_asymmetry_df)
afex_plot(
alpha_asymmetry_lmer,
x = "Group",
trace = "Sex",
id = "Subject",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: Asimmetry ~ Group * Sex + (1 | Subject) + (1 | Electrodes)
Data: alpha_asymmetry_df
REML criterion at convergence: -705.2
Scaled residuals:
Min 1Q Median 3Q Max
-3.6112 -0.4776 0.0064 0.5171 3.1276
Random effects:
Groups Name Variance Std.Dev.
Subject (Intercept) 0.0033504 0.05788
Electrodes (Intercept) 0.0002555 0.01598
Residual 0.0107265 0.10357
Number of obs: 478, groups: Subject, 71; Electrodes, 8
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 0.02245 0.01822 68.60540 1.233 0.22193
Grouplow-SES -0.07782 0.02323 73.58692 -3.349 0.00128 **
Sexmale -0.00317 0.02388 71.67944 -0.133 0.89476
Grouplow-SES:Sexmale 0.06259 0.03419 71.07894 1.831 0.07133 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Gr-SES Sexmal
Grouplw-SES -0.707
Sexmale -0.689 0.539
Grplw-SES:S 0.481 -0.680 -0.698
# Indices of model performance
AIC | AICc | BIC | R2 (cond.) | R2 (marg.) | ICC | RMSE | Sigma
--------------------------------------------------------------------------
-691.2 | -690.9 | -662.0 | 0.305 | 0.072 | 0.252 | 0.098 | 0.104
ANOVA-like table for random-effects: Single term deletions
Model:
Asimmetry ~ Group + Sex + (1 | Subject) + (1 | Electrodes) + Group:Sex
npar logLik AIC LRT Df Pr(>Chisq)
<none> 7 352.58 -691.15
(1 | Subject) 6 324.95 -637.91 55.244 1 1.065e-13 ***
(1 | Electrodes) 6 350.83 -689.66 3.492 1 0.06168 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Type III Analysis of Variance Table with Satterthwaite's method
Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
Group 0.079455 0.079455 1 71.111 7.4073 0.008163 **
Sex 0.029014 0.029014 1 71.132 2.7049 0.104452
Group:Sex 0.035952 0.035952 1 71.079 3.3517 0.071326 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# Effect Size for ANOVA (Type III)
Parameter | Omega2 (partial) | 95% CI | Interpretation
------------------------------------------------------------
Group | 0.08 | [0.00, 0.22] | medium
Sex | 0.02 | [0.00, 0.13] | small
Group:Sex | 0.03 | [0.00, 0.15] | small
- Interpretation rule: field2013
____________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0209 0.0132 41.2 -0.00585 0.04759
low-SES -0.0257 0.0135 42.6 -0.05288 0.00157
Results are averaged over the levels of: Sex
Degrees-of-freedom method: kenward-roger
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Control - (low-SES) 0.0465 0.0171 65.8 2.720 0.0083
Results are averaged over the levels of: Sex
Degrees-of-freedom method: kenward-roger
Sex Group emmean SE df lower.CL upper.CL
female Control 0.02245 0.0182 64.5 -0.0140 0.0589
male Control 0.01928 0.0174 56.6 -0.0156 0.0541
female low-SES -0.05536 0.0165 56.2 -0.0885 -0.0222
male low-SES 0.00405 0.0198 63.7 -0.0354 0.0435
Degrees-of-freedom method: kenward-roger
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_Fp2_Fp1", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 12 16 28
low-SES 15 10 25
Sum 27 26 53
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_Fp2_Fp1
Effect df MSE F ges p.value
1 Group 1, 49 0.01 1.34 .027 .252
2 Sex 1, 49 0.01 1.28 .025 .263
3 Group:Sex 1, 49 0.01 0.14 .003 .707
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0255 0.0224 49 -0.0195 0.0706
low-SES -0.0124 0.0239 49 -0.0605 0.0357
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0120 0.0227 49 -0.0576 0.0337
male 0.0251 0.0236 49 -0.0224 0.0726
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0132 0.0339 49 -0.0548 0.0812
low-SES female -0.0372 0.0303 49 -0.0980 0.0237
Control male 0.0379 0.0293 49 -0.0210 0.0968
low-SES male 0.0123 0.0371 49 -0.0622 0.0869
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_AF4_AF3", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 12 18 30
low-SES 15 12 27
Sum 27 30 57
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_AF4_AF3
Effect df MSE F ges p.value
1 Group 1, 53 0.02 2.76 .049 .103
2 Sex 1, 53 0.02 1.70 .031 .198
3 Group:Sex 1, 53 0.02 1.36 .025 .249
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0277 0.0262 53 -0.0249 0.0803
low-SES -0.0351 0.0272 53 -0.0897 0.0196
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0283 0.0272 53 -0.0830 0.0263
male 0.0210 0.0262 53 -0.0316 0.0735
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0251 0.0406 53 -0.0564 0.10650
low-SES female -0.0818 0.0363 53 -0.1546 -0.00892
Control male 0.0303 0.0332 53 -0.0362 0.09683
low-SES male 0.0116 0.0406 53 -0.0698 0.09305
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_AF8_AF7", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 13 15 28
low-SES 18 12 30
Sum 31 27 58
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_AF8_AF7
Effect df MSE F ges p.value
1 Group 1, 54 0.03 6.93 * .114 .011
2 Sex 1, 54 0.03 1.88 .034 .175
3 Group:Sex 1, 54 0.03 3.90 + .067 .053
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
________________________________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0639 0.0322 54 -0.000552 0.12840
low-SES -0.0548 0.0316 54 -0.118243 0.00858
Results are averaged over the levels of: Sex
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Control - (low-SES) 0.119 0.0451 54 2.633 0.0110
Results are averaged over the levels of: Sex
Sex emmean SE df lower.CL upper.CL
female -0.0264 0.0309 54 -0.0883 0.0355
male 0.0355 0.0329 54 -0.0304 0.1014
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0775 0.0471 54 -0.0169 0.1719
low-SES female -0.1303 0.0400 54 -0.2105 -0.0501
Control male 0.0503 0.0438 54 -0.0375 0.1382
low-SES male 0.0207 0.0490 54 -0.0776 0.1189
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_F2_F1", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 17 18 35
low-SES 21 14 35
Sum 38 32 70
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_F2_F1
Effect df MSE F ges p.value
1 Group 1, 66 0.01 0.77 .011 .385
2 Sex 1, 66 0.01 0.11 .002 .737
3 Group:Sex 1, 66 0.01 0.05 <.001 .832
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0271 0.0126 66 0.00201 0.0521
low-SES 0.0114 0.0128 66 -0.01418 0.0370
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female 0.0223 0.0121 66 -0.00192 0.0464
male 0.0162 0.0132 66 -0.01020 0.0426
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0320 0.0180 66 -0.00393 0.0680
low-SES female 0.0125 0.0162 66 -0.01984 0.0448
Control male 0.0221 0.0175 66 -0.01280 0.0571
low-SES male 0.0103 0.0198 66 -0.02934 0.0499
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_F4_F3", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 14 17 31
low-SES 19 12 31
Sum 33 29 62
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_F4_F3
Effect df MSE F ges p.value
1 Group 1, 58 0.01 5.01 * .080 .029
2 Sex 1, 58 0.01 1.38 .023 .245
3 Group:Sex 1, 58 0.01 2.68 .044 .107
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
________________________________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0353 0.0187 58 -0.00206 0.0728
low-SES -0.0245 0.0191 58 -0.06268 0.0138
Results are averaged over the levels of: Sex
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Control - (low-SES) 0.0598 0.0267 58 2.238 0.0290
Results are averaged over the levels of: Sex
Sex emmean SE df lower.CL upper.CL
female -0.0102 0.0182 58 -0.0467 0.0263
male 0.0211 0.0195 58 -0.0180 0.0602
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0416 0.0277 58 -0.0139 0.0970
low-SES female -0.0620 0.0238 58 -0.1096 -0.0145
Control male 0.0291 0.0251 58 -0.0211 0.0794
low-SES male 0.0131 0.0299 58 -0.0468 0.0729
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_F6_F5", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 13 16 29
low-SES 17 9 26
Sum 30 25 55
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_F6_F5
Effect df MSE F ges p.value
1 Group 1, 51 0.02 3.70 + .068 .060
2 Sex 1, 51 0.02 2.37 .044 .129
3 Group:Sex 1, 51 0.02 0.27 .005 .606
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.00452 0.0242 51 -0.0442 0.0532
low-SES -0.06500 0.0268 51 -0.1187 -0.0113
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.05807 0.0239 51 -0.1061 -0.0100
male -0.00241 0.0271 51 -0.0567 0.0519
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female -0.0139 0.0360 51 -0.0862 0.0584
low-SES female -0.1022 0.0315 51 -0.1655 -0.0390
Control male 0.0230 0.0325 51 -0.0422 0.0882
low-SES male -0.0278 0.0433 51 -0.1147 0.0591
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_F8_F7", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 11 15 26
low-SES 17 12 29
Sum 28 27 55
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_F8_F7
Effect df MSE F ges p.value
1 Group 1, 51 0.02 0.18 .004 .673
2 Sex 1, 51 0.02 0.26 .005 .615
3 Group:Sex 1, 51 0.02 0.29 .006 .595
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control -0.0618 0.0308 51 -0.124 0.000101
low-SES -0.0437 0.0293 51 -0.103 0.015024
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0635 0.0300 51 -0.124 -0.0032
male -0.0420 0.0301 51 -0.102 0.0184
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female -0.0839 0.0468 51 -0.178 0.0101
low-SES female -0.0431 0.0377 51 -0.119 0.0325
Control male -0.0397 0.0401 51 -0.120 0.0408
low-SES male -0.0443 0.0448 51 -0.134 0.0456
Confidence level used: 0.95
options(width = 100)
alpha_asymmetry_rep_anova = aov_ez("Subject", "asymmetry_FC2_FC1", alpha_asymmetry_data, between = c("Group", "Sex"))mytable <- xtabs(~ Group + Sex, data = alpha_asymmetry_rep_anova$data$long)
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 18 18 36
low-SES 21 14 35
Sum 39 32 71
alpha_asymmetry_afex_plot <-
afex_plot(
alpha_asymmetry_rep_anova,
x = "Group",
trace = "Sex",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_asymmetry_afex_plot))Anova Table (Type 3 tests)
Response: asymmetry_FC2_FC1
Effect df MSE F ges p.value
1 Group 1, 67 0.01 0.13 .002 .718
2 Sex 1, 67 0.01 4.31 * .060 .042
3 Group:Sex 1, 67 0.01 3.03 + .043 .086
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0283 0.0150 67 -0.00166 0.0582
low-SES 0.0204 0.0155 67 -0.01054 0.0514
Results are averaged over the levels of: Sex
Confidence level used: 0.95
________________________________________________________________________________
$emmeans
Sex emmean SE df lower.CL upper.CL
female 0.00194 0.0145 67 -0.0269 0.0308
male 0.04677 0.0160 67 0.0148 0.0788
Results are averaged over the levels of: Group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
female - male -0.0448 0.0216 67 -2.077 0.0416
Results are averaged over the levels of: Group
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0246 0.0212 67 -0.0177 0.0670
low-SES female -0.0208 0.0196 67 -0.0600 0.0184
Control male 0.0319 0.0212 67 -0.0104 0.0742
low-SES male 0.0616 0.0240 67 0.0136 0.1096
Confidence level used: 0.95
Subject Dataset Electrode Frequency Amplitude
1 : 16 rest_001_resting.csv: 16 E068-F4a : 77 Min. : 7.043 Min. :0.06018
2 : 16 rest_002_resting.csv: 16 E069-F6a : 77 1st Qu.: 9.152 1st Qu.:0.53997
4 : 16 rest_004_resting.csv: 16 E071-F8 : 77 Median :10.107 Median :0.79563
5 : 16 rest_005_resting.csv: 16 E072-AF8 : 77 Mean : 9.964 Mean :0.82887
6 : 16 rest_006_resting.csv: 16 E075-FC2a: 77 3rd Qu.:10.727 3rd Qu.:1.09256
7 : 16 rest_007_resting.csv: 16 E076-F2a : 77 Max. :12.046 Max. :1.94427
(Other):1136 (Other) :1136 (Other) :770 NA's :145 NA's :201
Width Offset Slope r_squared error
Min. :1.000 Min. :-0.7554 Min. :-0.4384 Min. :0.1708 Min. :0.01429
1st Qu.:1.606 1st Qu.: 0.7167 1st Qu.: 0.8150 1st Qu.:0.9509 1st Qu.:0.03191
Median :2.072 Median : 0.9958 Median : 1.0931 Median :0.9846 Median :0.04258
Mean :2.217 Mean : 1.0009 Mean : 1.0775 Mean :0.9474 Mean :0.04874
3rd Qu.:2.576 3rd Qu.: 1.3058 3rd Qu.: 1.3345 3rd Qu.:0.9928 3rd Qu.:0.05904
Max. :5.000 Max. : 3.1101 Max. : 2.6227 Max. :0.9988 Max. :0.19031
NA's :145
n_peaks f_inf f_sup alpha_inf alpha_sup hemisphere electrode_pair
Min. :0.000 Min. :2 Min. :48 Min. :7 Min. :13 Left :616 Fp1-Fp2:154
1st Qu.:2.000 1st Qu.:2 1st Qu.:48 1st Qu.:7 1st Qu.:13 Right:616 AF3-AF4:154
Median :3.000 Median :2 Median :48 Median :7 Median :13 AF7-AF8:154
Mean :2.962 Mean :2 Mean :48 Mean :7 Mean :13 F1-F2 :154
3rd Qu.:4.000 3rd Qu.:2 3rd Qu.:48 3rd Qu.:7 3rd Qu.:13 F3-F4 :154
Max. :4.000 Max. :2 Max. :48 Max. :7 Max. :13 F5-F6 :154
(Other):308
Group Sex
Control:624 female:688
low-SES:608 male :544
spec_params <- c('Amplitude', 'Frequency', 'Width', 'Offset', 'Slope')
spec_params_pairs <- ggpairs(alpha_power_data,
columns = spec_params,
aes(colour = Group, alpha = .25),
progress = FALSE,
lower = list(continuous = wrap("points")))
suppressWarnings(print(spec_params_pairs))options(width = 100)
alpha_pow_rep_anova = aov_ez("Subject", "Amplitude", alpha_power_data, between = c("Group", "Sex"), within = c("hemisphere", "electrode_pair"))mytable <- xtabs(~ Group + Sex, data = alpha_pow_rep_anova$data$long) / length(levels(alpha_pow_rep_anova$data$long$electrode_pair)) / length(levels(alpha_pow_rep_anova$data$long$hemisphere))
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 9 14 23
low-SES 13 7 20
Sum 22 21 43
alpha_pow_afex_plot <-
afex_plot(
alpha_pow_rep_anova,
x = "Group",
trace = "Sex",
panel = "hemisphere",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_pow_afex_plot))Anova Table (Type 3 tests)
Response: Amplitude
Effect df MSE F ges p.value
1 Group 1, 39 1.75 0.74 .017 .395
2 Sex 1, 39 1.75 0.10 .002 .751
3 Group:Sex 1, 39 1.75 0.34 .008 .564
4 hemisphere 1, 39 0.02 0.07 <.001 .800
5 Group:hemisphere 1, 39 0.02 2.16 <.001 .149
6 Sex:hemisphere 1, 39 0.02 1.74 <.001 .194
7 Group:Sex:hemisphere 1, 39 0.02 0.96 <.001 .333
8 electrode_pair 2.87, 111.81 0.04 36.27 *** .052 <.001
9 Group:electrode_pair 2.87, 111.81 0.04 0.28 <.001 .828
10 Sex:electrode_pair 2.87, 111.81 0.04 0.60 <.001 .608
11 Group:Sex:electrode_pair 2.87, 111.81 0.04 0.04 <.001 .986
12 hemisphere:electrode_pair 4.62, 180.01 0.01 2.48 * .001 .038
13 Group:hemisphere:electrode_pair 4.62, 180.01 0.01 1.46 <.001 .210
14 Sex:hemisphere:electrode_pair 4.62, 180.01 0.01 0.36 <.001 .864
15 Group:Sex:hemisphere:electrode_pair 4.62, 180.01 0.01 1.15 <.001 .334
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
$emmeans
Group = Control:
hemisphere emmean SE df lower.CL upper.CL
Left 0.997 0.0725 39 0.851 1.14
Right 1.012 0.0695 39 0.871 1.15
Group = low-SES:
hemisphere emmean SE df lower.CL upper.CL
Left 0.925 0.0795 39 0.764 1.09
Right 0.904 0.0763 39 0.750 1.06
Results are averaged over the levels of: Sex, electrode_pair
Confidence level used: 0.95
$contrasts
Group = Control:
contrast estimate SE df t.ratio p.value
Left - Right -0.0147 0.0163 39 -0.902 0.3727
Group = low-SES:
contrast estimate SE df t.ratio p.value
Left - Right 0.0209 0.0179 39 1.168 0.2500
Results are averaged over the levels of: Sex, electrode_pair
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.919 0.0523 39 0.813 1.024
AF3.AF4 0.956 0.0543 39 0.847 1.066
AF7.AF8 0.866 0.0552 39 0.755 0.978
F1.F2 1.072 0.0534 39 0.964 1.180
F3.F4 0.989 0.0538 39 0.881 1.098
F5.F6 0.929 0.0555 39 0.817 1.041
F7.F8 0.857 0.0572 39 0.741 0.973
FC1.FC2 1.088 0.0505 39 0.986 1.190
Results are averaged over the levels of: Group, Sex, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 -0.03777 0.0134 39 -2.816 0.1204
Fp1.Fp2 - AF7.AF8 0.05251 0.0191 39 2.753 0.1374
Fp1.Fp2 - F1.F2 -0.15369 0.0250 39 -6.150 <.0001
Fp1.Fp2 - F3.F4 -0.07075 0.0272 39 -2.601 0.1864
Fp1.Fp2 - F5.F6 -0.01034 0.0259 39 -0.399 0.9999
Fp1.Fp2 - F7.F8 0.06178 0.0261 39 2.370 0.2842
Fp1.Fp2 - FC1.FC2 -0.16919 0.0298 39 -5.669 <.0001
AF3.AF4 - AF7.AF8 0.09028 0.0179 39 5.036 0.0003
AF3.AF4 - F1.F2 -0.11592 0.0166 39 -6.964 <.0001
AF3.AF4 - F3.F4 -0.03299 0.0195 39 -1.690 0.6930
AF3.AF4 - F5.F6 0.02743 0.0192 39 1.429 0.8380
AF3.AF4 - F7.F8 0.09955 0.0208 39 4.783 0.0006
AF3.AF4 - FC1.FC2 -0.13143 0.0231 39 -5.696 <.0001
AF7.AF8 - F1.F2 -0.20620 0.0229 39 -8.994 <.0001
AF7.AF8 - F3.F4 -0.12327 0.0221 39 -5.587 <.0001
AF7.AF8 - F5.F6 -0.06286 0.0185 39 -3.400 0.0305
AF7.AF8 - F7.F8 0.00927 0.0159 39 0.581 0.9989
AF7.AF8 - FC1.FC2 -0.22171 0.0272 39 -8.147 <.0001
F1.F2 - F3.F4 0.08293 0.0119 39 6.956 <.0001
F1.F2 - F5.F6 0.14335 0.0157 39 9.130 <.0001
F1.F2 - F7.F8 0.21547 0.0215 39 10.040 <.0001
F1.F2 - FC1.FC2 -0.01551 0.0105 39 -1.471 0.8177
F3.F4 - F5.F6 0.06041 0.0130 39 4.643 0.0009
F3.F4 - F7.F8 0.13253 0.0167 39 7.923 <.0001
F3.F4 - FC1.FC2 -0.09844 0.0143 39 -6.862 <.0001
F5.F6 - F7.F8 0.07212 0.0112 39 6.414 <.0001
F5.F6 - FC1.FC2 -0.15885 0.0179 39 -8.887 <.0001
F7.F8 - FC1.FC2 -0.23097 0.0242 39 -9.526 <.0001
Results are averaged over the levels of: Group, Sex, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
________________________________________________________________________________
$emmeans
hemisphere = Left:
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.917 0.0542 39 0.807 1.026
AF3.AF4 0.954 0.0567 39 0.840 1.069
AF7.AF8 0.865 0.0583 39 0.747 0.983
F1.F2 1.062 0.0539 39 0.953 1.171
F3.F4 0.989 0.0552 39 0.878 1.101
F5.F6 0.943 0.0572 39 0.827 1.058
F7.F8 0.884 0.0603 39 0.762 1.006
FC1.FC2 1.074 0.0515 39 0.970 1.178
hemisphere = Right:
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.920 0.0518 39 0.816 1.025
AF3.AF4 0.959 0.0542 39 0.849 1.068
AF7.AF8 0.867 0.0548 39 0.756 0.978
F1.F2 1.082 0.0537 39 0.974 1.191
F3.F4 0.989 0.0536 39 0.881 1.098
F5.F6 0.915 0.0555 39 0.803 1.027
F7.F8 0.830 0.0568 39 0.715 0.945
FC1.FC2 1.101 0.0508 39 0.999 1.204
Results are averaged over the levels of: Group, Sex
Confidence level used: 0.95
$contrasts
hemisphere = Left:
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 -0.03744 0.0166 39 -2.256 0.3426
Fp1.Fp2 - AF7.AF8 0.05147 0.0227 39 2.270 0.3354
Fp1.Fp2 - F1.F2 -0.14553 0.0260 39 -5.592 <.0001
Fp1.Fp2 - F3.F4 -0.07263 0.0312 39 -2.325 0.3066
Fp1.Fp2 - F5.F6 -0.02605 0.0290 39 -0.897 0.9846
Fp1.Fp2 - F7.F8 0.03277 0.0288 39 1.138 0.9441
Fp1.Fp2 - FC1.FC2 -0.15747 0.0323 39 -4.871 0.0005
AF3.AF4 - AF7.AF8 0.08891 0.0242 39 3.669 0.0151
AF3.AF4 - F1.F2 -0.10809 0.0192 39 -5.626 <.0001
AF3.AF4 - F3.F4 -0.03519 0.0241 39 -1.460 0.8233
AF3.AF4 - F5.F6 0.01140 0.0243 39 0.469 0.9997
AF3.AF4 - F7.F8 0.07021 0.0251 39 2.793 0.1261
AF3.AF4 - FC1.FC2 -0.12003 0.0264 39 -4.543 0.0012
AF7.AF8 - F1.F2 -0.19700 0.0258 39 -7.646 <.0001
AF7.AF8 - F3.F4 -0.12410 0.0281 39 -4.410 0.0018
AF7.AF8 - F5.F6 -0.07752 0.0225 39 -3.443 0.0273
AF7.AF8 - F7.F8 -0.01870 0.0193 39 -0.968 0.9763
AF7.AF8 - FC1.FC2 -0.20894 0.0294 39 -7.096 <.0001
F1.F2 - F3.F4 0.07289 0.0156 39 4.682 0.0008
F1.F2 - F5.F6 0.11948 0.0161 39 7.444 <.0001
F1.F2 - F7.F8 0.17830 0.0214 39 8.322 <.0001
F1.F2 - FC1.FC2 -0.01194 0.0132 39 -0.904 0.9839
F3.F4 - F5.F6 0.04659 0.0154 39 3.020 0.0766
F3.F4 - F7.F8 0.10540 0.0200 39 5.266 0.0001
F3.F4 - FC1.FC2 -0.08484 0.0192 39 -4.429 0.0017
F5.F6 - F7.F8 0.05882 0.0153 39 3.836 0.0096
F5.F6 - FC1.FC2 -0.13142 0.0198 39 -6.633 <.0001
F7.F8 - FC1.FC2 -0.19024 0.0246 39 -7.749 <.0001
hemisphere = Right:
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 -0.03809 0.0163 39 -2.330 0.3037
Fp1.Fp2 - AF7.AF8 0.05356 0.0198 39 2.705 0.1516
Fp1.Fp2 - F1.F2 -0.16185 0.0272 39 -5.956 <.0001
Fp1.Fp2 - F3.F4 -0.06888 0.0261 39 -2.642 0.1719
Fp1.Fp2 - F5.F6 0.00536 0.0274 39 0.196 1.0000
Fp1.Fp2 - F7.F8 0.09079 0.0290 39 3.128 0.0595
Fp1.Fp2 - FC1.FC2 -0.18092 0.0306 39 -5.906 <.0001
AF3.AF4 - AF7.AF8 0.09165 0.0206 39 4.440 0.0017
AF3.AF4 - F1.F2 -0.12376 0.0206 39 -6.003 <.0001
AF3.AF4 - F3.F4 -0.03078 0.0205 39 -1.499 0.8035
AF3.AF4 - F5.F6 0.04346 0.0234 39 1.855 0.5882
AF3.AF4 - F7.F8 0.12888 0.0267 39 4.826 0.0005
AF3.AF4 - FC1.FC2 -0.14282 0.0264 39 -5.400 0.0001
AF7.AF8 - F1.F2 -0.21540 0.0276 39 -7.800 <.0001
AF7.AF8 - F3.F4 -0.12243 0.0227 39 -5.388 0.0001
AF7.AF8 - F5.F6 -0.04819 0.0220 39 -2.194 0.3772
AF7.AF8 - F7.F8 0.03723 0.0214 39 1.739 0.6624
AF7.AF8 - FC1.FC2 -0.23447 0.0318 39 -7.375 <.0001
F1.F2 - F3.F4 0.09297 0.0124 39 7.482 <.0001
F1.F2 - F5.F6 0.16721 0.0216 39 7.737 <.0001
F1.F2 - F7.F8 0.25263 0.0286 39 8.835 <.0001
F1.F2 - FC1.FC2 -0.01907 0.0116 39 -1.644 0.7215
F3.F4 - F5.F6 0.07424 0.0174 39 4.277 0.0027
F3.F4 - F7.F8 0.15966 0.0217 39 7.364 <.0001
F3.F4 - FC1.FC2 -0.11204 0.0168 39 -6.654 <.0001
F5.F6 - F7.F8 0.08542 0.0155 39 5.512 0.0001
F5.F6 - FC1.FC2 -0.18628 0.0237 39 -7.844 <.0001
F7.F8 - FC1.FC2 -0.27170 0.0314 39 -8.663 <.0001
Results are averaged over the levels of: Group, Sex
P value adjustment: tukey method for comparing a family of 8 estimates
options(width = 100)
alpha_freq_rep_anova = aov_ez("Subject", "Frequency", alpha_power_data, between = c("Group", "Sex"), within = c("hemisphere", "electrode_pair"))mytable <- xtabs(~ Group + Sex, data = alpha_freq_rep_anova$data$long) / length(levels(alpha_freq_rep_anova$data$long$electrode_pair)) / length(levels(alpha_freq_rep_anova$data$long$hemisphere))
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 10 17 27
low-SES 17 12 29
Sum 27 29 56
alpha_freq_afex_plot <-
afex_plot(
alpha_freq_rep_anova,
x = "Group",
trace = "Sex",
panel = "hemisphere",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_freq_afex_plot))Anova Table (Type 3 tests)
Response: Frequency
Effect df MSE F ges p.value
1 Group 1, 52 14.40 1.80 .031 .186
2 Sex 1, 52 14.40 0.77 .013 .384
3 Group:Sex 1, 52 14.40 0.48 .008 .492
4 hemisphere 1, 52 0.27 0.21 <.001 .646
5 Group:hemisphere 1, 52 0.27 0.06 <.001 .812
6 Sex:hemisphere 1, 52 0.27 0.09 <.001 .767
7 Group:Sex:hemisphere 1, 52 0.27 0.99 <.001 .325
8 electrode_pair 2.58, 134.26 0.25 3.38 * .003 .026
9 Group:electrode_pair 2.58, 134.26 0.25 0.78 <.001 .488
10 Sex:electrode_pair 2.58, 134.26 0.25 0.48 <.001 .671
11 Group:Sex:electrode_pair 2.58, 134.26 0.25 0.41 <.001 .717
12 hemisphere:electrode_pair 3.04, 157.88 0.12 0.74 <.001 .529
13 Group:hemisphere:electrode_pair 3.04, 157.88 0.12 0.73 <.001 .537
14 Sex:hemisphere:electrode_pair 3.04, 157.88 0.12 0.79 <.001 .504
15 Group:Sex:hemisphere:electrode_pair 3.04, 157.88 0.12 1.07 <.001 .366
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
Group emmean SE df lower.CL upper.CL
Control 9.79 0.189 52 9.41 10.2
low-SES 10.14 0.179 52 9.78 10.5
Results are averaged over the levels of: Sex, electrode_pair, hemisphere
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female 9.85 0.189 52 9.47 10.2
male 10.08 0.179 52 9.72 10.4
Results are averaged over the levels of: Group, electrode_pair, hemisphere
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 9.59 0.300 52 8.98 10.2
low-SES female 10.11 0.230 52 9.65 10.6
Control male 9.99 0.230 52 9.53 10.5
low-SES male 10.16 0.274 52 9.61 10.7
Results are averaged over the levels of: electrode_pair, hemisphere
Confidence level used: 0.95
hemisphere emmean SE df lower.CL upper.CL
Left 9.96 0.134 52 9.69 10.2
Right 9.97 0.129 52 9.71 10.2
Results are averaged over the levels of: Group, Sex, electrode_pair
Confidence level used: 0.95
Group hemisphere emmean SE df lower.CL upper.CL
Control Left 9.79 0.194 52 9.40 10.2
low-SES Left 10.13 0.184 52 9.76 10.5
Control Right 9.79 0.187 52 9.42 10.2
low-SES Right 10.15 0.177 52 9.80 10.5
Results are averaged over the levels of: Sex, electrode_pair
Confidence level used: 0.95
Sex hemisphere emmean SE df lower.CL upper.CL
female Left 9.84 0.194 52 9.45 10.2
male Left 10.08 0.184 52 9.71 10.4
female Right 9.86 0.187 52 9.49 10.2
male Right 10.08 0.177 52 9.73 10.4
Results are averaged over the levels of: Group, electrode_pair
Confidence level used: 0.95
Group Sex hemisphere emmean SE df lower.CL upper.CL
Control female Left 9.56 0.308 52 8.94 10.2
low-SES female Left 10.11 0.236 52 9.64 10.6
Control male Left 10.01 0.236 52 9.54 10.5
low-SES male Left 10.14 0.281 52 9.57 10.7
Control female Right 9.61 0.297 52 9.02 10.2
low-SES female Right 10.11 0.228 52 9.66 10.6
Control male Right 9.98 0.228 52 9.52 10.4
low-SES male Right 10.19 0.271 52 9.64 10.7
Results are averaged over the levels of: electrode_pair
Confidence level used: 0.95
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 10.01 0.129 52 9.75 10.3
AF3.AF4 9.98 0.138 52 9.70 10.3
AF7.AF8 10.01 0.134 52 9.74 10.3
F1.F2 9.92 0.132 52 9.65 10.2
F3.F4 9.91 0.133 52 9.64 10.2
F5.F6 9.97 0.136 52 9.70 10.2
F7.F8 10.03 0.130 52 9.77 10.3
FC1.FC2 9.89 0.133 52 9.62 10.2
Results are averaged over the levels of: Group, Sex, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 0.03655 0.0299 52 1.223 0.9214
Fp1.Fp2 - AF7.AF8 0.00496 0.0246 52 0.202 1.0000
Fp1.Fp2 - F1.F2 0.09511 0.0485 52 1.961 0.5172
Fp1.Fp2 - F3.F4 0.10752 0.0458 52 2.350 0.2874
Fp1.Fp2 - F5.F6 0.03891 0.0466 52 0.836 0.9901
Fp1.Fp2 - F7.F8 -0.01798 0.0377 52 -0.477 0.9997
Fp1.Fp2 - FC1.FC2 0.12626 0.0513 52 2.459 0.2361
AF3.AF4 - AF7.AF8 -0.03159 0.0238 52 -1.326 0.8847
AF3.AF4 - F1.F2 0.05856 0.0476 52 1.230 0.9191
AF3.AF4 - F3.F4 0.07097 0.0449 52 1.581 0.7592
AF3.AF4 - F5.F6 0.00236 0.0379 52 0.062 1.0000
AF3.AF4 - F7.F8 -0.05453 0.0407 52 -1.341 0.8787
AF3.AF4 - FC1.FC2 0.08971 0.0495 52 1.814 0.6137
AF7.AF8 - F1.F2 0.09015 0.0436 52 2.065 0.4501
AF7.AF8 - F3.F4 0.10256 0.0420 52 2.442 0.2436
AF7.AF8 - F5.F6 0.03395 0.0349 52 0.974 0.9762
AF7.AF8 - F7.F8 -0.02294 0.0325 52 -0.706 0.9965
AF7.AF8 - FC1.FC2 0.12130 0.0448 52 2.708 0.1432
F1.F2 - F3.F4 0.01241 0.0198 52 0.627 0.9983
F1.F2 - F5.F6 -0.05619 0.0517 52 -1.086 0.9570
F1.F2 - F7.F8 -0.11309 0.0538 52 -2.103 0.4267
F1.F2 - FC1.FC2 0.03115 0.0138 52 2.259 0.3352
F3.F4 - F5.F6 -0.06861 0.0522 52 -1.314 0.8894
F3.F4 - F7.F8 -0.12550 0.0532 52 -2.359 0.2831
F3.F4 - FC1.FC2 0.01874 0.0208 52 0.899 0.9849
F5.F6 - F7.F8 -0.05689 0.0274 52 -2.075 0.4444
F5.F6 - FC1.FC2 0.08735 0.0495 52 1.764 0.6462
F7.F8 - FC1.FC2 0.14424 0.0545 52 2.644 0.1637
Results are averaged over the levels of: Group, Sex, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
Group electrode_pair emmean SE df lower.CL upper.CL
Control Fp1.Fp2 9.84 0.188 52 9.46 10.2
low-SES Fp1.Fp2 10.19 0.178 52 9.83 10.5
Control AF3.AF4 9.81 0.200 52 9.40 10.2
low-SES AF3.AF4 10.15 0.189 52 9.77 10.5
Control AF7.AF8 9.81 0.194 52 9.42 10.2
low-SES AF7.AF8 10.20 0.184 52 9.83 10.6
Control F1.F2 9.73 0.192 52 9.34 10.1
low-SES F1.F2 10.11 0.181 52 9.75 10.5
Control F3.F4 9.72 0.193 52 9.33 10.1
low-SES F3.F4 10.09 0.183 52 9.73 10.5
Control F5.F6 9.83 0.198 52 9.44 10.2
low-SES F5.F6 10.12 0.187 52 9.74 10.5
Control F7.F8 9.90 0.188 52 9.53 10.3
low-SES F7.F8 10.16 0.178 52 9.80 10.5
Control FC1.FC2 9.69 0.193 52 9.30 10.1
low-SES FC1.FC2 10.09 0.182 52 9.72 10.5
Results are averaged over the levels of: Sex, hemisphere
Confidence level used: 0.95
Sex electrode_pair emmean SE df lower.CL upper.CL
female Fp1.Fp2 9.91 0.188 52 9.54 10.3
male Fp1.Fp2 10.11 0.178 52 9.76 10.5
female AF3.AF4 9.89 0.200 52 9.49 10.3
male AF3.AF4 10.07 0.189 52 9.69 10.4
female AF7.AF8 9.91 0.194 52 9.52 10.3
male AF7.AF8 10.11 0.184 52 9.74 10.5
female F1.F2 9.78 0.192 52 9.39 10.2
male F1.F2 10.06 0.181 52 9.70 10.4
female F3.F4 9.77 0.193 52 9.39 10.2
male F3.F4 10.04 0.183 52 9.67 10.4
female F5.F6 9.87 0.198 52 9.47 10.3
male F5.F6 10.08 0.187 52 9.71 10.5
female F7.F8 9.92 0.188 52 9.55 10.3
male F7.F8 10.14 0.178 52 9.78 10.5
female FC1.FC2 9.75 0.193 52 9.36 10.1
male FC1.FC2 10.03 0.182 52 9.66 10.4
Results are averaged over the levels of: Group, hemisphere
Confidence level used: 0.95
Group Sex electrode_pair emmean SE df lower.CL upper.CL
Control female Fp1.Fp2 9.62 0.298 52 9.02 10.2
low-SES female Fp1.Fp2 10.21 0.229 52 9.75 10.7
Control male Fp1.Fp2 10.06 0.229 52 9.60 10.5
low-SES male Fp1.Fp2 10.17 0.272 52 9.63 10.7
Control female AF3.AF4 9.63 0.317 52 9.00 10.3
low-SES female AF3.AF4 10.14 0.243 52 9.66 10.6
Control male AF3.AF4 9.98 0.243 52 9.49 10.5
low-SES male AF3.AF4 10.15 0.290 52 9.57 10.7
Control female AF7.AF8 9.61 0.308 52 8.99 10.2
low-SES female AF7.AF8 10.22 0.236 52 9.74 10.7
Control male AF7.AF8 10.02 0.236 52 9.55 10.5
low-SES male AF7.AF8 10.19 0.281 52 9.62 10.8
Control female F1.F2 9.49 0.304 52 8.88 10.1
low-SES female F1.F2 10.06 0.233 52 9.59 10.5
Control male F1.F2 9.96 0.233 52 9.50 10.4
low-SES male F1.F2 10.16 0.278 52 9.60 10.7
Control female F3.F4 9.49 0.307 52 8.87 10.1
low-SES female F3.F4 10.06 0.235 52 9.59 10.5
Control male F3.F4 9.95 0.235 52 9.47 10.4
low-SES male F3.F4 10.13 0.280 52 9.57 10.7
Control female F5.F6 9.66 0.314 52 9.03 10.3
low-SES female F5.F6 10.08 0.241 52 9.59 10.6
Control male F5.F6 10.01 0.241 52 9.53 10.5
low-SES male F5.F6 10.16 0.286 52 9.58 10.7
Control female F7.F8 9.71 0.299 52 9.12 10.3
low-SES female F7.F8 10.13 0.229 52 9.67 10.6
Control male F7.F8 10.09 0.229 52 9.63 10.6
low-SES male F7.F8 10.19 0.273 52 9.64 10.7
Control female FC1.FC2 9.48 0.306 52 8.87 10.1
low-SES female FC1.FC2 10.02 0.234 52 9.55 10.5
Control male FC1.FC2 9.89 0.234 52 9.42 10.4
low-SES male FC1.FC2 10.16 0.279 52 9.60 10.7
Results are averaged over the levels of: hemisphere
Confidence level used: 0.95
hemisphere electrode_pair emmean SE df lower.CL upper.CL
Left Fp1.Fp2 10.00 0.135 52 9.73 10.3
Right Fp1.Fp2 10.03 0.133 52 9.76 10.3
Left AF3.AF4 9.96 0.137 52 9.69 10.2
Right AF3.AF4 9.99 0.140 52 9.71 10.3
Left AF7.AF8 10.00 0.137 52 9.73 10.3
Right AF7.AF8 10.01 0.133 52 9.75 10.3
Left F1.F2 9.90 0.136 52 9.62 10.2
Right F1.F2 9.94 0.131 52 9.68 10.2
Left F3.F4 9.88 0.139 52 9.60 10.2
Right F3.F4 9.93 0.131 52 9.67 10.2
Left F5.F6 10.00 0.143 52 9.71 10.3
Right F5.F6 9.95 0.136 52 9.67 10.2
Left F7.F8 10.04 0.136 52 9.77 10.3
Right F7.F8 10.02 0.134 52 9.75 10.3
Left FC1.FC2 9.87 0.137 52 9.59 10.1
Right FC1.FC2 9.91 0.132 52 9.64 10.2
Results are averaged over the levels of: Group, Sex
Confidence level used: 0.95
Group hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control Left Fp1.Fp2 9.83 0.197 52 9.44 10.2
low-SES Left Fp1.Fp2 10.17 0.186 52 9.79 10.5
Control Right Fp1.Fp2 9.84 0.193 52 9.46 10.2
low-SES Right Fp1.Fp2 10.22 0.182 52 9.85 10.6
Control Left AF3.AF4 9.78 0.199 52 9.38 10.2
low-SES Left AF3.AF4 10.14 0.188 52 9.76 10.5
Control Right AF3.AF4 9.83 0.204 52 9.42 10.2
low-SES Right AF3.AF4 10.16 0.193 52 9.77 10.5
Control Left AF7.AF8 9.82 0.200 52 9.42 10.2
low-SES Left AF7.AF8 10.19 0.189 52 9.81 10.6
Control Right AF7.AF8 9.81 0.193 52 9.42 10.2
low-SES Right AF7.AF8 10.22 0.183 52 9.85 10.6
Control Left F1.F2 9.74 0.198 52 9.34 10.1
low-SES Left F1.F2 10.05 0.187 52 9.68 10.4
Control Right F1.F2 9.72 0.191 52 9.33 10.1
low-SES Right F1.F2 10.16 0.181 52 9.80 10.5
Control Left F3.F4 9.69 0.202 52 9.29 10.1
low-SES Left F3.F4 10.06 0.191 52 9.68 10.4
Control Right F3.F4 9.74 0.191 52 9.36 10.1
low-SES Right F3.F4 10.13 0.180 52 9.76 10.5
Control Left F5.F6 9.83 0.208 52 9.42 10.3
low-SES Left F5.F6 10.17 0.197 52 9.77 10.6
Control Right F5.F6 9.83 0.198 52 9.43 10.2
low-SES Right F5.F6 10.06 0.187 52 9.69 10.4
Control Left F7.F8 9.90 0.198 52 9.51 10.3
low-SES Left F7.F8 10.18 0.187 52 9.81 10.6
Control Right F7.F8 9.90 0.195 52 9.51 10.3
low-SES Right F7.F8 10.14 0.184 52 9.77 10.5
Control Left FC1.FC2 9.69 0.199 52 9.29 10.1
low-SES Left FC1.FC2 10.05 0.188 52 9.67 10.4
Control Right FC1.FC2 9.69 0.191 52 9.30 10.1
low-SES Right FC1.FC2 10.13 0.181 52 9.77 10.5
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
female Left Fp1.Fp2 9.87 0.197 52 9.47 10.3
male Left Fp1.Fp2 10.13 0.186 52 9.76 10.5
female Right Fp1.Fp2 9.96 0.193 52 9.57 10.3
male Right Fp1.Fp2 10.10 0.182 52 9.73 10.5
female Left AF3.AF4 9.87 0.199 52 9.48 10.3
male Left AF3.AF4 10.05 0.188 52 9.67 10.4
female Right AF3.AF4 9.90 0.204 52 9.49 10.3
male Right AF3.AF4 10.08 0.193 52 9.69 10.5
female Left AF7.AF8 9.90 0.200 52 9.50 10.3
male Left AF7.AF8 10.11 0.189 52 9.73 10.5
female Right AF7.AF8 9.92 0.193 52 9.54 10.3
male Right AF7.AF8 10.10 0.183 52 9.74 10.5
female Left F1.F2 9.73 0.198 52 9.33 10.1
male Left F1.F2 10.07 0.187 52 9.69 10.4
female Right F1.F2 9.83 0.191 52 9.44 10.2
male Right F1.F2 10.05 0.181 52 9.69 10.4
female Left F3.F4 9.74 0.202 52 9.33 10.1
male Left F3.F4 10.02 0.191 52 9.64 10.4
female Right F3.F4 9.81 0.191 52 9.43 10.2
male Right F3.F4 10.06 0.180 52 9.70 10.4
female Left F5.F6 9.92 0.208 52 9.50 10.3
male Left F5.F6 10.09 0.197 52 9.69 10.5
female Right F5.F6 9.82 0.198 52 9.42 10.2
male Right F5.F6 10.08 0.187 52 9.70 10.5
female Left F7.F8 9.95 0.198 52 9.56 10.3
male Left F7.F8 10.13 0.187 52 9.76 10.5
female Right F7.F8 9.89 0.195 52 9.50 10.3
male Right F7.F8 10.14 0.184 52 9.78 10.5
female Left FC1.FC2 9.72 0.199 52 9.32 10.1
male Left FC1.FC2 10.01 0.188 52 9.64 10.4
female Right FC1.FC2 9.78 0.191 52 9.39 10.2
male Right FC1.FC2 10.04 0.181 52 9.67 10.4
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control female Left Fp1.Fp2 9.54 0.312 52 8.91 10.2
low-SES female Left Fp1.Fp2 10.19 0.239 52 9.71 10.7
Control male Left Fp1.Fp2 10.12 0.239 52 9.64 10.6
low-SES male Left Fp1.Fp2 10.14 0.285 52 9.57 10.7
Control female Right Fp1.Fp2 9.70 0.306 52 9.08 10.3
low-SES female Right Fp1.Fp2 10.23 0.234 52 9.75 10.7
Control male Right Fp1.Fp2 9.99 0.234 52 9.52 10.5
low-SES male Right Fp1.Fp2 10.21 0.279 52 9.65 10.8
Control female Left AF3.AF4 9.60 0.315 52 8.96 10.2
low-SES female Left AF3.AF4 10.15 0.242 52 9.67 10.6
Control male Left AF3.AF4 9.97 0.242 52 9.48 10.5
low-SES male Left AF3.AF4 10.13 0.288 52 9.55 10.7
Control female Right AF3.AF4 9.67 0.323 52 9.02 10.3
low-SES female Right AF3.AF4 10.14 0.248 52 9.64 10.6
Control male Right AF3.AF4 9.99 0.248 52 9.49 10.5
low-SES male Right AF3.AF4 10.18 0.295 52 9.58 10.8
Control female Left AF7.AF8 9.60 0.317 52 8.96 10.2
low-SES female Left AF7.AF8 10.20 0.243 52 9.71 10.7
Control male Left AF7.AF8 10.04 0.243 52 9.56 10.5
low-SES male Left AF7.AF8 10.17 0.289 52 9.59 10.8
Control female Right AF7.AF8 9.61 0.306 52 9.00 10.2
low-SES female Right AF7.AF8 10.24 0.235 52 9.77 10.7
Control male Right AF7.AF8 10.00 0.235 52 9.53 10.5
low-SES male Right AF7.AF8 10.20 0.280 52 9.64 10.8
Control female Left F1.F2 9.49 0.314 52 8.86 10.1
low-SES female Left F1.F2 9.97 0.241 52 9.49 10.5
Control male Left F1.F2 9.99 0.241 52 9.51 10.5
low-SES male Left F1.F2 10.14 0.287 52 9.56 10.7
Control female Right F1.F2 9.50 0.303 52 8.89 10.1
low-SES female Right F1.F2 10.15 0.232 52 9.69 10.6
Control male Right F1.F2 9.93 0.232 52 9.47 10.4
low-SES male Right F1.F2 10.17 0.277 52 9.62 10.7
Control female Left F3.F4 9.46 0.321 52 8.81 10.1
low-SES female Left F3.F4 10.01 0.246 52 9.52 10.5
Control male Left F3.F4 9.93 0.246 52 9.43 10.4
low-SES male Left F3.F4 10.11 0.293 52 9.53 10.7
Control female Right F3.F4 9.52 0.302 52 8.91 10.1
low-SES female Right F3.F4 10.10 0.232 52 9.64 10.6
Control male Right F3.F4 9.97 0.232 52 9.50 10.4
low-SES male Right F3.F4 10.15 0.276 52 9.60 10.7
Control female Left F5.F6 9.64 0.330 52 8.97 10.3
low-SES female Left F5.F6 10.20 0.253 52 9.69 10.7
Control male Left F5.F6 10.03 0.253 52 9.53 10.5
low-SES male Left F5.F6 10.14 0.301 52 9.54 10.7
Control female Right F5.F6 9.68 0.314 52 9.05 10.3
low-SES female Right F5.F6 9.95 0.241 52 9.47 10.4
Control male Right F5.F6 9.98 0.241 52 9.50 10.5
low-SES male Right F5.F6 10.18 0.287 52 9.60 10.8
Control female Left F7.F8 9.69 0.313 52 9.06 10.3
low-SES female Left F7.F8 10.22 0.240 52 9.73 10.7
Control male Left F7.F8 10.12 0.240 52 9.63 10.6
low-SES male Left F7.F8 10.15 0.286 52 9.58 10.7
Control female Right F7.F8 9.74 0.309 52 9.12 10.4
low-SES female Right F7.F8 10.05 0.237 52 9.57 10.5
Control male Right F7.F8 10.06 0.237 52 9.59 10.5
low-SES male Right F7.F8 10.23 0.282 52 9.66 10.8
Control female Left FC1.FC2 9.47 0.316 52 8.83 10.1
low-SES female Left FC1.FC2 9.97 0.242 52 9.49 10.5
Control male Left FC1.FC2 9.90 0.242 52 9.42 10.4
low-SES male Left FC1.FC2 10.12 0.288 52 9.54 10.7
Control female Right FC1.FC2 9.49 0.304 52 8.88 10.1
low-SES female Right FC1.FC2 10.07 0.233 52 9.60 10.5
Control male Right FC1.FC2 9.88 0.233 52 9.41 10.3
low-SES male Right FC1.FC2 10.20 0.277 52 9.64 10.8
Confidence level used: 0.95
options(width = 100)
alpha_bwd_rep_anova = aov_ez("Subject", "Width", alpha_power_data, between = c("Group", "Sex"), within = c("hemisphere", "electrode_pair"))mytable <- xtabs(~ Group + Sex, data = alpha_bwd_rep_anova$data$long) / length(levels(alpha_bwd_rep_anova$data$long$electrode_pair)) / length(levels(alpha_bwd_rep_anova$data$long$hemisphere))
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 10 17 27
low-SES 17 12 29
Sum 27 29 56
alpha_bwd_afex_plot <-
afex_plot(
alpha_bwd_rep_anova,
x = "Group",
trace = "Sex",
panel = "hemisphere",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(alpha_bwd_afex_plot))Anova Table (Type 3 tests)
Response: Width
Effect df MSE F ges p.value
1 Group 1, 52 6.04 0.01 <.001 .921
2 Sex 1, 52 6.04 0.47 .006 .496
3 Group:Sex 1, 52 6.04 0.48 .006 .493
4 hemisphere 1, 52 0.33 1.45 .001 .234
5 Group:hemisphere 1, 52 0.33 0.25 <.001 .620
6 Sex:hemisphere 1, 52 0.33 0.07 <.001 .786
7 Group:Sex:hemisphere 1, 52 0.33 0.11 <.001 .737
8 electrode_pair 2.74, 142.29 0.75 22.31 *** .088 <.001
9 Group:electrode_pair 2.74, 142.29 0.75 0.87 .004 .451
10 Sex:electrode_pair 2.74, 142.29 0.75 1.36 .006 .257
11 Group:Sex:electrode_pair 2.74, 142.29 0.75 1.01 .004 .386
12 hemisphere:electrode_pair 4.56, 236.88 0.15 0.94 .001 .450
13 Group:hemisphere:electrode_pair 4.56, 236.88 0.15 0.87 .001 .496
14 Sex:hemisphere:electrode_pair 4.56, 236.88 0.15 1.03 .002 .399
15 Group:Sex:hemisphere:electrode_pair 4.56, 236.88 0.15 0.95 .001 .441
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
Group emmean SE df lower.CL upper.CL
Control 2.25 0.122 52 2.01 2.5
low-SES 2.27 0.116 52 2.04 2.5
Results are averaged over the levels of: Sex, electrode_pair, hemisphere
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female 2.32 0.122 52 2.07 2.56
male 2.20 0.116 52 1.97 2.44
Results are averaged over the levels of: Group, electrode_pair, hemisphere
Confidence level used: 0.95
Group Sex emmean SE df lower.CL upper.CL
Control female 2.25 0.194 52 1.86 2.64
low-SES female 2.39 0.149 52 2.09 2.68
Control male 2.25 0.149 52 1.95 2.55
low-SES male 2.15 0.177 52 1.80 2.51
Results are averaged over the levels of: electrode_pair, hemisphere
Confidence level used: 0.95
hemisphere emmean SE df lower.CL upper.CL
Left 2.24 0.0862 52 2.06 2.41
Right 2.28 0.0869 52 2.11 2.46
Results are averaged over the levels of: Group, Sex, electrode_pair
Confidence level used: 0.95
Group hemisphere emmean SE df lower.CL upper.CL
Control Left 2.22 0.125 52 1.97 2.47
low-SES Left 2.26 0.118 52 2.02 2.49
Control Right 2.29 0.126 52 2.03 2.54
low-SES Right 2.28 0.119 52 2.04 2.52
Results are averaged over the levels of: Sex, electrode_pair
Confidence level used: 0.95
Sex hemisphere emmean SE df lower.CL upper.CL
female Left 2.30 0.125 52 2.05 2.55
male Left 2.17 0.118 52 1.94 2.41
female Right 2.34 0.126 52 2.08 2.59
male Right 2.23 0.119 52 1.99 2.47
Results are averaged over the levels of: Group, electrode_pair
Confidence level used: 0.95
Group Sex hemisphere emmean SE df lower.CL upper.CL
Control female Left 2.22 0.199 52 1.82 2.62
low-SES female Left 2.38 0.152 52 2.08 2.69
Control male Left 2.22 0.152 52 1.91 2.53
low-SES male Left 2.13 0.181 52 1.76 2.49
Control female Right 2.29 0.200 52 1.88 2.69
low-SES female Right 2.39 0.154 52 2.08 2.70
Control male Right 2.29 0.154 52 1.98 2.59
low-SES male Right 2.18 0.183 52 1.81 2.55
Results are averaged over the levels of: electrode_pair
Confidence level used: 0.95
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 2.04 0.0791 52 1.88 2.20
AF3.AF4 2.18 0.0935 52 1.99 2.37
AF7.AF8 2.04 0.0666 52 1.91 2.18
F1.F2 2.58 0.1170 52 2.35 2.82
F3.F4 2.38 0.1190 52 2.14 2.62
F5.F6 2.15 0.0839 52 1.98 2.32
F7.F8 2.06 0.0731 52 1.91 2.21
FC1.FC2 2.65 0.1280 52 2.40 2.91
Results are averaged over the levels of: Group, Sex, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 -0.13921 0.0628 52 -2.216 0.3594
Fp1.Fp2 - AF7.AF8 -0.00426 0.0385 52 -0.111 1.0000
Fp1.Fp2 - F1.F2 -0.54291 0.0863 52 -6.289 <.0001
Fp1.Fp2 - F3.F4 -0.34192 0.0756 52 -4.521 0.0009
Fp1.Fp2 - F5.F6 -0.11099 0.0555 52 -1.999 0.4927
Fp1.Fp2 - F7.F8 -0.02021 0.0583 52 -0.347 1.0000
Fp1.Fp2 - FC1.FC2 -0.61625 0.0928 52 -6.644 <.0001
AF3.AF4 - AF7.AF8 0.13495 0.0707 52 1.910 0.5505
AF3.AF4 - F1.F2 -0.40370 0.0714 52 -5.657 <.0001
AF3.AF4 - F3.F4 -0.20270 0.0572 52 -3.544 0.0177
AF3.AF4 - F5.F6 0.02823 0.0732 52 0.386 0.9999
AF3.AF4 - F7.F8 0.11900 0.0779 52 1.527 0.7895
AF3.AF4 - FC1.FC2 -0.47703 0.0766 52 -6.224 <.0001
AF7.AF8 - F1.F2 -0.53865 0.0955 52 -5.641 <.0001
AF7.AF8 - F3.F4 -0.33766 0.0878 52 -3.848 0.0074
AF7.AF8 - F5.F6 -0.10673 0.0588 52 -1.814 0.6138
AF7.AF8 - F7.F8 -0.01595 0.0555 52 -0.288 1.0000
AF7.AF8 - FC1.FC2 -0.61199 0.1040 52 -5.880 <.0001
F1.F2 - F3.F4 0.20100 0.0605 52 3.321 0.0327
F1.F2 - F5.F6 0.43193 0.0849 52 5.088 0.0001
F1.F2 - F7.F8 0.52270 0.0926 52 5.644 <.0001
F1.F2 - FC1.FC2 -0.07333 0.0380 52 -1.928 0.5386
F3.F4 - F5.F6 0.23093 0.0719 52 3.213 0.0434
F3.F4 - F7.F8 0.32171 0.0852 52 3.775 0.0091
F3.F4 - FC1.FC2 -0.27433 0.0553 52 -4.957 0.0002
F5.F6 - F7.F8 0.09078 0.0386 52 2.353 0.2861
F5.F6 - FC1.FC2 -0.50526 0.0866 52 -5.832 <.0001
F7.F8 - FC1.FC2 -0.59604 0.1000 52 -5.948 <.0001
Results are averaged over the levels of: Group, Sex, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
Group electrode_pair emmean SE df lower.CL upper.CL
Control Fp1.Fp2 2.04 0.1150 52 1.81 2.27
low-SES Fp1.Fp2 2.03 0.1090 52 1.82 2.25
Control AF3.AF4 2.26 0.1360 52 1.99 2.54
low-SES AF3.AF4 2.09 0.1290 52 1.83 2.35
Control AF7.AF8 2.05 0.0968 52 1.85 2.24
low-SES AF7.AF8 2.04 0.0915 52 1.86 2.22
Control F1.F2 2.60 0.1710 52 2.26 2.94
low-SES F1.F2 2.56 0.1610 52 2.24 2.89
Control F3.F4 2.36 0.1720 52 2.02 2.71
low-SES F3.F4 2.40 0.1630 52 2.07 2.73
Control F5.F6 2.08 0.1220 52 1.83 2.32
low-SES F5.F6 2.22 0.1150 52 1.99 2.46
Control F7.F8 2.02 0.1060 52 1.80 2.23
low-SES F7.F8 2.10 0.1000 52 1.90 2.30
Control FC1.FC2 2.61 0.1860 52 2.24 2.98
low-SES FC1.FC2 2.70 0.1760 52 2.35 3.05
Results are averaged over the levels of: Sex, hemisphere
Confidence level used: 0.95
Sex electrode_pair emmean SE df lower.CL upper.CL
female Fp1.Fp2 2.05 0.1150 52 1.82 2.28
male Fp1.Fp2 2.03 0.1090 52 1.81 2.25
female AF3.AF4 2.23 0.1360 52 1.95 2.50
male AF3.AF4 2.13 0.1290 52 1.87 2.39
female AF7.AF8 2.07 0.0968 52 1.87 2.26
male AF7.AF8 2.02 0.0915 52 1.83 2.20
female F1.F2 2.68 0.1710 52 2.34 3.02
male F1.F2 2.48 0.1610 52 2.16 2.81
female F3.F4 2.50 0.1720 52 2.15 2.84
male F3.F4 2.26 0.1630 52 1.94 2.59
female F5.F6 2.18 0.1220 52 1.94 2.43
male F5.F6 2.12 0.1150 52 1.88 2.35
female F7.F8 2.03 0.1060 52 1.82 2.25
male F7.F8 2.09 0.1000 52 1.88 2.29
female FC1.FC2 2.81 0.1860 52 2.44 3.18
male FC1.FC2 2.50 0.1760 52 2.15 2.85
Results are averaged over the levels of: Group, hemisphere
Confidence level used: 0.95
Group Sex electrode_pair emmean SE df lower.CL upper.CL
Control female Fp1.Fp2 2.02 0.182 52 1.65 2.38
low-SES female Fp1.Fp2 2.08 0.140 52 1.80 2.36
Control male Fp1.Fp2 2.07 0.140 52 1.79 2.35
low-SES male Fp1.Fp2 1.99 0.167 52 1.66 2.32
Control female AF3.AF4 2.35 0.216 52 1.92 2.78
low-SES female AF3.AF4 2.10 0.165 52 1.77 2.44
Control male AF3.AF4 2.18 0.165 52 1.85 2.51
low-SES male AF3.AF4 2.08 0.197 52 1.68 2.47
Control female AF7.AF8 2.00 0.154 52 1.69 2.31
low-SES female AF7.AF8 2.14 0.118 52 1.90 2.37
Control male AF7.AF8 2.10 0.118 52 1.86 2.33
low-SES male AF7.AF8 1.94 0.140 52 1.66 2.22
Control female F1.F2 2.62 0.271 52 2.08 3.16
low-SES female F1.F2 2.74 0.208 52 2.32 3.16
Control male F1.F2 2.58 0.208 52 2.16 2.99
low-SES male F1.F2 2.39 0.247 52 1.89 2.89
Control female F3.F4 2.45 0.273 52 1.90 3.00
low-SES female F3.F4 2.54 0.210 52 2.12 2.97
Control male F3.F4 2.27 0.210 52 1.85 2.69
low-SES male F3.F4 2.25 0.250 52 1.75 2.76
Control female F5.F6 1.96 0.194 52 1.57 2.35
low-SES female F5.F6 2.40 0.148 52 2.11 2.70
Control male F5.F6 2.19 0.148 52 1.89 2.49
low-SES male F5.F6 2.04 0.177 52 1.69 2.40
Control female F7.F8 1.93 0.169 52 1.59 2.27
low-SES female F7.F8 2.13 0.129 52 1.87 2.39
Control male F7.F8 2.10 0.129 52 1.84 2.36
low-SES male F7.F8 2.07 0.154 52 1.76 2.38
Control female FC1.FC2 2.68 0.295 52 2.09 3.28
low-SES female FC1.FC2 2.94 0.226 52 2.48 3.39
Control male FC1.FC2 2.54 0.226 52 2.09 2.99
low-SES male FC1.FC2 2.46 0.269 52 1.92 3.00
Results are averaged over the levels of: hemisphere
Confidence level used: 0.95
hemisphere electrode_pair emmean SE df lower.CL upper.CL
Left Fp1.Fp2 2.02 0.0871 52 1.84 2.19
Right Fp1.Fp2 2.06 0.0826 52 1.89 2.23
Left AF3.AF4 2.19 0.1000 52 1.99 2.39
Right AF3.AF4 2.16 0.0937 52 1.98 2.35
Left AF7.AF8 2.02 0.0774 52 1.86 2.17
Right AF7.AF8 2.07 0.0748 52 1.92 2.22
Left F1.F2 2.59 0.1240 52 2.34 2.84
Right F1.F2 2.57 0.1240 52 2.32 2.82
Left F3.F4 2.36 0.1180 52 2.12 2.60
Right F3.F4 2.40 0.1250 52 2.15 2.65
Left F5.F6 2.07 0.0873 52 1.90 2.25
Right F5.F6 2.23 0.1020 52 2.02 2.43
Left F7.F8 2.01 0.0847 52 1.84 2.18
Right F7.F8 2.11 0.0827 52 1.94 2.27
Left FC1.FC2 2.64 0.1330 52 2.37 2.90
Right FC1.FC2 2.67 0.1300 52 2.41 2.93
Results are averaged over the levels of: Group, Sex
Confidence level used: 0.95
Group hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control Left Fp1.Fp2 1.99 0.126 52 1.74 2.24
low-SES Left Fp1.Fp2 2.04 0.120 52 1.80 2.28
Control Right Fp1.Fp2 2.10 0.120 52 1.86 2.34
low-SES Right Fp1.Fp2 2.02 0.113 52 1.80 2.25
Control Left AF3.AF4 2.27 0.146 52 1.98 2.57
low-SES Left AF3.AF4 2.11 0.138 52 1.83 2.39
Control Right AF3.AF4 2.25 0.136 52 1.98 2.53
low-SES Right AF3.AF4 2.07 0.129 52 1.82 2.33
Control Left AF7.AF8 1.98 0.113 52 1.76 2.21
low-SES Left AF7.AF8 2.05 0.106 52 1.83 2.26
Control Right AF7.AF8 2.11 0.109 52 1.89 2.33
low-SES Right AF7.AF8 2.03 0.103 52 1.82 2.24
Control Left F1.F2 2.61 0.180 52 2.25 2.97
low-SES Left F1.F2 2.57 0.170 52 2.23 2.91
Control Right F1.F2 2.58 0.180 52 2.22 2.94
low-SES Right F1.F2 2.56 0.170 52 2.22 2.90
Control Left F3.F4 2.30 0.172 52 1.95 2.64
low-SES Left F3.F4 2.42 0.163 52 2.09 2.75
Control Right F3.F4 2.43 0.181 52 2.06 2.79
low-SES Right F3.F4 2.38 0.171 52 2.04 2.72
Control Left F5.F6 1.97 0.127 52 1.72 2.23
low-SES Left F5.F6 2.17 0.120 52 1.93 2.41
Control Right F5.F6 2.18 0.148 52 1.88 2.48
low-SES Right F5.F6 2.28 0.140 52 2.00 2.56
Control Left F7.F8 1.99 0.123 52 1.74 2.23
low-SES Left F7.F8 2.04 0.116 52 1.81 2.27
Control Right F7.F8 2.05 0.120 52 1.81 2.29
low-SES Right F7.F8 2.16 0.114 52 1.94 2.39
Control Left FC1.FC2 2.63 0.193 52 2.25 3.02
low-SES Left FC1.FC2 2.64 0.182 52 2.28 3.01
Control Right FC1.FC2 2.59 0.189 52 2.21 2.97
low-SES Right FC1.FC2 2.75 0.179 52 2.40 3.11
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
female Left Fp1.Fp2 2.02 0.126 52 1.77 2.28
male Left Fp1.Fp2 2.01 0.120 52 1.77 2.25
female Right Fp1.Fp2 2.07 0.120 52 1.83 2.31
male Right Fp1.Fp2 2.05 0.113 52 1.82 2.28
female Left AF3.AF4 2.24 0.146 52 1.95 2.53
male Left AF3.AF4 2.14 0.138 52 1.87 2.42
female Right AF3.AF4 2.21 0.136 52 1.94 2.49
male Right AF3.AF4 2.11 0.129 52 1.86 2.37
female Left AF7.AF8 2.07 0.113 52 1.84 2.30
male Left AF7.AF8 1.96 0.106 52 1.75 2.17
female Right AF7.AF8 2.07 0.109 52 1.85 2.28
male Right AF7.AF8 2.07 0.103 52 1.87 2.28
female Left F1.F2 2.66 0.180 52 2.30 3.02
male Left F1.F2 2.52 0.170 52 2.18 2.87
female Right F1.F2 2.70 0.180 52 2.34 3.06
male Right F1.F2 2.44 0.170 52 2.10 2.78
female Left F3.F4 2.46 0.172 52 2.12 2.81
male Left F3.F4 2.25 0.163 52 1.93 2.58
female Right F3.F4 2.53 0.181 52 2.17 2.90
male Right F3.F4 2.27 0.171 52 1.93 2.62
female Left F5.F6 2.15 0.127 52 1.90 2.41
male Left F5.F6 1.99 0.120 52 1.75 2.23
female Right F5.F6 2.22 0.148 52 1.92 2.51
male Right F5.F6 2.24 0.140 52 1.96 2.52
female Left F7.F8 2.03 0.123 52 1.78 2.28
male Left F7.F8 2.00 0.116 52 1.76 2.23
female Right F7.F8 2.03 0.120 52 1.79 2.28
male Right F7.F8 2.18 0.114 52 1.95 2.40
female Left FC1.FC2 2.77 0.193 52 2.38 3.15
male Left FC1.FC2 2.51 0.182 52 2.14 2.88
female Right FC1.FC2 2.86 0.189 52 2.48 3.24
male Right FC1.FC2 2.49 0.179 52 2.13 2.85
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control female Left Fp1.Fp2 1.96 0.201 52 1.55 2.36
low-SES female Left Fp1.Fp2 2.09 0.154 52 1.78 2.40
Control male Left Fp1.Fp2 2.02 0.154 52 1.71 2.33
low-SES male Left Fp1.Fp2 2.00 0.183 52 1.63 2.37
Control female Right Fp1.Fp2 2.07 0.190 52 1.69 2.46
low-SES female Right Fp1.Fp2 2.07 0.146 52 1.77 2.36
Control male Right Fp1.Fp2 2.12 0.146 52 1.82 2.41
low-SES male Right Fp1.Fp2 1.98 0.174 52 1.63 2.33
Control female Left AF3.AF4 2.31 0.232 52 1.84 2.77
low-SES female Left AF3.AF4 2.17 0.178 52 1.81 2.53
Control male Left AF3.AF4 2.24 0.178 52 1.88 2.59
low-SES male Left AF3.AF4 2.05 0.212 52 1.63 2.47
Control female Right AF3.AF4 2.39 0.216 52 1.96 2.82
low-SES female Right AF3.AF4 2.04 0.166 52 1.71 2.37
Control male Right AF3.AF4 2.12 0.166 52 1.79 2.45
low-SES male Right AF3.AF4 2.11 0.197 52 1.71 2.50
Control female Left AF7.AF8 2.00 0.179 52 1.64 2.35
low-SES female Left AF7.AF8 2.14 0.137 52 1.87 2.42
Control male Left AF7.AF8 1.97 0.137 52 1.70 2.25
low-SES male Left AF7.AF8 1.95 0.163 52 1.62 2.28
Control female Right AF7.AF8 2.00 0.172 52 1.65 2.35
low-SES female Right AF7.AF8 2.13 0.132 52 1.87 2.40
Control male Right AF7.AF8 2.22 0.132 52 1.95 2.48
low-SES male Right AF7.AF8 1.93 0.157 52 1.61 2.24
Control female Left F1.F2 2.58 0.285 52 2.01 3.15
low-SES female Left F1.F2 2.73 0.219 52 2.29 3.17
Control male Left F1.F2 2.65 0.219 52 2.21 3.08
low-SES male Left F1.F2 2.40 0.260 52 1.88 2.93
Control female Right F1.F2 2.66 0.286 52 2.09 3.23
low-SES female Right F1.F2 2.75 0.219 52 2.31 3.18
Control male Right F1.F2 2.51 0.219 52 2.07 2.95
low-SES male Right F1.F2 2.37 0.261 52 1.85 2.90
Control female Left F3.F4 2.35 0.273 52 1.80 2.89
low-SES female Left F3.F4 2.58 0.209 52 2.16 3.00
Control male Left F3.F4 2.25 0.209 52 1.83 2.67
low-SES male Left F3.F4 2.26 0.249 52 1.76 2.76
Control female Right F3.F4 2.56 0.287 52 1.98 3.14
low-SES female Right F3.F4 2.51 0.220 52 2.07 2.95
Control male Right F3.F4 2.29 0.220 52 1.85 2.74
low-SES male Right F3.F4 2.25 0.262 52 1.72 2.78
Control female Left F5.F6 1.94 0.201 52 1.54 2.35
low-SES female Left F5.F6 2.36 0.154 52 2.05 2.67
Control male Left F5.F6 2.00 0.154 52 1.69 2.31
low-SES male Left F5.F6 1.98 0.184 52 1.61 2.35
Control female Right F5.F6 1.98 0.235 52 1.51 2.45
low-SES female Right F5.F6 2.45 0.180 52 2.09 2.81
Control male Right F5.F6 2.38 0.180 52 2.02 2.74
low-SES male Right F5.F6 2.11 0.214 52 1.68 2.54
Control female Left F7.F8 1.95 0.195 52 1.55 2.34
low-SES female Left F7.F8 2.11 0.150 52 1.81 2.41
Control male Left F7.F8 2.03 0.150 52 1.72 2.33
low-SES male Left F7.F8 1.97 0.178 52 1.61 2.32
Control female Right F7.F8 1.92 0.191 52 1.53 2.30
low-SES female Right F7.F8 2.15 0.146 52 1.86 2.45
Control male Right F7.F8 2.18 0.146 52 1.88 2.47
low-SES male Right F7.F8 2.18 0.174 52 1.83 2.52
Control female Left FC1.FC2 2.65 0.306 52 2.04 3.27
low-SES female Left FC1.FC2 2.88 0.234 52 2.41 3.35
Control male Left FC1.FC2 2.61 0.234 52 2.14 3.08
low-SES male Left FC1.FC2 2.41 0.279 52 1.85 2.97
Control female Right FC1.FC2 2.71 0.300 52 2.11 3.31
low-SES female Right FC1.FC2 3.00 0.230 52 2.54 3.46
Control male Right FC1.FC2 2.47 0.230 52 2.01 2.93
low-SES male Right FC1.FC2 2.51 0.274 52 1.96 3.06
Confidence level used: 0.95
options(width = 100)
aperiodic_offset_rep_anova = aov_ez("Subject", "Offset", alpha_power_data, between = c("Group", "Sex"), within = c("hemisphere", "electrode_pair"))
mytable <- xtabs(~ Group + Sex, data = aperiodic_offset_rep_anova$data$long) / length(levels(aperiodic_offset_rep_anova$data$long$electrode_pair)) / length(levels(aperiodic_offset_rep_anova$data$long$hemisphere))
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 19 20 39
low-SES 24 14 38
Sum 43 34 77
aperiodic_param_afex_plot <-
afex_plot(
aperiodic_offset_rep_anova,
x = "Group",
trace = "Sex",
panel = "hemisphere",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(aperiodic_param_afex_plot))Anova Table (Type 3 tests)
Response: Offset
Effect df MSE F ges p.value
1 Group 1, 73 2.35 2.64 .025 .109
2 Sex 1, 73 2.35 5.40 * .050 .023
3 Group:Sex 1, 73 2.35 1.08 .010 .301
4 hemisphere 1, 73 0.09 0.23 <.001 .632
5 Group:hemisphere 1, 73 0.09 1.42 <.001 .238
6 Sex:hemisphere 1, 73 0.09 0.15 <.001 .703
7 Group:Sex:hemisphere 1, 73 0.09 0.00 <.001 .981
8 electrode_pair 2.37, 172.65 0.29 33.95 *** .087 <.001
9 Group:electrode_pair 2.37, 172.65 0.29 0.25 <.001 .816
10 Sex:electrode_pair 2.37, 172.65 0.29 2.71 + .007 .060
11 Group:Sex:electrode_pair 2.37, 172.65 0.29 0.43 .001 .688
12 hemisphere:electrode_pair 4.75, 346.40 0.04 0.77 <.001 .568
13 Group:hemisphere:electrode_pair 4.75, 346.40 0.04 1.02 <.001 .406
14 Sex:hemisphere:electrode_pair 4.75, 346.40 0.04 1.82 .001 .112
15 Group:Sex:hemisphere:electrode_pair 4.75, 346.40 0.04 1.40 .001 .225
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
Group emmean SE df lower.CL upper.CL
Control 1.091 0.0614 73 0.969 1.21
low-SES 0.946 0.0644 73 0.818 1.07
Results are averaged over the levels of: Sex, electrode_pair, hemisphere
Confidence level used: 0.95
________________________________________________________________________________
$emmeans
Sex emmean SE df lower.CL upper.CL
female 0.915 0.0588 73 0.798 1.03
male 1.122 0.0668 73 0.989 1.25
Results are averaged over the levels of: Group, electrode_pair, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
female - male -0.207 0.089 73 -2.323 0.0230
Results are averaged over the levels of: Group, electrode_pair, hemisphere
Group Sex emmean SE df lower.CL upper.CL
Control female 1.034 0.0879 73 0.859 1.209
low-SES female 0.797 0.0782 73 0.641 0.953
Control male 1.148 0.0857 73 0.977 1.319
low-SES male 1.096 0.1020 73 0.892 1.300
Results are averaged over the levels of: electrode_pair, hemisphere
Confidence level used: 0.95
hemisphere emmean SE df lower.CL upper.CL
Left 1.02 0.0465 73 0.930 1.12
Right 1.01 0.0442 73 0.926 1.10
Results are averaged over the levels of: Group, Sex, electrode_pair
Confidence level used: 0.95
Group hemisphere emmean SE df lower.CL upper.CL
Control Left 1.106 0.0642 73 0.978 1.23
low-SES Left 0.940 0.0673 73 0.806 1.07
Control Right 1.076 0.0610 73 0.955 1.20
low-SES Right 0.953 0.0640 73 0.825 1.08
Results are averaged over the levels of: Sex, electrode_pair
Confidence level used: 0.95
Sex hemisphere emmean SE df lower.CL upper.CL
female Left 0.916 0.0615 73 0.794 1.04
male Left 1.130 0.0698 73 0.991 1.27
female Right 0.914 0.0584 73 0.798 1.03
male Right 1.114 0.0663 73 0.982 1.25
Results are averaged over the levels of: Group, electrode_pair
Confidence level used: 0.95
Group Sex hemisphere emmean SE df lower.CL upper.CL
Control female Left 1.045 0.0919 73 0.862 1.229
low-SES female Left 0.787 0.0818 73 0.624 0.950
Control male Left 1.166 0.0896 73 0.987 1.344
low-SES male Left 1.093 0.1070 73 0.880 1.307
Control female Right 1.022 0.0873 73 0.848 1.196
low-SES female Right 0.807 0.0777 73 0.652 0.961
Control male Right 1.130 0.0851 73 0.960 1.300
low-SES male Right 1.099 0.1020 73 0.896 1.301
Results are averaged over the levels of: electrode_pair
Confidence level used: 0.95
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 1.212 0.0625 73 1.087 1.337
AF3.AF4 1.127 0.0581 73 1.012 1.243
AF7.AF8 1.113 0.0526 73 1.008 1.217
F1.F2 1.065 0.0432 73 0.979 1.151
F3.F4 0.845 0.0469 73 0.751 0.938
F5.F6 0.775 0.0454 73 0.684 0.865
F7.F8 0.960 0.0456 73 0.870 1.051
FC1.FC2 1.052 0.0460 73 0.961 1.144
Results are averaged over the levels of: Group, Sex, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 0.0847 0.0176 73 4.814 0.0002
Fp1.Fp2 - AF7.AF8 0.0995 0.0315 73 3.156 0.0455
Fp1.Fp2 - F1.F2 0.1474 0.0471 73 3.128 0.0490
Fp1.Fp2 - F3.F4 0.3672 0.0499 73 7.355 <.0001
Fp1.Fp2 - F5.F6 0.4373 0.0463 73 9.450 <.0001
Fp1.Fp2 - F7.F8 0.2518 0.0419 73 6.004 <.0001
Fp1.Fp2 - FC1.FC2 0.1598 0.0548 73 2.915 0.0844
AF3.AF4 - AF7.AF8 0.0148 0.0303 73 0.488 0.9997
AF3.AF4 - F1.F2 0.0627 0.0395 73 1.588 0.7558
AF3.AF4 - F3.F4 0.2825 0.0413 73 6.836 <.0001
AF3.AF4 - F5.F6 0.3526 0.0390 73 9.031 <.0001
AF3.AF4 - F7.F8 0.1671 0.0377 73 4.435 0.0008
AF3.AF4 - FC1.FC2 0.0751 0.0473 73 1.590 0.7547
AF7.AF8 - F1.F2 0.0479 0.0405 73 1.183 0.9344
AF7.AF8 - F3.F4 0.2677 0.0402 73 6.661 <.0001
AF7.AF8 - F5.F6 0.3378 0.0321 73 10.534 <.0001
AF7.AF8 - F7.F8 0.1523 0.0258 73 5.911 <.0001
AF7.AF8 - FC1.FC2 0.0603 0.0467 73 1.291 0.8993
F1.F2 - F3.F4 0.2199 0.0182 73 12.083 <.0001
F1.F2 - F5.F6 0.2899 0.0253 73 11.477 <.0001
F1.F2 - F7.F8 0.1044 0.0316 73 3.301 0.0306
F1.F2 - FC1.FC2 0.0125 0.0146 73 0.851 0.9893
F3.F4 - F5.F6 0.0701 0.0203 73 3.459 0.0194
F3.F4 - F7.F8 -0.1155 0.0321 73 -3.595 0.0130
F3.F4 - FC1.FC2 -0.2074 0.0238 73 -8.700 <.0001
F5.F6 - F7.F8 -0.1855 0.0223 73 -8.317 <.0001
F5.F6 - FC1.FC2 -0.2775 0.0305 73 -9.093 <.0001
F7.F8 - FC1.FC2 -0.0919 0.0367 73 -2.507 0.2089
Results are averaged over the levels of: Group, Sex, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
Group electrode_pair emmean SE df lower.CL upper.CL
Control Fp1.Fp2 1.296 0.0863 73 1.124 1.468
low-SES Fp1.Fp2 1.128 0.0906 73 0.947 1.308
Control AF3.AF4 1.205 0.0801 73 1.045 1.365
low-SES AF3.AF4 1.050 0.0841 73 0.882 1.218
Control AF7.AF8 1.193 0.0726 73 1.048 1.338
low-SES AF7.AF8 1.032 0.0762 73 0.880 1.184
Control F1.F2 1.135 0.0596 73 1.016 1.254
low-SES F1.F2 0.995 0.0626 73 0.870 1.119
Control F3.F4 0.916 0.0647 73 0.787 1.045
low-SES F3.F4 0.774 0.0680 73 0.638 0.909
Control F5.F6 0.826 0.0627 73 0.701 0.951
low-SES F5.F6 0.723 0.0658 73 0.592 0.854
Control F7.F8 1.047 0.0628 73 0.922 1.172
low-SES F7.F8 0.874 0.0660 73 0.742 1.005
Control FC1.FC2 1.109 0.0635 73 0.982 1.235
low-SES FC1.FC2 0.996 0.0666 73 0.863 1.129
Results are averaged over the levels of: Sex, hemisphere
Confidence level used: 0.95
Sex electrode_pair emmean SE df lower.CL upper.CL
female Fp1.Fp2 1.125 0.0827 73 0.960 1.290
male Fp1.Fp2 1.299 0.0938 73 1.112 1.486
female AF3.AF4 1.031 0.0768 73 0.878 1.184
male AF3.AF4 1.224 0.0871 73 1.050 1.397
female AF7.AF8 1.027 0.0696 73 0.888 1.166
male AF7.AF8 1.198 0.0790 73 1.041 1.355
female F1.F2 0.918 0.0571 73 0.804 1.032
male F1.F2 1.212 0.0648 73 1.082 1.341
female F3.F4 0.721 0.0621 73 0.597 0.845
male F3.F4 0.969 0.0704 73 0.828 1.109
female F5.F6 0.698 0.0601 73 0.578 0.818
male F5.F6 0.852 0.0682 73 0.716 0.988
female F7.F8 0.921 0.0602 73 0.801 1.041
male F7.F8 0.999 0.0684 73 0.863 1.136
female FC1.FC2 0.882 0.0608 73 0.760 1.003
male FC1.FC2 1.223 0.0690 73 1.085 1.360
Results are averaged over the levels of: Group, hemisphere
Confidence level used: 0.95
Group Sex electrode_pair emmean SE df lower.CL upper.CL
Control female Fp1.Fp2 1.221 0.1240 73 0.974 1.467
low-SES female Fp1.Fp2 1.029 0.1100 73 0.810 1.248
Control male Fp1.Fp2 1.372 0.1200 73 1.132 1.612
low-SES male Fp1.Fp2 1.227 0.1440 73 0.940 1.514
Control female AF3.AF4 1.156 0.1150 73 0.927 1.385
low-SES female AF3.AF4 0.906 0.1020 73 0.702 1.109
Control male AF3.AF4 1.254 0.1120 73 1.031 1.476
low-SES male AF3.AF4 1.194 0.1340 73 0.928 1.460
Control female AF7.AF8 1.164 0.1040 73 0.957 1.371
low-SES female AF7.AF8 0.890 0.0925 73 0.706 1.074
Control male AF7.AF8 1.222 0.1010 73 1.020 1.424
low-SES male AF7.AF8 1.174 0.1210 73 0.933 1.415
Control female F1.F2 1.027 0.0854 73 0.856 1.197
low-SES female F1.F2 0.809 0.0759 73 0.658 0.960
Control male F1.F2 1.243 0.0832 73 1.077 1.409
low-SES male F1.F2 1.180 0.0994 73 0.982 1.378
Control female F3.F4 0.844 0.0927 73 0.659 1.029
low-SES female F3.F4 0.598 0.0825 73 0.433 0.762
Control male F3.F4 0.988 0.0904 73 0.808 1.168
low-SES male F3.F4 0.950 0.1080 73 0.735 1.165
Control female F5.F6 0.789 0.0898 73 0.610 0.968
low-SES female F5.F6 0.606 0.0799 73 0.447 0.765
Control male F5.F6 0.863 0.0875 73 0.689 1.038
low-SES male F5.F6 0.840 0.1050 73 0.632 1.049
Control female F7.F8 1.068 0.0900 73 0.889 1.248
low-SES female F7.F8 0.774 0.0801 73 0.615 0.934
Control male F7.F8 1.026 0.0877 73 0.851 1.200
low-SES male F7.F8 0.973 0.1050 73 0.764 1.182
Control female FC1.FC2 1.001 0.0909 73 0.820 1.183
low-SES female FC1.FC2 0.762 0.0809 73 0.601 0.923
Control male FC1.FC2 1.216 0.0886 73 1.039 1.392
low-SES male FC1.FC2 1.230 0.1060 73 1.019 1.441
Results are averaged over the levels of: hemisphere
Confidence level used: 0.95
hemisphere electrode_pair emmean SE df lower.CL upper.CL
Left Fp1.Fp2 1.225 0.0626 73 1.100 1.349
Right Fp1.Fp2 1.199 0.0670 73 1.066 1.333
Left AF3.AF4 1.124 0.0607 73 1.003 1.245
Right AF3.AF4 1.130 0.0609 73 1.009 1.252
Left AF7.AF8 1.127 0.0555 73 1.016 1.238
Right AF7.AF8 1.098 0.0574 73 0.984 1.213
Left F1.F2 1.052 0.0461 73 0.960 1.144
Right F1.F2 1.077 0.0419 73 0.994 1.161
Left F3.F4 0.844 0.0512 73 0.742 0.946
Right F3.F4 0.846 0.0462 73 0.754 0.938
Left F5.F6 0.799 0.0495 73 0.701 0.898
Right F5.F6 0.750 0.0454 73 0.660 0.841
Left F7.F8 0.960 0.0492 73 0.862 1.058
Right F7.F8 0.960 0.0485 73 0.864 1.057
Left FC1.FC2 1.051 0.0483 73 0.955 1.148
Right FC1.FC2 1.053 0.0470 73 0.960 1.147
Results are averaged over the levels of: Group, Sex
Confidence level used: 0.95
Group hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control Left Fp1.Fp2 1.310 0.0863 73 1.138 1.482
low-SES Left Fp1.Fp2 1.140 0.0906 73 0.959 1.320
Control Right Fp1.Fp2 1.283 0.0924 73 1.099 1.467
low-SES Right Fp1.Fp2 1.116 0.0970 73 0.923 1.310
Control Left AF3.AF4 1.213 0.0838 73 1.046 1.380
low-SES Left AF3.AF4 1.036 0.0879 73 0.861 1.211
Control Right AF3.AF4 1.197 0.0839 73 1.029 1.364
low-SES Right AF3.AF4 1.064 0.0881 73 0.889 1.240
Control Left AF7.AF8 1.248 0.0766 73 1.095 1.400
low-SES Left AF7.AF8 1.006 0.0804 73 0.846 1.166
Control Right AF7.AF8 1.139 0.0791 73 0.981 1.296
low-SES Right AF7.AF8 1.058 0.0831 73 0.892 1.223
Control Left F1.F2 1.131 0.0635 73 1.005 1.258
low-SES Left F1.F2 0.973 0.0667 73 0.840 1.106
Control Right F1.F2 1.139 0.0577 73 1.024 1.254
low-SES Right F1.F2 1.016 0.0606 73 0.895 1.137
Control Left F3.F4 0.933 0.0706 73 0.792 1.074
low-SES Left F3.F4 0.755 0.0741 73 0.607 0.902
Control Right F3.F4 0.899 0.0637 73 0.772 1.026
low-SES Right F3.F4 0.793 0.0669 73 0.660 0.926
Control Left F5.F6 0.853 0.0683 73 0.717 0.990
low-SES Left F5.F6 0.745 0.0717 73 0.602 0.888
Control Right F5.F6 0.799 0.0626 73 0.675 0.924
low-SES Right F5.F6 0.701 0.0658 73 0.570 0.832
Control Left F7.F8 1.054 0.0678 73 0.919 1.189
low-SES Left F7.F8 0.867 0.0712 73 0.725 1.009
Control Right F7.F8 1.040 0.0669 73 0.907 1.173
low-SES Right F7.F8 0.880 0.0702 73 0.741 1.020
Control Left FC1.FC2 1.104 0.0666 73 0.971 1.237
low-SES Left FC1.FC2 0.999 0.0699 73 0.860 1.138
Control Right FC1.FC2 1.113 0.0648 73 0.984 1.242
low-SES Right FC1.FC2 0.993 0.0680 73 0.857 1.128
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
female Left Fp1.Fp2 1.119 0.0827 73 0.954 1.283
male Left Fp1.Fp2 1.331 0.0939 73 1.144 1.518
female Right Fp1.Fp2 1.131 0.0886 73 0.954 1.308
male Right Fp1.Fp2 1.268 0.1010 73 1.067 1.468
female Left AF3.AF4 1.010 0.0803 73 0.850 1.170
male Left AF3.AF4 1.239 0.0911 73 1.058 1.421
female Right AF3.AF4 1.052 0.0805 73 0.892 1.213
male Right AF3.AF4 1.208 0.0913 73 1.026 1.390
female Left AF7.AF8 1.065 0.0734 73 0.919 1.211
male Left AF7.AF8 1.189 0.0833 73 1.023 1.355
female Right AF7.AF8 0.989 0.0758 73 0.838 1.140
male Right AF7.AF8 1.207 0.0861 73 1.036 1.379
female Left F1.F2 0.901 0.0609 73 0.780 1.023
male Left F1.F2 1.203 0.0691 73 1.065 1.341
female Right F1.F2 0.934 0.0553 73 0.824 1.045
male Right F1.F2 1.220 0.0628 73 1.095 1.345
female Left F3.F4 0.716 0.0677 73 0.581 0.851
male Left F3.F4 0.971 0.0768 73 0.818 1.125
female Right F3.F4 0.726 0.0611 73 0.604 0.847
male Right F3.F4 0.966 0.0693 73 0.828 1.104
female Left F5.F6 0.719 0.0655 73 0.588 0.849
male Left F5.F6 0.880 0.0743 73 0.732 1.028
female Right F5.F6 0.677 0.0600 73 0.557 0.797
male Right F5.F6 0.823 0.0681 73 0.688 0.959
female Left F7.F8 0.945 0.0650 73 0.815 1.074
male Left F7.F8 0.976 0.0738 73 0.829 1.123
female Right F7.F8 0.898 0.0641 73 0.770 1.026
male Right F7.F8 1.022 0.0727 73 0.877 1.167
female Left FC1.FC2 0.856 0.0638 73 0.729 0.983
male Left FC1.FC2 1.247 0.0725 73 1.102 1.391
female Right FC1.FC2 0.907 0.0621 73 0.784 1.031
male Right FC1.FC2 1.199 0.0705 73 1.058 1.339
Results are averaged over the levels of: Group
Confidence level used: 0.95
Group Sex hemisphere electrode_pair emmean SE df lower.CL upper.CL
Control female Left Fp1.Fp2 1.210 0.1240 73 0.964 1.457
low-SES female Left Fp1.Fp2 1.027 0.1100 73 0.808 1.246
Control male Left Fp1.Fp2 1.409 0.1200 73 1.169 1.649
low-SES male Left Fp1.Fp2 1.253 0.1440 73 0.966 1.540
Control female Right Fp1.Fp2 1.231 0.1320 73 0.967 1.495
low-SES female Right Fp1.Fp2 1.031 0.1180 73 0.796 1.266
Control male Right Fp1.Fp2 1.335 0.1290 73 1.077 1.592
low-SES male Right Fp1.Fp2 1.201 0.1540 73 0.894 1.508
Control female Left AF3.AF4 1.158 0.1200 73 0.919 1.397
low-SES female Left AF3.AF4 0.861 0.1070 73 0.649 1.074
Control male Left AF3.AF4 1.268 0.1170 73 1.035 1.501
low-SES male Left AF3.AF4 1.210 0.1400 73 0.932 1.489
Control female Right AF3.AF4 1.155 0.1200 73 0.915 1.394
low-SES female Right AF3.AF4 0.950 0.1070 73 0.737 1.164
Control male Right AF3.AF4 1.239 0.1170 73 1.005 1.472
low-SES male Right AF3.AF4 1.178 0.1400 73 0.899 1.457
Control female Left AF7.AF8 1.247 0.1100 73 1.028 1.466
low-SES female Left AF7.AF8 0.883 0.0976 73 0.688 1.077
Control male Left AF7.AF8 1.248 0.1070 73 1.035 1.461
low-SES male Left AF7.AF8 1.130 0.1280 73 0.875 1.384
Control female Right AF7.AF8 1.081 0.1130 73 0.855 1.307
low-SES female Right AF7.AF8 0.897 0.1010 73 0.696 1.098
Control male Right AF7.AF8 1.196 0.1100 73 0.976 1.416
low-SES male Right AF7.AF8 1.218 0.1320 73 0.955 1.481
Control female Left F1.F2 1.026 0.0910 73 0.845 1.208
low-SES female Left F1.F2 0.776 0.0810 73 0.615 0.937
Control male Left F1.F2 1.236 0.0887 73 1.059 1.413
low-SES male Left F1.F2 1.170 0.1060 73 0.959 1.382
Control female Right F1.F2 1.027 0.0827 73 0.862 1.192
low-SES female Right F1.F2 0.842 0.0736 73 0.695 0.988
Control male Right F1.F2 1.250 0.0806 73 1.090 1.411
low-SES male Right F1.F2 1.190 0.0963 73 0.998 1.382
Control female Left F3.F4 0.856 0.1010 73 0.655 1.058
low-SES female Left F3.F4 0.576 0.0900 73 0.397 0.755
Control male Left F3.F4 1.010 0.0985 73 0.813 1.206
low-SES male Left F3.F4 0.933 0.1180 73 0.699 1.168
Control female Right F3.F4 0.832 0.0912 73 0.650 1.014
low-SES female Right F3.F4 0.619 0.0812 73 0.457 0.781
Control male Right F3.F4 0.966 0.0889 73 0.788 1.143
low-SES male Right F3.F4 0.967 0.1060 73 0.755 1.178
Control female Left F5.F6 0.818 0.0978 73 0.623 1.013
low-SES female Left F5.F6 0.619 0.0871 73 0.446 0.793
Control male Left F5.F6 0.889 0.0954 73 0.699 1.079
low-SES male Left F5.F6 0.871 0.1140 73 0.644 1.099
Control female Right F5.F6 0.761 0.0897 73 0.582 0.940
low-SES female Right F5.F6 0.593 0.0798 73 0.434 0.752
Control male Right F5.F6 0.838 0.0874 73 0.664 1.012
low-SES male Right F5.F6 0.809 0.1050 73 0.601 1.017
Control female Left F7.F8 1.062 0.0971 73 0.868 1.256
low-SES female Left F7.F8 0.827 0.0864 73 0.655 0.999
Control male Left F7.F8 1.046 0.0947 73 0.857 1.234
low-SES male Left F7.F8 0.907 0.1130 73 0.681 1.132
Control female Right F7.F8 1.075 0.0958 73 0.884 1.266
low-SES female Right F7.F8 0.721 0.0852 73 0.551 0.891
Control male Right F7.F8 1.005 0.0934 73 0.819 1.191
low-SES male Right F7.F8 1.040 0.1120 73 0.817 1.262
Control female Left FC1.FC2 0.986 0.0954 73 0.796 1.177
low-SES female Left FC1.FC2 0.725 0.0849 73 0.556 0.895
Control male Left FC1.FC2 1.221 0.0930 73 1.036 1.407
low-SES male Left FC1.FC2 1.272 0.1110 73 1.051 1.494
Control female Right FC1.FC2 1.016 0.0928 73 0.832 1.201
low-SES female Right FC1.FC2 0.798 0.0825 73 0.634 0.963
Control male Right FC1.FC2 1.210 0.0904 73 1.030 1.390
low-SES male Right FC1.FC2 1.187 0.1080 73 0.972 1.403
Confidence level used: 0.95
options(width = 100)
aperiodic_slope_rep_anova = aov_ez("Subject", "Slope", alpha_power_data, between = c("Group", "Sex"), within = c("hemisphere", "electrode_pair"))
mytable <- xtabs(~ Group + Sex, data = aperiodic_slope_rep_anova$data$long) / length(levels(aperiodic_slope_rep_anova$data$long$electrode_pair)) / length(levels(aperiodic_slope_rep_anova$data$long$hemisphere))
ftable(addmargins(mytable)) Sex female male Sum
Group
Control 19 20 39
low-SES 24 14 38
Sum 43 34 77
aperiodic_param_afex_plot <-
afex_plot(
aperiodic_slope_rep_anova,
x = "Group",
trace = "Sex",
panel = "hemisphere",
error = "between",
error_arg = list(width = .1),
dodge = .3,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
jitter.height = .1,
dodge.width = .3 ## needs to be same as dodge
)),
mapping = c("color"),
point_arg = list(size = 4)
)
suppressWarnings(print(aperiodic_param_afex_plot))Anova Table (Type 3 tests)
Response: Slope
Effect df MSE F ges p.value
1 Group 1, 73 1.70 5.43 * .054 .023
2 Sex 1, 73 1.70 9.19 ** .088 .003
3 Group:Sex 1, 73 1.70 0.32 .003 .574
4 hemisphere 1, 73 0.05 2.75 <.001 .102
5 Group:hemisphere 1, 73 0.05 0.00 <.001 .968
6 Sex:hemisphere 1, 73 0.05 0.37 <.001 .543
7 Group:Sex:hemisphere 1, 73 0.05 0.19 <.001 .664
8 electrode_pair 3.36, 245.05 0.11 56.12 *** .110 <.001
9 Group:electrode_pair 3.36, 245.05 0.11 0.23 <.001 .892
10 Sex:electrode_pair 3.36, 245.05 0.11 2.55 * .006 .049
11 Group:Sex:electrode_pair 3.36, 245.05 0.11 0.87 .002 .467
12 hemisphere:electrode_pair 4.92, 359.10 0.02 2.48 * .002 .033
13 Group:hemisphere:electrode_pair 4.92, 359.10 0.02 0.60 <.001 .698
14 Sex:hemisphere:electrode_pair 4.92, 359.10 0.02 1.00 <.001 .419
15 Group:Sex:hemisphere:electrode_pair 4.92, 359.10 0.02 0.81 <.001 .543
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
$emmeans
Group emmean SE df lower.CL upper.CL
Control 1.18 0.0522 73 1.077 1.28
low-SES 1.00 0.0547 73 0.896 1.11
Results are averaged over the levels of: Sex, electrode_pair, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Control - (low-SES) 0.176 0.0756 73 2.330 0.0226
Results are averaged over the levels of: Sex, electrode_pair, hemisphere
________________________________________________________________________________
$emmeans
Sex emmean SE df lower.CL upper.CL
female 0.978 0.0500 73 0.879 1.08
male 1.207 0.0567 73 1.094 1.32
Results are averaged over the levels of: Group, electrode_pair, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
female - male -0.229 0.0756 73 -3.032 0.0034
Results are averaged over the levels of: Group, electrode_pair, hemisphere
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 1.112 0.0467 73 1.019 1.205
AF3.AF4 1.098 0.0475 73 1.004 1.193
AF7.AF8 1.020 0.0368 73 0.947 1.094
F1.F2 1.273 0.0395 73 1.194 1.352
F3.F4 1.024 0.0431 73 0.938 1.110
F5.F6 0.915 0.0404 73 0.834 0.996
F7.F8 0.987 0.0364 73 0.914 1.059
FC1.FC2 1.313 0.0405 73 1.232 1.393
Results are averaged over the levels of: Group, Sex, hemisphere
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 0.01347 0.0149 73 0.906 0.9846
Fp1.Fp2 - AF7.AF8 0.09137 0.0244 73 3.745 0.0082
Fp1.Fp2 - F1.F2 -0.16110 0.0301 73 -5.348 <.0001
Fp1.Fp2 - F3.F4 0.08735 0.0321 73 2.723 0.1324
Fp1.Fp2 - F5.F6 0.19673 0.0310 73 6.353 <.0001
Fp1.Fp2 - F7.F8 0.12508 0.0282 73 4.438 0.0008
Fp1.Fp2 - FC1.FC2 -0.20073 0.0359 73 -5.594 <.0001
AF3.AF4 - AF7.AF8 0.07790 0.0245 73 3.174 0.0434
AF3.AF4 - F1.F2 -0.17456 0.0292 73 -5.987 <.0001
AF3.AF4 - F3.F4 0.07389 0.0308 73 2.395 0.2593
AF3.AF4 - F5.F6 0.18326 0.0303 73 6.058 <.0001
AF3.AF4 - F7.F8 0.11162 0.0288 73 3.871 0.0055
AF3.AF4 - FC1.FC2 -0.21419 0.0343 73 -6.253 <.0001
AF7.AF8 - F1.F2 -0.25246 0.0274 73 -9.213 <.0001
AF7.AF8 - F3.F4 -0.00401 0.0269 73 -0.149 1.0000
AF7.AF8 - F5.F6 0.10536 0.0220 73 4.794 0.0002
AF7.AF8 - F7.F8 0.03372 0.0182 73 1.855 0.5857
AF7.AF8 - FC1.FC2 -0.29209 0.0305 73 -9.591 <.0001
F1.F2 - F3.F4 0.24845 0.0197 73 12.585 <.0001
F1.F2 - F5.F6 0.35782 0.0235 73 15.247 <.0001
F1.F2 - F7.F8 0.28618 0.0225 73 12.699 <.0001
F1.F2 - FC1.FC2 -0.03963 0.0108 73 -3.683 0.0099
F3.F4 - F5.F6 0.10937 0.0212 73 5.151 0.0001
F3.F4 - F7.F8 0.03773 0.0246 73 1.535 0.7862
F3.F4 - FC1.FC2 -0.28808 0.0236 73 -12.225 <.0001
F5.F6 - F7.F8 -0.07164 0.0168 73 -4.262 0.0015
F5.F6 - FC1.FC2 -0.39746 0.0255 73 -15.588 <.0001
F7.F8 - FC1.FC2 -0.32581 0.0254 73 -12.842 <.0001
Results are averaged over the levels of: Group, Sex, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
________________________________________________________________________________
$emmeans
Sex = female:
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.962 0.0617 73 0.839 1.085
AF3.AF4 0.936 0.0629 73 0.811 1.062
AF7.AF8 0.913 0.0486 73 0.816 1.010
F1.F2 1.154 0.0523 73 1.050 1.258
F3.F4 0.916 0.0570 73 0.803 1.030
F5.F6 0.834 0.0535 73 0.728 0.941
F7.F8 0.908 0.0482 73 0.812 1.004
FC1.FC2 1.201 0.0536 73 1.094 1.308
Sex = male:
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 1.262 0.0700 73 1.122 1.402
AF3.AF4 1.260 0.0713 73 1.118 1.403
AF7.AF8 1.128 0.0552 73 1.018 1.238
F1.F2 1.392 0.0593 73 1.273 1.510
F3.F4 1.132 0.0647 73 1.003 1.261
F5.F6 0.996 0.0607 73 0.875 1.117
F7.F8 1.065 0.0547 73 0.956 1.174
FC1.FC2 1.424 0.0608 73 1.303 1.545
Results are averaged over the levels of: Group, hemisphere
Confidence level used: 0.95
$contrasts
Sex = female:
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 0.02540 0.0196 73 1.293 0.8987
Fp1.Fp2 - AF7.AF8 0.04855 0.0323 73 1.505 0.8022
Fp1.Fp2 - F1.F2 -0.19257 0.0398 73 -4.835 0.0002
Fp1.Fp2 - F3.F4 0.04520 0.0424 73 1.065 0.9619
Fp1.Fp2 - F5.F6 0.12741 0.0409 73 3.111 0.0512
Fp1.Fp2 - F7.F8 0.05335 0.0373 73 1.432 0.8396
Fp1.Fp2 - FC1.FC2 -0.23939 0.0474 73 -5.045 0.0001
AF3.AF4 - AF7.AF8 0.02315 0.0325 73 0.713 0.9963
AF3.AF4 - F1.F2 -0.21797 0.0386 73 -5.654 <.0001
AF3.AF4 - F3.F4 0.01980 0.0408 73 0.485 0.9997
AF3.AF4 - F5.F6 0.10200 0.0400 73 2.550 0.1917
AF3.AF4 - F7.F8 0.02795 0.0381 73 0.733 0.9957
AF3.AF4 - FC1.FC2 -0.26479 0.0453 73 -5.845 <.0001
AF7.AF8 - F1.F2 -0.24112 0.0362 73 -6.654 <.0001
AF7.AF8 - F3.F4 -0.00336 0.0355 73 -0.094 1.0000
AF7.AF8 - F5.F6 0.07885 0.0291 73 2.714 0.1351
AF7.AF8 - F7.F8 0.00480 0.0240 73 0.200 1.0000
AF7.AF8 - FC1.FC2 -0.28794 0.0403 73 -7.150 <.0001
F1.F2 - F3.F4 0.23777 0.0261 73 9.108 <.0001
F1.F2 - F5.F6 0.31997 0.0310 73 10.311 <.0001
F1.F2 - F7.F8 0.24592 0.0298 73 8.253 <.0001
F1.F2 - FC1.FC2 -0.04682 0.0142 73 -3.290 0.0315
F3.F4 - F5.F6 0.08221 0.0281 73 2.928 0.0817
F3.F4 - F7.F8 0.00816 0.0325 73 0.251 1.0000
F3.F4 - FC1.FC2 -0.28458 0.0312 73 -9.133 <.0001
F5.F6 - F7.F8 -0.07405 0.0222 73 -3.332 0.0281
F5.F6 - FC1.FC2 -0.36679 0.0337 73 -10.879 <.0001
F7.F8 - FC1.FC2 -0.29274 0.0335 73 -8.726 <.0001
Sex = male:
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 0.00153 0.0223 73 0.069 1.0000
Fp1.Fp2 - AF7.AF8 0.13418 0.0366 73 3.665 0.0105
Fp1.Fp2 - F1.F2 -0.12962 0.0452 73 -2.868 0.0945
Fp1.Fp2 - F3.F4 0.12951 0.0481 73 2.690 0.1423
Fp1.Fp2 - F5.F6 0.26605 0.0465 73 5.726 <.0001
Fp1.Fp2 - F7.F8 0.19681 0.0423 73 4.654 0.0004
Fp1.Fp2 - FC1.FC2 -0.16207 0.0538 73 -3.010 0.0665
AF3.AF4 - AF7.AF8 0.13265 0.0368 73 3.602 0.0127
AF3.AF4 - F1.F2 -0.13115 0.0438 73 -2.998 0.0687
AF3.AF4 - F3.F4 0.12798 0.0463 73 2.765 0.1202
AF3.AF4 - F5.F6 0.26452 0.0454 73 5.827 <.0001
AF3.AF4 - F7.F8 0.19528 0.0433 73 4.514 0.0006
AF3.AF4 - FC1.FC2 -0.16360 0.0514 73 -3.183 0.0423
AF7.AF8 - F1.F2 -0.26380 0.0411 73 -6.416 <.0001
AF7.AF8 - F3.F4 -0.00467 0.0403 73 -0.116 1.0000
AF7.AF8 - F5.F6 0.13187 0.0330 73 3.999 0.0036
AF7.AF8 - F7.F8 0.06264 0.0273 73 2.296 0.3099
AF7.AF8 - FC1.FC2 -0.29625 0.0457 73 -6.482 <.0001
F1.F2 - F3.F4 0.25913 0.0296 73 8.748 <.0001
F1.F2 - F5.F6 0.39567 0.0352 73 11.236 <.0001
F1.F2 - F7.F8 0.32644 0.0338 73 9.654 <.0001
F1.F2 - FC1.FC2 -0.03245 0.0161 73 -2.010 0.4827
F3.F4 - F5.F6 0.13654 0.0319 73 4.286 0.0014
F3.F4 - F7.F8 0.06730 0.0369 73 1.824 0.6058
F3.F4 - FC1.FC2 -0.29158 0.0354 73 -8.246 <.0001
F5.F6 - F7.F8 -0.06924 0.0252 73 -2.745 0.1258
F5.F6 - FC1.FC2 -0.42812 0.0383 73 -11.190 <.0001
F7.F8 - FC1.FC2 -0.35889 0.0381 73 -9.427 <.0001
Results are averaged over the levels of: Group, hemisphere
P value adjustment: tukey method for comparing a family of 8 estimates
________________________________________________________________________________
$emmeans
electrode_pair = Fp1.Fp2:
hemisphere emmean SE df lower.CL upper.CL
Left 1.139 0.0473 73 1.044 1.233
Right 1.085 0.0486 73 0.988 1.182
electrode_pair = AF3.AF4:
hemisphere emmean SE df lower.CL upper.CL
Left 1.106 0.0508 73 1.005 1.207
Right 1.091 0.0486 73 0.994 1.188
electrode_pair = AF7.AF8:
hemisphere emmean SE df lower.CL upper.CL
Left 1.038 0.0372 73 0.964 1.112
Right 1.003 0.0398 73 0.924 1.082
electrode_pair = F1.F2:
hemisphere emmean SE df lower.CL upper.CL
Left 1.258 0.0420 73 1.174 1.342
Right 1.288 0.0384 73 1.211 1.365
electrode_pair = F3.F4:
hemisphere emmean SE df lower.CL upper.CL
Left 1.022 0.0472 73 0.928 1.116
Right 1.027 0.0427 73 0.942 1.112
electrode_pair = F5.F6:
hemisphere emmean SE df lower.CL upper.CL
Left 0.947 0.0434 73 0.861 1.034
Right 0.883 0.0421 73 0.799 0.967
electrode_pair = F7.F8:
hemisphere emmean SE df lower.CL upper.CL
Left 1.006 0.0376 73 0.931 1.081
Right 0.967 0.0386 73 0.891 1.044
electrode_pair = FC1.FC2:
hemisphere emmean SE df lower.CL upper.CL
Left 1.309 0.0415 73 1.226 1.392
Right 1.316 0.0413 73 1.234 1.398
Results are averaged over the levels of: Group, Sex
Confidence level used: 0.95
$contrasts
electrode_pair = Fp1.Fp2:
contrast estimate SE df t.ratio p.value
Left - Right 0.05394 0.0222 73 2.426 0.0177
electrode_pair = AF3.AF4:
contrast estimate SE df t.ratio p.value
Left - Right 0.01468 0.0290 73 0.506 0.6145
electrode_pair = AF7.AF8:
contrast estimate SE df t.ratio p.value
Left - Right 0.03506 0.0229 73 1.532 0.1298
electrode_pair = F1.F2:
contrast estimate SE df t.ratio p.value
Left - Right -0.03011 0.0152 73 -1.979 0.0516
electrode_pair = F3.F4:
contrast estimate SE df t.ratio p.value
Left - Right -0.00484 0.0255 73 -0.190 0.8501
electrode_pair = F5.F6:
contrast estimate SE df t.ratio p.value
Left - Right 0.06459 0.0279 73 2.317 0.0233
electrode_pair = F7.F8:
contrast estimate SE df t.ratio p.value
Left - Right 0.03852 0.0223 73 1.727 0.0883
electrode_pair = FC1.FC2:
contrast estimate SE df t.ratio p.value
Left - Right -0.00697 0.0168 73 -0.415 0.6791
Results are averaged over the levels of: Group, Sex