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'))
}
}
}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
[1] 0.885653
plot(r2s_df, type = 'l', ylab = expression(R^2), main = 'elbow'); abline(h = r2_elbow)
text(x = elbow, y = r2_elbow, toString(format(r2_elbow, digits = 3)), pos = 3)
alpha_power_data <- alpha_power_data|>
mutate(Amplitude = ifelse(r_squared<r2_elbow, 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.073318 1st Qu.:-0.095621 1st Qu.:-0.091458 1st Qu.:-0.02709
4 : 1 Median : 0.024170 Median : 0.002948 Median :-0.005894 Median : 0.02006
5 : 1 Mean : 0.007635 Mean :-0.010902 Mean :-0.007298 Mean : 0.02061
6 : 1 3rd Qu.: 0.078879 3rd Qu.: 0.071816 3rd Qu.: 0.073573 3rd Qu.: 0.04847
7 : 1 Max. : 0.347914 Max. : 0.380950 Max. : 0.498119 Max. : 0.20971
(Other):71 NA's :26 NA's :24 NA's :26 NA's :9
asymmetry_F4_F3 asymmetry_F6_F5 asymmetry_F8_F7 asymmetry_FC2_FC1 Group
Min. :-0.194715 Min. :-0.393810 Min. :-0.31210 Min. :-0.20251 Control:39
1st Qu.:-0.072801 1st Qu.:-0.127847 1st Qu.:-0.13250 1st Qu.:-0.03036 low-SES:38
Median : 0.005649 Median :-0.007187 Median :-0.02253 Median : 0.01477
Mean : 0.006391 Mean :-0.034062 Mean :-0.03780 Mean : 0.02014
3rd Qu.: 0.079395 3rd Qu.: 0.063976 3rd Qu.: 0.02379 3rd Qu.: 0.05165
Max. : 0.267287 Max. : 0.268483 Max. : 0.26139 Max. : 0.48270
NA's :21 NA's :26 NA's :25 NA's :7
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)) Subject Group Sex Electrodes Asimmetry
1 : 8 Control:312 female:344 Fp2_Fp1: 77 Min. :-0.437897
2 : 8 low-SES:304 male :272 AF4_AF3: 77 1st Qu.:-0.070028
4 : 8 AF8_AF7: 77 Median : 0.006128
5 : 8 F2_F1 : 77 Mean :-0.002420
6 : 8 F4_F3 : 77 3rd Qu.: 0.063060
7 : 8 F6_F5 : 77 Max. : 0.498119
(Other):568 (Other):154 NA's :164
alpha_asymmetry_lmer = lmer(Asimmetry ~ Group*Sex + (1|Subject) + (1|Electrodes), alpha_asymmetry_data_long)
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_data_long
REML criterion at convergence: -628.8
Scaled residuals:
Min 1Q Median 3Q Max
-3.4781 -0.4774 -0.0229 0.4664 4.2125
Random effects:
Groups Name Variance Std.Dev.
Subject (Intercept) 0.0030661 0.05537
Electrodes (Intercept) 0.0002884 0.01698
Residual 0.0118281 0.10876
Number of obs: 452, groups: Subject, 71; Electrodes, 8
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 0.020274 0.018392 65.869259 1.102 0.27435
Grouplow-SES -0.073276 0.023504 75.218165 -3.118 0.00258 **
Sexmale 0.001094 0.023938 71.025694 0.046 0.96366
Grouplow-SES:Sexmale 0.060425 0.034406 71.256175 1.756 0.08334 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Gr-SES Sexmal
Grouplw-SES -0.696
Sexmale -0.686 0.535
Grplw-SES:S 0.476 -0.683 -0.695
# Indices of model performance
AIC | AICc | BIC | R2 (cond.) | R2 (marg.) | ICC | RMSE | Sigma
--------------------------------------------------------------------------
-614.8 | -614.6 | -586.0 | 0.271 | 0.064 | 0.221 | 0.103 | 0.109
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 314.42 -614.84
(1 | Subject) 6 293.88 -575.76 41.081 1 1.461e-10 ***
(1 | Electrodes) 6 312.71 -613.42 3.421 1 0.06436 .
---
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.074141 0.074141 1 71.227 6.2682 0.01459 *
Sex 0.039112 0.039112 1 71.282 3.3067 0.07320 .
Group:Sex 0.036483 0.036483 1 71.256 3.0844 0.08334 .
---
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.07 | [0.00, 0.20] | medium
Sex | 0.03 | [0.00, 0.14] | small
Group:Sex | 0.03 | [0.00, 0.14] | small
- Interpretation rule: field2013
____________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0208 0.0134 36.0 -0.00639 0.04803
low-SES -0.0222 0.0138 38.2 -0.05016 0.00567
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.0431 0.0172 63.8 2.501 0.0150
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.02027 0.0184 60.2 -0.0166 0.0571
male Control 0.02137 0.0175 51.5 -0.0138 0.0566
female low-SES -0.05300 0.0170 53.8 -0.0871 -0.0189
male low-SES 0.00852 0.0199 59.8 -0.0313 0.0484
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 11 16 27
low-SES 14 10 24
Sum 25 26 51
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, 47 0.01 1.11 .023 .297
2 Sex 1, 47 0.01 1.11 .023 .297
3 Group:Sex 1, 47 0.01 0.09 .002 .763
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0251 0.0234 47 -0.0220 0.0722
low-SES -0.0108 0.0248 47 -0.0606 0.0390
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0108 0.0241 47 -0.0593 0.0376
male 0.0251 0.0241 47 -0.0234 0.0736
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.0123 0.0361 47 -0.0602 0.0848
low-SES female -0.0340 0.0320 47 -0.0983 0.0303
Control male 0.0379 0.0299 47 -0.0222 0.0980
low-SES male 0.0123 0.0378 47 -0.0638 0.0884
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 11 17 28
low-SES 14 11 25
Sum 25 28 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_AF4_AF3
Effect df MSE F ges p.value
1 Group 1, 49 0.02 1.75 .034 .192
2 Sex 1, 49 0.02 2.24 .044 .141
3 Group:Sex 1, 49 0.02 1.34 .027 .253
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0160 0.0274 49 -0.0391 0.0711
low-SES -0.0364 0.0286 49 -0.0937 0.0210
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0398 0.0286 49 -0.0972 0.0176
male 0.0194 0.0274 49 -0.0357 0.0745
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.00929 0.0427 49 -0.0766 0.0952
low-SES female -0.08884 0.0379 49 -0.1650 -0.0127
Control male 0.02272 0.0344 49 -0.0464 0.0918
low-SES male 0.01613 0.0427 49 -0.0698 0.1020
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 12 14 26
low-SES 15 10 25
Sum 27 24 51
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, 47 0.03 6.40 * .120 .015
2 Sex 1, 47 0.03 0.85 .018 .362
3 Group:Sex 1, 47 0.03 3.96 + .078 .053
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
________________________________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0608 0.0337 47 -0.00694 0.12859
low-SES -0.0619 0.0350 47 -0.13227 0.00838
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.123 0.0485 47 2.529 0.0149
Results are averaged over the levels of: Sex
Sex emmean SE df lower.CL upper.CL
female -0.0229 0.0332 47 -0.0896 0.0438
male 0.0218 0.0355 47 -0.0495 0.0931
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.08676 0.0494 47 -0.0127 0.1862
low-SES female -0.13256 0.0442 47 -0.2215 -0.0436
Control male 0.03488 0.0458 47 -0.0572 0.1270
low-SES male 0.00866 0.0542 47 -0.1003 0.1176
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 17 34
low-SES 21 13 34
Sum 38 30 68
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, 64 0.01 0.43 .007 .514
2 Sex 1, 64 0.01 0.02 <.001 .882
3 Group:Sex 1, 64 0.01 0.17 .003 .684
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0269 0.0128 64 0.0014 0.0524
low-SES 0.0149 0.0131 64 -0.0114 0.0411
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 64 -0.00201 0.0465
male 0.0195 0.0137 64 -0.00788 0.0469
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.0181 64 -0.00406 0.0681
low-SES female 0.0125 0.0162 64 -0.01996 0.0450
Control male 0.0218 0.0181 64 -0.01428 0.0579
low-SES male 0.0172 0.0207 64 -0.02401 0.0585
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 16 30
low-SES 14 12 26
Sum 28 28 56
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, 52 0.01 4.45 * .079 .040
2 Sex 1, 52 0.01 1.21 .023 .276
3 Group:Sex 1, 52 0.01 2.32 .043 .134
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
________________________________________________________________________________
$emmeans
Group emmean SE df lower.CL upper.CL
Control 0.0356 0.0192 52 -0.00302 0.0742
low-SES -0.0240 0.0207 52 -0.06547 0.0175
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.0596 0.0282 52 2.109 0.0398
Results are averaged over the levels of: Sex
Sex emmean SE df lower.CL upper.CL
female -0.00975 0.0199 52 -0.0496 0.0301
male 0.02135 0.0201 52 -0.0189 0.0616
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.0281 52 -0.0148 0.09792
low-SES female -0.0610 0.0281 52 -0.1174 -0.00467
Control male 0.0296 0.0263 52 -0.0231 0.08234
low-SES male 0.0131 0.0303 52 -0.0478 0.07398
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 11 16 27
low-SES 15 9 24
Sum 26 25 51
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, 47 0.02 2.73 .055 .105
2 Sex 1, 47 0.02 2.85 + .057 .098
3 Group:Sex 1, 47 0.02 0.09 .002 .767
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control -0.00308 0.0255 47 -0.0544 0.04828
low-SES -0.06503 0.0275 47 -0.1203 -0.00974
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.06571 0.0259 47 -0.118 -0.0137
male -0.00241 0.0272 47 -0.057 0.0522
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.0291 0.0393 47 -0.1082 0.0499
low-SES female -0.1023 0.0337 47 -0.1700 -0.0346
Control male 0.0230 0.0326 47 -0.0426 0.0885
low-SES male -0.0278 0.0435 47 -0.1152 0.0596
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 10 15 25
low-SES 15 12 27
Sum 25 27 52
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, 48 0.02 0.01 <.001 .918
2 Sex 1, 48 0.02 0.03 <.001 .856
3 Group:Sex 1, 48 0.02 0.05 .001 .825
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control -0.0404 0.0286 48 -0.0979 0.0170
low-SES -0.0364 0.0271 48 -0.0909 0.0181
Results are averaged over the levels of: Sex
Confidence level used: 0.95
Sex emmean SE df lower.CL upper.CL
female -0.0348 0.0286 48 -0.0923 0.0226
male -0.0420 0.0271 48 -0.0965 0.0125
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.0412 0.0443 48 -0.130 0.0478
low-SES female -0.0284 0.0362 48 -0.101 0.0443
Control male -0.0397 0.0362 48 -0.112 0.0330
low-SES male -0.0443 0.0404 48 -0.126 0.0369
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 17 35
low-SES 21 14 35
Sum 39 31 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_FC2_FC1
Effect df MSE F ges p.value
1 Group 1, 66 0.01 0.12 .002 .725
2 Sex 1, 66 0.01 4.17 * .059 .045
3 Group:Sex 1, 66 0.01 2.96 + .043 .090
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Group emmean SE df lower.CL upper.CL
Control 0.0282 0.0153 66 -0.00242 0.0588
low-SES 0.0204 0.0156 66 -0.01078 0.0517
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.0146 66 -0.0271 0.0310
male 0.04668 0.0164 66 0.0140 0.0793
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.0447 0.0219 66 -2.043 0.0451
Results are averaged over the levels of: Group
Group Sex emmean SE df lower.CL upper.CL
Control female 0.0246 0.0214 66 -0.0180 0.0673
low-SES female -0.0208 0.0198 66 -0.0603 0.0187
Control male 0.0317 0.0220 66 -0.0122 0.0756
low-SES male 0.0616 0.0242 66 0.0133 0.1100
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.55239
4 : 16 rest_004_resting.csv: 16 E071-F8 : 77 Median :10.107 Median :0.81347
5 : 16 rest_005_resting.csv: 16 E072-AF8 : 77 Mean : 9.964 Mean :0.84543
6 : 16 rest_006_resting.csv: 16 E075-FC2a: 77 3rd Qu.:10.727 3rd Qu.:1.10556
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 :251
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 8 13 21
low-SES 12 7 19
Sum 20 20 40
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, 36 1.84 0.56 .014 .461
2 Sex 1, 36 1.84 0.09 .002 .770
3 Group:Sex 1, 36 1.84 0.57 .014 .456
4 hemisphere 1, 36 0.02 0.03 <.001 .859
5 Group:hemisphere 1, 36 0.02 2.07 <.001 .159
6 Sex:hemisphere 1, 36 0.02 0.67 <.001 .419
7 Group:Sex:hemisphere 1, 36 0.02 1.89 <.001 .177
8 electrode_pair 2.86, 102.90 0.04 31.55 *** .048 <.001
9 Group:electrode_pair 2.86, 102.90 0.04 0.35 <.001 .777
10 Sex:electrode_pair 2.86, 102.90 0.04 0.52 <.001 .663
11 Group:Sex:electrode_pair 2.86, 102.90 0.04 0.04 <.001 .988
12 hemisphere:electrode_pair 4.84, 174.20 0.01 2.15 + .001 .064
13 Group:hemisphere:electrode_pair 4.84, 174.20 0.01 1.19 <.001 .316
14 Sex:hemisphere:electrode_pair 4.84, 174.20 0.01 0.52 <.001 .752
15 Group:Sex:hemisphere:electrode_pair 4.84, 174.20 0.01 0.89 <.001 .488
---
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 1.000 0.0780 36 0.842 1.16
Right 1.016 0.0752 36 0.863 1.17
Group = low-SES:
hemisphere emmean SE df lower.CL upper.CL
Left 0.935 0.0825 36 0.768 1.10
Right 0.915 0.0796 36 0.754 1.08
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.0153 0.0166 36 -0.919 0.3645
Group = low-SES:
contrast estimate SE df t.ratio p.value
Left - Right 0.0196 0.0176 36 1.113 0.2730
Results are averaged over the levels of: Sex, electrode_pair
________________________________________________________________________________
$emmeans
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.926 0.0553 36 0.814 1.038
AF3.AF4 0.964 0.0572 36 0.848 1.080
AF7.AF8 0.875 0.0586 36 0.756 0.994
F1.F2 1.076 0.0564 36 0.961 1.190
F3.F4 0.997 0.0567 36 0.882 1.112
F5.F6 0.936 0.0591 36 0.816 1.055
F7.F8 0.868 0.0604 36 0.746 0.990
FC1.FC2 1.091 0.0534 36 0.983 1.200
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.03772 0.0139 36 -2.709 0.1527
Fp1.Fp2 - AF7.AF8 0.05107 0.0203 36 2.518 0.2204
Fp1.Fp2 - F1.F2 -0.14977 0.0260 36 -5.751 <.0001
Fp1.Fp2 - F3.F4 -0.07121 0.0281 36 -2.532 0.2149
Fp1.Fp2 - F5.F6 -0.00947 0.0273 36 -0.346 1.0000
Fp1.Fp2 - F7.F8 0.05807 0.0267 36 2.176 0.3892
Fp1.Fp2 - FC1.FC2 -0.16510 0.0313 36 -5.274 0.0002
AF3.AF4 - AF7.AF8 0.08879 0.0188 36 4.719 0.0008
AF3.AF4 - F1.F2 -0.11204 0.0174 36 -6.434 <.0001
AF3.AF4 - F3.F4 -0.03348 0.0202 36 -1.661 0.7108
AF3.AF4 - F5.F6 0.02825 0.0200 36 1.411 0.8461
AF3.AF4 - F7.F8 0.09579 0.0212 36 4.523 0.0015
AF3.AF4 - FC1.FC2 -0.12738 0.0243 36 -5.247 0.0002
AF7.AF8 - F1.F2 -0.20083 0.0239 36 -8.397 <.0001
AF7.AF8 - F3.F4 -0.12227 0.0230 36 -5.323 0.0001
AF7.AF8 - F5.F6 -0.06054 0.0196 36 -3.085 0.0679
AF7.AF8 - F7.F8 0.00700 0.0161 36 0.435 0.9998
AF7.AF8 - FC1.FC2 -0.21617 0.0287 36 -7.544 <.0001
F1.F2 - F3.F4 0.07856 0.0121 36 6.471 <.0001
F1.F2 - F5.F6 0.14030 0.0163 36 8.589 <.0001
F1.F2 - F7.F8 0.20784 0.0221 36 9.411 <.0001
F1.F2 - FC1.FC2 -0.01533 0.0112 36 -1.366 0.8662
F3.F4 - F5.F6 0.06174 0.0135 36 4.584 0.0013
F3.F4 - F7.F8 0.12928 0.0177 36 7.289 <.0001
F3.F4 - FC1.FC2 -0.09389 0.0150 36 -6.261 <.0001
F5.F6 - F7.F8 0.06754 0.0113 36 5.999 <.0001
F5.F6 - FC1.FC2 -0.15563 0.0189 36 -8.240 <.0001
F7.F8 - FC1.FC2 -0.22317 0.0254 36 -8.803 <.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.924 0.0573 36 0.808 1.040
AF3.AF4 0.967 0.0593 36 0.847 1.087
AF7.AF8 0.870 0.0617 36 0.745 0.996
F1.F2 1.066 0.0568 36 0.951 1.181
F3.F4 1.000 0.0578 36 0.883 1.117
F5.F6 0.947 0.0606 36 0.824 1.070
F7.F8 0.891 0.0633 36 0.763 1.019
FC1.FC2 1.076 0.0542 36 0.967 1.186
hemisphere = Right:
electrode_pair emmean SE df lower.CL upper.CL
Fp1.Fp2 0.928 0.0548 36 0.817 1.039
AF3.AF4 0.961 0.0573 36 0.844 1.077
AF7.AF8 0.880 0.0578 36 0.762 0.997
F1.F2 1.086 0.0569 36 0.971 1.201
F3.F4 0.994 0.0567 36 0.879 1.109
F5.F6 0.924 0.0591 36 0.805 1.044
F7.F8 0.845 0.0596 36 0.724 0.966
FC1.FC2 1.106 0.0539 36 0.997 1.215
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.04313 0.0166 36 -2.597 0.1901
Fp1.Fp2 - AF7.AF8 0.05345 0.0243 36 2.200 0.3757
Fp1.Fp2 - F1.F2 -0.14185 0.0265 36 -5.353 0.0001
Fp1.Fp2 - F3.F4 -0.07630 0.0316 36 -2.416 0.2645
Fp1.Fp2 - F5.F6 -0.02278 0.0305 36 -0.747 0.9947
Fp1.Fp2 - F7.F8 0.03287 0.0292 36 1.126 0.9467
Fp1.Fp2 - FC1.FC2 -0.15254 0.0331 36 -4.611 0.0012
AF3.AF4 - AF7.AF8 0.09658 0.0249 36 3.873 0.0093
AF3.AF4 - F1.F2 -0.09872 0.0193 36 -5.115 0.0003
AF3.AF4 - F3.F4 -0.03317 0.0249 36 -1.330 0.8814
AF3.AF4 - F5.F6 0.02035 0.0253 36 0.805 0.9918
AF3.AF4 - F7.F8 0.07600 0.0262 36 2.899 0.1027
AF3.AF4 - FC1.FC2 -0.10941 0.0269 36 -4.068 0.0055
AF7.AF8 - F1.F2 -0.19529 0.0262 36 -7.448 <.0001
AF7.AF8 - F3.F4 -0.12975 0.0277 36 -4.685 0.0009
AF7.AF8 - F5.F6 -0.07623 0.0233 36 -3.277 0.0431
AF7.AF8 - F7.F8 -0.02058 0.0179 36 -1.149 0.9410
AF7.AF8 - FC1.FC2 -0.20599 0.0298 36 -6.909 <.0001
F1.F2 - F3.F4 0.06555 0.0155 36 4.219 0.0036
F1.F2 - F5.F6 0.11907 0.0170 36 6.984 <.0001
F1.F2 - F7.F8 0.17472 0.0228 36 7.663 <.0001
F1.F2 - FC1.FC2 -0.01069 0.0140 36 -0.764 0.9940
F3.F4 - F5.F6 0.05352 0.0151 36 3.550 0.0218
F3.F4 - F7.F8 0.10917 0.0210 36 5.196 0.0002
F3.F4 - FC1.FC2 -0.07624 0.0197 36 -3.877 0.0092
F5.F6 - F7.F8 0.05565 0.0157 36 3.537 0.0226
F5.F6 - FC1.FC2 -0.12976 0.0209 36 -6.209 <.0001
F7.F8 - FC1.FC2 -0.18541 0.0260 36 -7.120 <.0001
hemisphere = Right:
contrast estimate SE df t.ratio p.value
Fp1.Fp2 - AF3.AF4 -0.03232 0.0169 36 -1.910 0.5535
Fp1.Fp2 - AF7.AF8 0.04868 0.0201 36 2.427 0.2596
Fp1.Fp2 - F1.F2 -0.15769 0.0288 36 -5.466 0.0001
Fp1.Fp2 - F3.F4 -0.06612 0.0275 36 -2.404 0.2699
Fp1.Fp2 - F5.F6 0.00384 0.0287 36 0.134 1.0000
Fp1.Fp2 - F7.F8 0.08327 0.0290 36 2.868 0.1098
Fp1.Fp2 - FC1.FC2 -0.17766 0.0327 36 -5.435 0.0001
AF3.AF4 - AF7.AF8 0.08100 0.0197 36 4.112 0.0048
AF3.AF4 - F1.F2 -0.12537 0.0219 36 -5.725 <.0001
AF3.AF4 - F3.F4 -0.03379 0.0214 36 -1.580 0.7587
AF3.AF4 - F5.F6 0.03616 0.0234 36 1.547 0.7769
AF3.AF4 - F7.F8 0.11559 0.0247 36 4.681 0.0009
AF3.AF4 - FC1.FC2 -0.14534 0.0281 36 -5.176 0.0002
AF7.AF8 - F1.F2 -0.20637 0.0287 36 -7.192 <.0001
AF7.AF8 - F3.F4 -0.11480 0.0237 36 -4.845 0.0006
AF7.AF8 - F5.F6 -0.04484 0.0234 36 -1.918 0.5479
AF7.AF8 - F7.F8 0.03459 0.0225 36 1.538 0.7818
AF7.AF8 - FC1.FC2 -0.22635 0.0335 36 -6.754 <.0001
F1.F2 - F3.F4 0.09157 0.0132 36 6.955 <.0001
F1.F2 - F5.F6 0.16153 0.0222 36 7.271 <.0001
F1.F2 - F7.F8 0.24096 0.0284 36 8.497 <.0001
F1.F2 - FC1.FC2 -0.01997 0.0123 36 -1.621 0.7349
F3.F4 - F5.F6 0.06995 0.0179 36 3.911 0.0084
F3.F4 - F7.F8 0.14938 0.0211 36 7.091 <.0001
F3.F4 - FC1.FC2 -0.11155 0.0179 36 -6.215 <.0001
F5.F6 - F7.F8 0.07943 0.0157 36 5.072 0.0003
F5.F6 - FC1.FC2 -0.18150 0.0250 36 -7.269 <.0001
F7.F8 - FC1.FC2 -0.26093 0.0320 36 -8.158 <.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