knitr::opts_chunk$set(echo = TRUE)
library(R.matlab)
## R.matlab v3.7.0 (2022-08-25 21:52:34 UTC) successfully loaded. See ?R.matlab for help.
## 
## Attaching package: 'R.matlab'
## The following objects are masked from 'package:base':
## 
##     getOption, isOpen
library(RCurl)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2
## ──
## ✔ ggplot2 3.4.0      ✔ purrr   1.0.1 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.3.0      ✔ stringr 1.5.0 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ tidyr::complete() masks RCurl::complete()
## ✖ dplyr::filter()   masks stats::filter()
## ✖ dplyr::lag()      masks stats::lag()
library(ggstatsplot)
## You can cite this package as:
##      Patil, I. (2021). Visualizations with statistical details: The 'ggstatsplot' approach.
##      Journal of Open Source Software, 6(61), 3167, doi:10.21105/joss.03167
library(afex)
## Loading required package: lme4
## Loading required package: Matrix
## 
## Attaching package: 'Matrix'
## 
## The following objects are masked from 'package:tidyr':
## 
##     expand, pack, unpack
## 
## ************
## Welcome to afex. For support visit: http://afex.singmann.science/
## - Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
## - Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
## - 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
## - NEWS: emmeans() for ANOVA models now uses model = 'multivariate' as default.
## - Get and set global package options with: afex_options()
## - Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
## - For example analyses see: browseVignettes("afex")
## ************
## 
## Attaching package: 'afex'
## 
## The following object is masked from 'package:lme4':
## 
##     lmer
library(broom)

Functional connectivity

library(abind)

# List to store all 2D matrices
matrices <- list()

# Loop through all .tsv files in the folder
files <- list.files(path = "conmats_filtered_2/", pattern = "*.tsv",full.names = TRUE)
for (file in files) {
  mat <- read.table(file, sep = "\t", header = FALSE)
  matrices[[file]] <- mat
}

# Combine all matrices into a single 3D matrix
result_matrix <- abind(matrices, along = 3)
dim(result_matrix)
## [1] 394 394  56
results_brain_labs <- brainregions$X2

# List to store all 2D matrices
interferon_matrices <- list()
# Loop through all .tsv files in the folder
files <- list.files(path = "conmats_filtered_2/", pattern = "ses-I",full.names = TRUE)
for (file in files) {
  mat <- read.table(file, sep = "\t", header = FALSE)
  interferon_matrices[[file]] <- mat
}
# Combine all matrices into a single 3D matrix
result_interferon_matrix <- abind(interferon_matrices, along = 3)

# List to store all 2D matrices
placebo_matrices <- list()
# Loop through all .tsv files in the folder
files <- list.files(path = "conmats_filtered_2/", pattern = "ses-P",full.names = TRUE)
for (file in files) {
  mat <- read.table(file, sep = "\t", header = FALSE)
  placebo_matrices[[file]] <- mat
}
# Combine all matrices into a single 3D matrix
result_placebo_matrix <- abind(placebo_matrices, along = 3)

# nnodes <- length(brainregions$X2)
# tri_pos <- which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)
library(igraph)
## 
## Attaching package: 'igraph'
## The following objects are masked from 'package:dplyr':
## 
##     as_data_frame, groups, union
## The following objects are masked from 'package:purrr':
## 
##     compose, simplify
## The following object is masked from 'package:tidyr':
## 
##     crossing
## The following object is masked from 'package:tibble':
## 
##     as_data_frame
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
df_list <- list()

for (i in 1:dim(result_matrix)[3]) {
  #print(i)
  g  <- graph.adjacency(result_matrix[,,i],weighted=TRUE,mode = "upper", diag = FALSE)
  df_list[[i]] <- get.data.frame(g) %>% mutate(fileIndex=i)
}

data.funccon <- bind_rows(df_list) %>% left_join(.,variables_ext)
## Joining, by = "fileIndex"

Grouped by scale, condition, subject

No difference

data.funccon %>% mutate(weight = atanh(weight)) %>% group_by(Subj_ID,condition) %>% summarise(meanFuncCon = mean(weight)) -> data.aggr
## `summarise()` has grouped output by 'Subj_ID'. You can override using the
## `.groups` argument.
ggwithinstats(
    data             = data.aggr,
  x                = condition,
  y                = meanFuncCon,
  type             = "p",
  bf.message = FALSE)
## Adding missing grouping variables: `Subj_ID`

Grouped by scale, condition, subject and age_cat

Nothing…

data.funccon %>% mutate(weight = atanh(weight)) %>% group_by(Subj_ID,condition,Age_cat) %>% summarise(meanFuncCon = mean(weight)) -> data.aggr
## `summarise()` has grouped output by 'Subj_ID', 'condition'. You can override
## using the `.groups` argument.
anova_summary <- nice(aov_ez("Subj_ID", "meanFuncCon", data.aggr, within ="condition", between="Age_cat"))
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
knitr::kable(anova_summary)
Effect df MSE F ges p.value
Age_cat 1, 26 0.00 1.63 .043 .213
condition 1, 26 0.00 0.01 <.001 .905
Age_cat:condition 1, 26 0.00 0.39 .004 .535

Grouped by scale, condition, subject and network:yeo

Main effect of condition on Somatomotor2Somatomotor, Ventral Attention2Ventral Attention, Somatomotor2Default, Default2Somatomotor, Somatomotor2Ventral Attention, Ventral Attention2Somatomotor

data.funccon %>% mutate(weight = atanh(weight), from = gsub("V", "ROI_", from), to = gsub("V", "ROI_", to)) %>% mutate(from_network = ifelse(is.na(match(from, network.combined$ROI)), from, network.combined$name[match(from, network.combined$ROI)]), to_network = ifelse(is.na(match(to, network.combined$ROI)), to, network.combined$name[match(to, network.combined$ROI)]), from2to = paste0(from_network,"2",to_network)) %>% group_by(Subj_ID,condition,from2to) %>% summarise(meanFuncConn = mean(weight)) -> data.aggr
## `summarise()` has grouped output by 'Subj_ID', 'condition'. You can override
## using the `.groups` argument.
# grouped_ggwithinstats(
#     data             = data.aggr,
#   x                = condition,
#   y                = meanFuncConn,
#   grouping.var = from2to,
#   type             = "p",
#   bf.message = FALSE)


data.aggr %>% ungroup() %>%
  nest_by(from2to) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanFuncConn", data, within ="condition")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
from2to Effect df MSE F ges p.value
Default2Default condition 1, 27 0.00 0.82 .009 .374
Default2Dorsal Attention condition 1, 27 0.00 2.58 .032 .120
Default2Frontoparietal condition 1, 27 0.00 0.08 <.001 .777
Default2Limbic condition 1, 27 0.00 1.34 .016 .257
Default2Somatomotor condition 1, 27 0.00 6.92 * .042 .014
Default2Subcortical condition 1, 27 0.00 1.14 .014 .295
Default2Ventral Attention condition 1, 27 0.00 1.16 .010 .292
Default2Visual condition 1, 27 0.00 3.97 + .031 .056
Dorsal Attention2Default condition 1, 27 0.00 1.55 .014 .223
Dorsal Attention2Dorsal Attention condition 1, 27 0.00 1.53 .010 .227
Dorsal Attention2Frontoparietal condition 1, 27 0.00 2.85 .023 .103
Dorsal Attention2Limbic condition 1, 27 0.00 0.09 .001 .771
Dorsal Attention2Somatomotor condition 1, 27 0.00 1.24 .013 .274
Dorsal Attention2Subcortical condition 1, 27 0.00 0.46 .007 .503
Dorsal Attention2Ventral Attention condition 1, 27 0.00 0.00 <.001 .948
Dorsal Attention2Visual condition 1, 27 0.00 1.17 .009 .290
Frontoparietal2Default condition 1, 27 0.00 1.06 .008 .313
Frontoparietal2Dorsal Attention condition 1, 27 0.00 1.81 .018 .190
Frontoparietal2Frontoparietal condition 1, 27 0.00 0.32 .003 .576
Frontoparietal2Limbic condition 1, 27 0.00 0.61 .005 .442
Frontoparietal2Somatomotor condition 1, 27 0.00 2.06 .020 .163
Frontoparietal2Subcortical condition 1, 27 0.00 0.33 .003 .570
Frontoparietal2Ventral Attention condition 1, 27 0.00 0.07 <.001 .787
Frontoparietal2Visual condition 1, 27 0.00 2.38 .019 .135
Limbic2Default condition 1, 27 0.00 2.66 .036 .115
Limbic2Dorsal Attention condition 1, 27 0.00 0.02 <.001 .876
Limbic2Frontoparietal condition 1, 27 0.00 0.05 <.001 .824
Limbic2Limbic condition 1, 27 0.01 0.02 <.001 .892
Limbic2Somatomotor condition 1, 27 0.00 0.52 .009 .477
Limbic2Subcortical condition 1, 27 0.00 1.34 .019 .258
Limbic2Ventral Attention condition 1, 27 0.00 0.12 .002 .730
Limbic2Visual condition 1, 27 0.00 0.31 .004 .582
Somatomotor2Default condition 1, 27 0.00 7.07 * .040 .013
Somatomotor2Dorsal Attention condition 1, 27 0.00 0.88 .011 .357
Somatomotor2Frontoparietal condition 1, 27 0.00 0.45 .004 .509
Somatomotor2Limbic condition 1, 27 0.00 0.09 .001 .761
Somatomotor2Somatomotor condition 1, 27 0.00 8.79 ** .071 .006
Somatomotor2Subcortical condition 1, 27 0.00 0.94 .010 .340
Somatomotor2Ventral Attention condition 1, 27 0.00 6.65 * .064 .016
Somatomotor2Visual condition 1, 27 0.00 0.70 .004 .409
Subcortical2Subcortical condition 1, 27 0.00 0.47 .007 .500
Ventral Attention2Default condition 1, 27 0.00 1.76 .011 .196
Ventral Attention2Dorsal Attention condition 1, 27 0.00 0.00 <.001 .965
Ventral Attention2Frontoparietal condition 1, 27 0.00 0.02 <.001 .887
Ventral Attention2Limbic condition 1, 27 0.00 0.62 .010 .438
Ventral Attention2Somatomotor condition 1, 27 0.00 6.41 * .053 .017
Ventral Attention2Subcortical condition 1, 27 0.00 0.42 .005 .521
Ventral Attention2Ventral Attention condition 1, 27 0.00 7.40 * .055 .011
Ventral Attention2Visual condition 1, 27 0.00 0.06 <.001 .808
Visual2Default condition 1, 27 0.00 1.41 .014 .246
Visual2Dorsal Attention condition 1, 27 0.00 1.92 .015 .177
Visual2Frontoparietal condition 1, 27 0.00 0.35 .003 .560
Visual2Limbic condition 1, 27 0.00 0.10 .002 .753
Visual2Somatomotor condition 1, 27 0.00 0.71 .003 .408
Visual2Subcortical condition 1, 27 0.00 0.01 <.001 .943
Visual2Ventral Attention condition 1, 27 0.00 0.01 <.001 .914
Visual2Visual condition 1, 27 0.00 0.96 .008 .335

Grouped by scale, condition, subject and network:yeo and age

A lot going on …

data.funccon %>% mutate(weight = atanh(weight), from = gsub("V", "ROI_", from), to = gsub("V", "ROI_", to)) %>% mutate(from_network = ifelse(is.na(match(from, network.combined$ROI)), from, network.combined$name[match(from, network.combined$ROI)]), to_network = ifelse(is.na(match(to, network.combined$ROI)), to, network.combined$name[match(to, network.combined$ROI)]), from2to = paste0(from_network,"2",to_network)) %>% group_by(Subj_ID,condition,from2to, Age_cat) %>% summarise(meanFuncConn = mean(weight)) -> data.aggr
## `summarise()` has grouped output by 'Subj_ID', 'condition', 'from2to'. You can
## override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(from2to) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanFuncConn", data, within ="condition", between = "Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
knitr::kable(anova_summary)
from2to Effect df MSE F ges p.value
Default2Default Age_cat 1, 26 0.01 5.23 * .122 .031
Default2Default condition 1, 26 0.00 0.66 .008 .425
Default2Default Age_cat:condition 1, 26 0.00 3.06 + .035 .092
Default2Dorsal Attention Age_cat 1, 26 0.01 1.73 .044 .200
Default2Dorsal Attention condition 1, 26 0.00 2.52 .029 .124
Default2Dorsal Attention Age_cat:condition 1, 26 0.00 7.30 * .078 .012
Default2Frontoparietal Age_cat 1, 26 0.00 0.00 <.001 .969
Default2Frontoparietal condition 1, 26 0.00 0.14 .001 .714
Default2Frontoparietal Age_cat:condition 1, 26 0.00 1.34 .011 .258
Default2Limbic Age_cat 1, 26 0.00 0.62 .016 .439
Default2Limbic condition 1, 26 0.00 1.16 .014 .291
Default2Limbic Age_cat:condition 1, 26 0.00 1.47 .017 .237
Default2Somatomotor Age_cat 1, 26 0.00 4.55 * .124 .043
Default2Somatomotor condition 1, 26 0.00 6.82 * .049 .015
Default2Somatomotor Age_cat:condition 1, 26 0.00 0.16 .001 .693
Default2Subcortical Age_cat 1, 26 0.00 0.51 .013 .483
Default2Subcortical condition 1, 26 0.00 1.08 .014 .309
Default2Subcortical Age_cat:condition 1, 26 0.00 0.01 <.001 .931
Default2Ventral Attention Age_cat 1, 26 0.01 5.80 * .142 .023
Default2Ventral Attention condition 1, 26 0.00 1.00 .010 .325
Default2Ventral Attention Age_cat:condition 1, 26 0.00 0.92 .009 .347
Default2Visual Age_cat 1, 26 0.00 0.40 .012 .535
Default2Visual condition 1, 26 0.00 4.00 + .028 .056
Default2Visual Age_cat:condition 1, 26 0.00 6.49 * .044 .017
Dorsal Attention2Default Age_cat 1, 26 0.01 3.16 + .083 .087
Dorsal Attention2Default condition 1, 26 0.00 1.36 .013 .255
Dorsal Attention2Default Age_cat:condition 1, 26 0.00 3.13 + .029 .088
Dorsal Attention2Dorsal Attention Age_cat 1, 26 0.01 1.12 .034 .300
Dorsal Attention2Dorsal Attention condition 1, 26 0.00 1.38 .010 .250
Dorsal Attention2Dorsal Attention Age_cat:condition 1, 26 0.00 0.36 .003 .555
Dorsal Attention2Frontoparietal Age_cat 1, 26 0.00 0.28 .008 .600
Dorsal Attention2Frontoparietal condition 1, 26 0.00 3.29 + .026 .081
Dorsal Attention2Frontoparietal Age_cat:condition 1, 26 0.00 1.99 .016 .171
Dorsal Attention2Limbic Age_cat 1, 26 0.00 0.00 <.001 .955
Dorsal Attention2Limbic condition 1, 26 0.00 0.08 .001 .783
Dorsal Attention2Limbic Age_cat:condition 1, 26 0.00 0.02 <.001 .893
Dorsal Attention2Somatomotor Age_cat 1, 26 0.01 1.05 .029 .315
Dorsal Attention2Somatomotor condition 1, 26 0.00 1.63 .016 .213
Dorsal Attention2Somatomotor Age_cat:condition 1, 26 0.00 2.98 + .029 .096
Dorsal Attention2Subcortical Age_cat 1, 26 0.00 0.04 <.001 .848
Dorsal Attention2Subcortical condition 1, 26 0.00 0.53 .009 .472
Dorsal Attention2Subcortical Age_cat:condition 1, 26 0.00 0.63 .010 .434
Dorsal Attention2Ventral Attention Age_cat 1, 26 0.01 1.23 .031 .278
Dorsal Attention2Ventral Attention condition 1, 26 0.00 0.01 <.001 .935
Dorsal Attention2Ventral Attention Age_cat:condition 1, 26 0.00 0.06 <.001 .806
Dorsal Attention2Visual Age_cat 1, 26 0.01 0.00 <.001 .947
Dorsal Attention2Visual condition 1, 26 0.00 1.01 .008 .324
Dorsal Attention2Visual Age_cat:condition 1, 26 0.00 1.06 .008 .312
Frontoparietal2Default Age_cat 1, 26 0.00 0.03 <.001 .861
Frontoparietal2Default condition 1, 26 0.00 1.34 .010 .258
Frontoparietal2Default Age_cat:condition 1, 26 0.00 2.25 .017 .145
Frontoparietal2Dorsal Attention Age_cat 1, 26 0.00 0.41 .011 .529
Frontoparietal2Dorsal Attention condition 1, 26 0.00 1.78 .019 .193
Frontoparietal2Dorsal Attention Age_cat:condition 1, 26 0.00 0.06 <.001 .804
Frontoparietal2Frontoparietal Age_cat 1, 26 0.00 0.00 <.001 .961
Frontoparietal2Frontoparietal condition 1, 26 0.00 0.30 .002 .590
Frontoparietal2Frontoparietal Age_cat:condition 1, 26 0.00 0.02 <.001 .894
Frontoparietal2Limbic Age_cat 1, 26 0.00 0.05 .001 .827
Frontoparietal2Limbic condition 1, 26 0.00 0.54 .005 .470
Frontoparietal2Limbic Age_cat:condition 1, 26 0.00 0.21 .002 .649
Frontoparietal2Somatomotor Age_cat 1, 26 0.00 0.12 .003 .736
Frontoparietal2Somatomotor condition 1, 26 0.00 2.03 .020 .167
Frontoparietal2Somatomotor Age_cat:condition 1, 26 0.00 0.05 <.001 .819
Frontoparietal2Subcortical Age_cat 1, 26 0.00 0.10 .003 .757
Frontoparietal2Subcortical condition 1, 26 0.00 0.27 .002 .610
Frontoparietal2Subcortical Age_cat:condition 1, 26 0.00 0.54 .004 .467
Frontoparietal2Ventral Attention Age_cat 1, 26 0.00 0.13 .004 .720
Frontoparietal2Ventral Attention condition 1, 26 0.00 0.09 .001 .764
Frontoparietal2Ventral Attention Age_cat:condition 1, 26 0.00 0.25 .003 .618
Frontoparietal2Visual Age_cat 1, 26 0.00 0.50 .015 .487
Frontoparietal2Visual condition 1, 26 0.00 2.20 .018 .150
Frontoparietal2Visual Age_cat:condition 1, 26 0.00 0.22 .002 .643
Limbic2Default Age_cat 1, 26 0.00 0.08 .002 .785
Limbic2Default condition 1, 26 0.00 2.41 .033 .133
Limbic2Default Age_cat:condition 1, 26 0.00 1.33 .018 .260
Limbic2Dorsal Attention Age_cat 1, 26 0.00 3.17 + .046 .087
Limbic2Dorsal Attention condition 1, 26 0.00 0.02 <.001 .884
Limbic2Dorsal Attention Age_cat:condition 1, 26 0.00 0.01 <.001 .929
Limbic2Frontoparietal Age_cat 1, 26 0.00 0.01 <.001 .915
Limbic2Frontoparietal condition 1, 26 0.00 0.05 <.001 .817
Limbic2Frontoparietal Age_cat:condition 1, 26 0.00 0.04 <.001 .847
Limbic2Limbic Age_cat 1, 26 0.02 0.17 .005 .685
Limbic2Limbic condition 1, 26 0.01 0.00 <.001 .976
Limbic2Limbic Age_cat:condition 1, 26 0.01 2.38 .024 .135
Limbic2Somatomotor Age_cat 1, 26 0.00 2.29 .045 .142
Limbic2Somatomotor condition 1, 26 0.00 0.43 .008 .518
Limbic2Somatomotor Age_cat:condition 1, 26 0.00 0.70 .012 .412
Limbic2Subcortical Age_cat 1, 26 0.00 0.19 .005 .666
Limbic2Subcortical condition 1, 26 0.00 1.20 .017 .284
Limbic2Subcortical Age_cat:condition 1, 26 0.00 0.42 .006 .520
Limbic2Ventral Attention Age_cat 1, 26 0.00 2.55 .046 .123
Limbic2Ventral Attention condition 1, 26 0.00 0.08 .002 .783
Limbic2Ventral Attention Age_cat:condition 1, 26 0.00 0.93 .018 .342
Limbic2Visual Age_cat 1, 26 0.00 0.03 <.001 .855
Limbic2Visual condition 1, 26 0.00 0.25 .003 .618
Limbic2Visual Age_cat:condition 1, 26 0.00 0.41 .005 .529
Somatomotor2Default Age_cat 1, 26 0.01 7.21 * .183 .012
Somatomotor2Default condition 1, 26 0.00 7.17 * .051 .013
Somatomotor2Default Age_cat:condition 1, 26 0.00 0.51 .004 .481
Somatomotor2Dorsal Attention Age_cat 1, 26 0.01 0.79 .020 .381
Somatomotor2Dorsal Attention condition 1, 26 0.00 1.12 .014 .299
Somatomotor2Dorsal Attention Age_cat:condition 1, 26 0.00 2.17 .026 .153
Somatomotor2Frontoparietal Age_cat 1, 26 0.01 0.62 .017 .440
Somatomotor2Frontoparietal condition 1, 26 0.00 0.44 .004 .512
Somatomotor2Frontoparietal Age_cat:condition 1, 26 0.00 0.02 <.001 .899
Somatomotor2Limbic Age_cat 1, 26 0.00 4.28 * .089 .049
Somatomotor2Limbic condition 1, 26 0.00 0.11 .002 .741
Somatomotor2Limbic Age_cat:condition 1, 26 0.00 0.20 .003 .656
Somatomotor2Somatomotor Age_cat 1, 26 0.01 0.34 .010 .567
Somatomotor2Somatomotor condition 1, 26 0.00 8.48 ** .072 .007
Somatomotor2Somatomotor Age_cat:condition 1, 26 0.00 0.01 <.001 .909
Somatomotor2Subcortical Age_cat 1, 26 0.00 2.09 .054 .160
Somatomotor2Subcortical condition 1, 26 0.00 1.07 .012 .311
Somatomotor2Subcortical Age_cat:condition 1, 26 0.00 0.88 .010 .358
Somatomotor2Ventral Attention Age_cat 1, 26 0.00 1.35 .036 .256
Somatomotor2Ventral Attention condition 1, 26 0.00 6.42 * .067 .018
Somatomotor2Ventral Attention Age_cat:condition 1, 26 0.00 0.02 <.001 .903
Somatomotor2Visual Age_cat 1, 26 0.01 0.33 .011 .569
Somatomotor2Visual condition 1, 26 0.00 0.83 .005 .371
Somatomotor2Visual Age_cat:condition 1, 26 0.00 1.05 .006 .316
Subcortical2Subcortical Age_cat 1, 26 0.00 0.28 .006 .602
Subcortical2Subcortical condition 1, 26 0.00 0.50 .008 .486
Subcortical2Subcortical Age_cat:condition 1, 26 0.00 0.22 .004 .643
Ventral Attention2Default Age_cat 1, 26 0.01 5.80 * .152 .023
Ventral Attention2Default condition 1, 26 0.00 1.58 .012 .220
Ventral Attention2Default Age_cat:condition 1, 26 0.00 0.63 .005 .434
Ventral Attention2Dorsal Attention Age_cat 1, 26 0.01 0.05 .002 .820
Ventral Attention2Dorsal Attention condition 1, 26 0.00 0.00 <.001 .982
Ventral Attention2Dorsal Attention Age_cat:condition 1, 26 0.00 0.08 <.001 .782
Ventral Attention2Frontoparietal Age_cat 1, 26 0.00 1.06 .026 .313
Ventral Attention2Frontoparietal condition 1, 26 0.00 0.00 <.001 .966
Ventral Attention2Frontoparietal Age_cat:condition 1, 26 0.00 2.11 .027 .158
Ventral Attention2Limbic Age_cat 1, 26 0.00 4.44 * .085 .045
Ventral Attention2Limbic condition 1, 26 0.00 0.56 .010 .462
Ventral Attention2Limbic Age_cat:condition 1, 26 0.00 0.13 .002 .719
Ventral Attention2Somatomotor Age_cat 1, 26 0.00 2.80 .075 .106
Ventral Attention2Somatomotor condition 1, 26 0.00 6.02 * .055 .021
Ventral Attention2Somatomotor Age_cat:condition 1, 26 0.00 0.28 .003 .599
Ventral Attention2Subcortical Age_cat 1, 26 0.00 0.13 .003 .722
Ventral Attention2Subcortical condition 1, 26 0.00 0.31 .003 .585
Ventral Attention2Subcortical Age_cat:condition 1, 26 0.00 2.47 .027 .128
Ventral Attention2Ventral Attention Age_cat 1, 26 0.01 6.13 * .152 .020
Ventral Attention2Ventral Attention condition 1, 26 0.00 6.99 * .061 .014
Ventral Attention2Ventral Attention Age_cat:condition 1, 26 0.00 1.21 .011 .281
Ventral Attention2Visual Age_cat 1, 26 0.01 0.24 .008 .625
Ventral Attention2Visual condition 1, 26 0.00 0.10 <.001 .756
Ventral Attention2Visual Age_cat:condition 1, 26 0.00 0.94 .005 .341
Visual2Default Age_cat 1, 26 0.00 0.58 .017 .452
Visual2Default condition 1, 26 0.00 1.23 .011 .278
Visual2Default Age_cat:condition 1, 26 0.00 5.26 * .047 .030
Visual2Dorsal Attention Age_cat 1, 26 0.01 0.00 <.001 .956
Visual2Dorsal Attention condition 1, 26 0.00 1.72 .013 .202
Visual2Dorsal Attention Age_cat:condition 1, 26 0.00 1.09 .008 .306
Visual2Frontoparietal Age_cat 1, 26 0.00 0.38 .011 .545
Visual2Frontoparietal condition 1, 26 0.00 0.31 .003 .583
Visual2Frontoparietal Age_cat:condition 1, 26 0.00 0.09 <.001 .764
Visual2Limbic Age_cat 1, 26 0.00 0.02 <.001 .886
Visual2Limbic condition 1, 26 0.00 0.07 .001 .789
Visual2Limbic Age_cat:condition 1, 26 0.00 0.36 .006 .556
Visual2Somatomotor Age_cat 1, 26 0.01 1.01 .033 .323
Visual2Somatomotor condition 1, 26 0.00 0.70 .004 .409
Visual2Somatomotor Age_cat:condition 1, 26 0.00 0.05 <.001 .834
Visual2Subcortical Age_cat 1, 26 0.00 0.12 .003 .733
Visual2Subcortical condition 1, 26 0.00 0.00 <.001 .954
Visual2Subcortical Age_cat:condition 1, 26 0.00 0.03 <.001 .863
Visual2Ventral Attention Age_cat 1, 26 0.01 0.00 <.001 .988
Visual2Ventral Attention condition 1, 26 0.00 0.02 <.001 .891
Visual2Ventral Attention Age_cat:condition 1, 26 0.00 0.20 .001 .661
Visual2Visual Age_cat 1, 26 0.01 0.43 .013 .516
Visual2Visual condition 1, 26 0.00 0.82 .007 .373
Visual2Visual Age_cat:condition 1, 26 0.00 1.04 .008 .318

Node degree

Grouped by scale, condition, subject

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "degree") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition) %>% summarise(meanDegree = mean(degree)) -> data.aggr
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID'. You can override
## using the `.groups` argument.
grouped_ggwithinstats(
    data             = data.aggr,
  x                = condition,
  y                = meanDegree,
  grouping.var     = threshold,
  type             = "p",
  bf.message = FALSE,
  exact = FALSE
  )

Grouped by scale, condition, subject and age_cat

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "degree") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition, Age_cat) %>% summarise(meanDegree = mean(degree)) -> data.aggr

data.aggr %>% ungroup() %>%
  nest_by(threshold) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanDegree", data, within ="condition", between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold Effect df MSE F ges p.value
1.0 Age_cat 1, 26 0.92 0.05 .001 .818
1.0 condition 1, 26 0.75 2.83 .046 .105
1.0 Age_cat:condition 1, 26 0.75 0.35 .006 .561
1.5 Age_cat 1, 26 1.31 0.01 <.001 .923
1.5 condition 1, 26 1.20 4.51 * .076 .043
1.5 Age_cat:condition 1, 26 1.20 0.01 <.001 .932
2.0 Age_cat 1, 26 1.47 0.07 .001 .799
2.0 condition 1, 26 1.62 7.99 ** .139 .009
2.0 Age_cat:condition 1, 26 1.62 0.01 <.001 .909
2.5 Age_cat 1, 26 1.38 0.21 .003 .649
2.5 condition 1, 26 2.01 12.85 ** .226 .001
2.5 Age_cat:condition 1, 26 2.01 0.07 .002 .794
3.0 Age_cat 1, 26 1.20 0.38 .005 .545
3.0 condition 1, 26 1.94 24.50 *** .368 <.001
3.0 Age_cat:condition 1, 26 1.94 0.02 <.001 .885
3.5 Age_cat 1, 26 1.04 0.82 .011 .373
3.5 condition 1, 26 1.97 36.21 *** .477 <.001
3.5 Age_cat:condition 1, 26 1.97 0.01 <.001 .904
# aw <- aov_ez("Subj_ID", "meanDegree", data.aggr, within ="condition", between="Age_cat")
# p_an <- afex_plot(aw, x = "condition", trace = "Age_cat")  + ggtitle("test") +   theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm"))

# plot anovas

d_nested <- data.aggr %>% ungroup() %>%
  nest_by(threshold)

d_plots <- 
  d_nested %>% 
  mutate(aov = list(map(data,~aov_ez("Subj_ID", "meanDegree", data, within ="condition", between="Age_cat")))) %>%
  mutate(plot = list(map2(aov,threshold,~afex_plot(., x = "condition", trace = "Age_cat") +ggtitle(paste("threshold:",threshold)) + theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm")))))

d_plots$plot_one <- lapply(d_plots$plot, "[[", 1)

library(gridExtra)
do.call(grid.arrange, c(d_plots$plot_one))

Grouped by scale, condition, subject and network:yeo

Somatomotor, subcortical and visual network effects+

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "degree") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name) %>% summarise(meanDegree = mean(degree)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition'. You
## can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanDegree", data, within ="condition")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default condition 1, 27 4.16 0.42 .007 .524
1.0 Dorsal Attention condition 1, 27 5.56 0.02 <.001 .890
1.0 Frontoparietal condition 1, 27 8.58 0.48 .008 .497
1.0 Limbic condition 1, 27 9.86 1.06 .014 .313
1.0 Somatomotor condition 1, 27 4.73 4.22 * .064 .050
1.0 Subcortical condition 1, 27 10.64 1.62 .020 .214
1.0 Ventral Attention condition 1, 27 7.18 0.15 .002 .705
1.0 Visual condition 1, 27 5.16 0.28 .004 .599
1.5 Default condition 1, 27 5.86 0.20 .003 .658
1.5 Dorsal Attention condition 1, 27 9.26 0.01 <.001 .906
1.5 Frontoparietal condition 1, 27 12.31 0.76 .014 .390
1.5 Limbic condition 1, 27 16.94 0.24 .003 .627
1.5 Somatomotor condition 1, 27 6.31 4.16 + .059 .051
1.5 Subcortical condition 1, 27 18.92 2.79 .035 .107
1.5 Ventral Attention condition 1, 27 11.24 0.57 .009 .455
1.5 Visual condition 1, 27 7.55 0.31 .004 .583
2.0 Default condition 1, 27 7.50 0.36 .006 .554
2.0 Dorsal Attention condition 1, 27 11.26 0.59 .008 .450
2.0 Frontoparietal condition 1, 27 15.13 0.88 .017 .356
2.0 Limbic condition 1, 27 24.88 0.05 <.001 .821
2.0 Somatomotor condition 1, 27 8.17 4.92 * .065 .035
2.0 Subcortical condition 1, 27 24.26 5.14 * .058 .032
2.0 Ventral Attention condition 1, 27 15.11 1.30 .022 .264
2.0 Visual condition 1, 27 7.31 0.47 .005 .498
2.5 Default condition 1, 27 9.51 0.76 .013 .393
2.5 Dorsal Attention condition 1, 27 12.17 1.39 .018 .248
2.5 Frontoparietal condition 1, 27 18.69 1.20 .023 .284
2.5 Limbic condition 1, 27 33.44 0.25 .004 .620
2.5 Somatomotor condition 1, 27 9.47 5.50 * .072 .027
2.5 Subcortical condition 1, 27 27.55 8.06 ** .085 .008
2.5 Ventral Attention condition 1, 27 17.22 1.29 .022 .267
2.5 Visual condition 1, 27 6.66 1.45 .013 .239
3.0 Default condition 1, 27 9.85 1.74 .027 .199
3.0 Dorsal Attention condition 1, 27 12.78 1.94 .025 .175
3.0 Frontoparietal condition 1, 27 19.53 2.32 .044 .139
3.0 Limbic condition 1, 27 36.47 0.64 .010 .431
3.0 Somatomotor condition 1, 27 9.26 5.86 * .067 .023
3.0 Subcortical condition 1, 27 31.90 10.33 ** .110 .003
3.0 Ventral Attention condition 1, 27 17.48 3.01 + .050 .094
3.0 Visual condition 1, 27 6.10 6.04 * .042 .021
3.5 Default condition 1, 27 9.70 2.59 .039 .119
3.5 Dorsal Attention condition 1, 27 12.39 4.16 + .050 .051
3.5 Frontoparietal condition 1, 27 18.26 4.59 * .076 .041
3.5 Limbic condition 1, 27 37.49 1.31 .020 .262
3.5 Somatomotor condition 1, 27 9.83 7.78 ** .083 .010
3.5 Subcortical condition 1, 27 30.75 12.52 ** .124 .001
3.5 Ventral Attention condition 1, 27 18.37 4.26 * .074 .049
3.5 Visual condition 1, 27 5.71 9.59 ** .058 .005

Grouped by scale, condition, subject, age_cat and network:yeo

Age_cat:condition interaction in the limbic and subcortical system+

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "degree") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name,Age_cat) %>% summarise(meanDegree = mean(degree)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition',
## 'name'. You can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanDegree", data, within ="condition",between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default Age_cat 1, 26 5.35 0.02 <.001 .895
1.0 Default condition 1, 26 4.32 0.42 .007 .525
1.0 Default Age_cat:condition 1, 26 4.32 0.03 <.001 .870
1.0 Dorsal Attention Age_cat 1, 26 7.46 4.15 + .083 .052
1.0 Dorsal Attention condition 1, 26 5.78 0.02 <.001 .895
1.0 Dorsal Attention Age_cat:condition 1, 26 5.78 0.00 <.001 .966
1.0 Frontoparietal Age_cat 1, 26 9.58 0.65 .013 .429
1.0 Frontoparietal condition 1, 26 8.44 0.61 .011 .443
1.0 Frontoparietal Age_cat:condition 1, 26 8.44 1.44 .025 .240
1.0 Limbic Age_cat 1, 26 15.83 4.14 + .094 .052
1.0 Limbic condition 1, 26 8.51 0.88 .012 .356
1.0 Limbic Age_cat:condition 1, 26 8.51 5.27 * .066 .030
1.0 Somatomotor Age_cat 1, 26 5.92 1.77 .037 .195
1.0 Somatomotor condition 1, 26 4.57 3.94 + .062 .058
1.0 Somatomotor Age_cat:condition 1, 26 4.57 1.97 .032 .173
1.0 Subcortical Age_cat 1, 26 13.62 16.11 *** .268 <.001
1.0 Subcortical condition 1, 26 9.46 1.43 .022 .243
1.0 Subcortical Age_cat:condition 1, 26 9.46 4.36 * .064 .047
1.0 Ventral Attention Age_cat 1, 26 11.25 0.76 .017 .392
1.0 Ventral Attention condition 1, 26 7.33 0.11 .002 .744
1.0 Ventral Attention Age_cat:condition 1, 26 7.33 0.44 .007 .514
1.0 Visual Age_cat 1, 26 7.20 0.07 .002 .792
1.0 Visual condition 1, 26 5.19 0.22 .003 .647
1.0 Visual Age_cat:condition 1, 26 5.19 0.82 .013 .373
1.5 Default Age_cat 1, 26 8.13 0.01 <.001 .937
1.5 Default condition 1, 26 5.85 0.27 .004 .607
1.5 Default Age_cat:condition 1, 26 5.85 1.05 .017 .314
1.5 Dorsal Attention Age_cat 1, 26 11.76 3.99 + .078 .056
1.5 Dorsal Attention condition 1, 26 9.60 0.01 <.001 .920
1.5 Dorsal Attention Age_cat:condition 1, 26 9.60 0.04 <.001 .836
1.5 Frontoparietal Age_cat 1, 26 12.84 0.03 <.001 .861
1.5 Frontoparietal condition 1, 26 11.72 1.01 .018 .325
1.5 Frontoparietal Age_cat:condition 1, 26 11.72 2.36 .042 .136
1.5 Limbic Age_cat 1, 26 24.69 3.98 + .088 .056
1.5 Limbic condition 1, 26 14.35 0.13 .002 .722
1.5 Limbic Age_cat:condition 1, 26 14.35 5.86 * .077 .023
1.5 Somatomotor Age_cat 1, 26 9.05 1.45 .032 .240
1.5 Somatomotor condition 1, 26 6.34 3.85 + .058 .061
1.5 Somatomotor Age_cat:condition 1, 26 6.34 0.84 .013 .367
1.5 Subcortical Age_cat 1, 26 21.29 18.64 *** .287 <.001
1.5 Subcortical condition 1, 26 16.54 2.63 .042 .117
1.5 Subcortical Age_cat:condition 1, 26 16.54 4.88 * .076 .036
1.5 Ventral Attention Age_cat 1, 26 15.73 0.45 .010 .509
1.5 Ventral Attention condition 1, 26 11.65 0.53 .009 .473
1.5 Ventral Attention Age_cat:condition 1, 26 11.65 0.04 <.001 .836
1.5 Visual Age_cat 1, 26 13.30 0.02 <.001 .902
1.5 Visual condition 1, 26 7.49 0.23 .003 .636
1.5 Visual Age_cat:condition 1, 26 7.49 1.22 .017 .279
2.0 Default Age_cat 1, 26 9.76 0.03 <.001 .870
2.0 Default condition 1, 26 7.38 0.47 .008 .497
2.0 Default Age_cat:condition 1, 26 7.38 1.44 .023 .241
2.0 Dorsal Attention Age_cat 1, 26 16.87 2.98 + .064 .096
2.0 Dorsal Attention condition 1, 26 11.51 0.51 .008 .483
2.0 Dorsal Attention Age_cat:condition 1, 26 11.51 0.40 .006 .530
2.0 Frontoparietal Age_cat 1, 26 14.09 0.03 <.001 .855
2.0 Frontoparietal condition 1, 26 14.90 1.06 .021 .313
2.0 Frontoparietal Age_cat:condition 1, 26 14.90 1.42 .027 .245
2.0 Limbic Age_cat 1, 26 34.39 3.81 + .083 .062
2.0 Limbic condition 1, 26 21.12 0.01 <.001 .941
2.0 Limbic Age_cat:condition 1, 26 21.12 5.81 * .078 .023
2.0 Somatomotor Age_cat 1, 26 13.26 1.17 .027 .289
2.0 Somatomotor condition 1, 26 8.35 4.59 * .064 .042
2.0 Somatomotor Age_cat:condition 1, 26 8.35 0.41 .006 .526
2.0 Subcortical Age_cat 1, 26 29.92 20.14 *** .308 <.001
2.0 Subcortical condition 1, 26 22.17 4.98 * .075 .035
2.0 Subcortical Age_cat:condition 1, 26 22.17 3.55 + .055 .071
2.0 Ventral Attention Age_cat 1, 26 18.02 0.51 .010 .480
2.0 Ventral Attention condition 1, 26 15.67 1.22 .021 .280
2.0 Ventral Attention Age_cat:condition 1, 26 15.67 0.04 <.001 .837
2.0 Visual Age_cat 1, 26 17.98 0.07 .002 .787
2.0 Visual condition 1, 26 7.14 0.36 .004 .553
2.0 Visual Age_cat:condition 1, 26 7.14 1.65 .018 .211
2.5 Default Age_cat 1, 26 10.98 0.01 <.001 .937
2.5 Default condition 1, 26 9.18 0.96 .017 .335
2.5 Default Age_cat:condition 1, 26 9.18 1.94 .033 .175
2.5 Dorsal Attention Age_cat 1, 26 20.94 2.22 .051 .148
2.5 Dorsal Attention condition 1, 26 12.39 1.24 .017 .275
2.5 Dorsal Attention Age_cat:condition 1, 26 12.39 0.52 .007 .478
2.5 Frontoparietal Age_cat 1, 26 16.63 0.28 .005 .601
2.5 Frontoparietal condition 1, 26 18.64 1.36 .027 .254
2.5 Frontoparietal Age_cat:condition 1, 26 18.64 1.08 .021 .309
2.5 Limbic Age_cat 1, 26 41.32 3.64 + .077 .068
2.5 Limbic condition 1, 26 28.04 0.52 .008 .476
2.5 Limbic Age_cat:condition 1, 26 28.04 6.20 * .088 .020
2.5 Somatomotor Age_cat 1, 26 15.39 0.94 .022 .340
2.5 Somatomotor condition 1, 26 9.78 5.18 * .072 .031
2.5 Somatomotor Age_cat:condition 1, 26 9.78 0.14 .002 .714
2.5 Subcortical Age_cat 1, 26 33.79 23.15 *** .338 <.001
2.5 Subcortical condition 1, 26 25.00 8.04 ** .116 .009
2.5 Subcortical Age_cat:condition 1, 26 25.00 3.75 + .058 .064
2.5 Ventral Attention Age_cat 1, 26 19.14 0.57 .011 .458
2.5 Ventral Attention condition 1, 26 17.69 1.16 .021 .291
2.5 Ventral Attention Age_cat:condition 1, 26 17.69 0.27 .005 .605
2.5 Visual Age_cat 1, 26 22.15 0.09 .003 .773
2.5 Visual condition 1, 26 6.57 1.27 .011 .270
2.5 Visual Age_cat:condition 1, 26 6.57 1.35 .012 .256
3.0 Default Age_cat 1, 26 13.15 0.01 <.001 .935
3.0 Default condition 1, 26 9.42 2.11 .033 .158
3.0 Default Age_cat:condition 1, 26 9.42 2.25 .035 .146
3.0 Dorsal Attention Age_cat 1, 26 21.71 2.27 .053 .144
3.0 Dorsal Attention condition 1, 26 12.40 1.72 .024 .201
3.0 Dorsal Attention Age_cat:condition 1, 26 12.40 1.81 .025 .190
3.0 Frontoparietal Age_cat 1, 26 17.03 1.20 .021 .284
3.0 Frontoparietal condition 1, 26 19.85 2.44 .048 .131
3.0 Frontoparietal Age_cat:condition 1, 26 19.85 0.56 .012 .459
3.0 Limbic Age_cat 1, 26 45.32 2.46 .053 .129
3.0 Limbic condition 1, 26 31.85 1.02 .016 .321
3.0 Limbic Age_cat:condition 1, 26 31.85 4.92 * .072 .036
3.0 Somatomotor Age_cat 1, 26 18.98 0.65 .016 .427
3.0 Somatomotor condition 1, 26 9.60 5.55 * .067 .026
3.0 Somatomotor Age_cat:condition 1, 26 9.60 0.04 <.001 .852
3.0 Subcortical Age_cat 1, 26 36.21 23.67 *** .334 <.001
3.0 Subcortical condition 1, 26 29.53 10.28 ** .151 .004
3.0 Subcortical Age_cat:condition 1, 26 29.53 3.17 + .052 .087
3.0 Ventral Attention Age_cat 1, 26 19.79 0.22 .004 .646
3.0 Ventral Attention condition 1, 26 18.04 2.81 .049 .106
3.0 Ventral Attention Age_cat:condition 1, 26 18.04 0.16 .003 .689
3.0 Visual Age_cat 1, 26 25.89 0.25 .008 .621
3.0 Visual condition 1, 26 6.06 5.68 * .040 .025
3.0 Visual Age_cat:condition 1, 26 6.06 1.21 .009 .281
3.5 Default Age_cat 1, 26 13.90 0.16 .004 .695
3.5 Default condition 1, 26 9.46 2.95 + .044 .098
3.5 Default Age_cat:condition 1, 26 9.46 1.69 .026 .205
3.5 Dorsal Attention Age_cat 1, 26 23.12 2.00 .048 .169
3.5 Dorsal Attention condition 1, 26 11.98 3.88 + .048 .060
3.5 Dorsal Attention Age_cat:condition 1, 26 11.98 1.92 .025 .178
3.5 Frontoparietal Age_cat 1, 26 18.78 1.98 .037 .172
3.5 Frontoparietal condition 1, 26 18.74 4.63 * .082 .041
3.5 Frontoparietal Age_cat:condition 1, 26 18.74 0.32 .006 .576
3.5 Limbic Age_cat 1, 26 48.63 1.95 .043 .175
3.5 Limbic condition 1, 26 32.83 1.90 .029 .180
3.5 Limbic Age_cat:condition 1, 26 32.83 4.83 * .070 .037
3.5 Somatomotor Age_cat 1, 26 21.96 0.61 .016 .441
3.5 Somatomotor condition 1, 26 10.16 7.64 * .085 .010
3.5 Somatomotor Age_cat:condition 1, 26 10.16 0.14 .002 .712
3.5 Subcortical Age_cat 1, 26 36.96 25.26 *** .354 <.001
3.5 Subcortical condition 1, 26 28.68 12.47 ** .173 .002
3.5 Subcortical Age_cat:condition 1, 26 28.68 2.95 + .047 .098
3.5 Ventral Attention Age_cat 1, 26 18.36 0.17 .003 .680
3.5 Ventral Attention condition 1, 26 18.75 3.96 + .071 .057
3.5 Ventral Attention Age_cat:condition 1, 26 18.75 0.45 .009 .506
3.5 Visual Age_cat 1, 26 28.07 0.29 .009 .596
3.5 Visual condition 1, 26 5.72 9.10 ** .056 .006
3.5 Visual Age_cat:condition 1, 26 5.72 0.93 .006 .345

Betweenness centrality

Grouped by scale, condition, subject

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "bwc") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition) %>% summarise(meanBetweennessCentrality = mean(bwc)) -> data.aggr
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID'. You can override
## using the `.groups` argument.
grouped_ggwithinstats(
    data             = data.aggr,
  x                = condition,
  y                = meanBetweennessCentrality,
  grouping.var     = threshold,
  type             = "p",
  bf.message = FALSE,
  )

Grouped by scale, condition, subject and age_cat

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "bwc") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition, Age_cat) %>% summarise(meanBWC = mean(bwc)) -> data.aggr

data.aggr %>% ungroup() %>%
  nest_by(threshold) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanBWC", data, within ="condition", between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold Effect df MSE F ges p.value
1.0 Age_cat 1, 26 1209.77 0.01 <.001 .931
1.0 condition 1, 26 909.29 9.08 ** .130 .006
1.0 Age_cat:condition 1, 26 909.29 3.77 + .059 .063
1.5 Age_cat 1, 26 590.42 0.00 <.001 .944
1.5 condition 1, 26 513.43 11.82 ** .175 .002
1.5 Age_cat:condition 1, 26 513.43 3.62 + .061 .068
2.5 Age_cat 1, 26 480.92 0.04 <.001 .849
2.5 condition 1, 26 322.59 14.77 *** .186 <.001
2.5 Age_cat:condition 1, 26 322.59 3.32 + .049 .080
3.5 Age_cat 1, 26 483.53 0.04 <.001 .849
3.5 condition 1, 26 315.21 15.27 *** .188 <.001
3.5 Age_cat:condition 1, 26 315.21 3.53 + .051 .071
# aw <- aov_ez("Subj_ID", "meanDegree", data.aggr, within ="condition", between="Age_cat")
# p_an <- afex_plot(aw, x = "condition", trace = "Age_cat")  + ggtitle("test") +   theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm"))

# plot anovas

d_nested <- data.aggr %>% ungroup() %>%
  nest_by(threshold)

d_plots <- 
  d_nested %>% 
  mutate(aov = list(map(data,~aov_ez("Subj_ID", "meanBWC", data, within ="condition", between="Age_cat")))) %>%
  mutate(plot = list(map2(aov,threshold,~afex_plot(., x = "condition", trace = "Age_cat") +ggtitle(paste("threshold:",threshold)) + theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm")))))

d_plots$plot_one <- lapply(d_plots$plot, "[[", 1)

library(gridExtra)
do.call(grid.arrange, c(d_plots$plot_one))

Grouped by scale, condition, subject and network:yeo

Default and Frontoparietal+

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "bwc") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name) %>% summarise(meanBWC = mean(bwc)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition'. You
## can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanBWC", data, within ="condition")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default condition 1, 27 4657.14 6.00 * .104 .021
1.0 Dorsal Attention condition 1, 27 12002.45 2.65 .056 .115
1.0 Frontoparietal condition 1, 27 10844.95 8.19 ** .151 .008
1.0 Limbic condition 1, 27 8283.48 0.56 .008 .461
1.0 Somatomotor condition 1, 27 8102.06 0.00 <.001 .991
1.0 Subcortical condition 1, 27 16348.40 1.00 .019 .326
1.0 Ventral Attention condition 1, 27 13426.83 0.10 .002 .753
1.0 Visual condition 1, 27 6987.39 1.88 .027 .181
1.5 Default condition 1, 27 2675.67 4.26 * .079 .049
1.5 Dorsal Attention condition 1, 27 6663.04 3.91 + .092 .058
1.5 Frontoparietal condition 1, 27 5375.69 13.18 ** .207 .001
1.5 Limbic condition 1, 27 4435.07 2.09 .027 .160
1.5 Somatomotor condition 1, 27 3787.25 0.00 <.001 .959
1.5 Subcortical condition 1, 27 10490.56 0.55 .012 .464
1.5 Ventral Attention condition 1, 27 7095.02 0.02 <.001 .897
1.5 Visual condition 1, 27 4037.09 0.92 .014 .346
2.5 Default condition 1, 27 2025.69 4.52 * .083 .043
2.5 Dorsal Attention condition 1, 27 4936.37 3.39 + .072 .077
2.5 Frontoparietal condition 1, 27 4151.73 12.72 ** .188 .001
2.5 Limbic condition 1, 27 3547.96 1.88 .025 .182
2.5 Somatomotor condition 1, 27 2768.40 0.01 <.001 .907
2.5 Subcortical condition 1, 27 8405.06 0.60 .014 .444
2.5 Ventral Attention condition 1, 27 5306.54 0.01 <.001 .926
2.5 Visual condition 1, 27 3140.34 1.26 .019 .272
3.5 Default condition 1, 27 2005.79 4.52 * .083 .043
3.5 Dorsal Attention condition 1, 27 4958.19 3.40 + .072 .076
3.5 Frontoparietal condition 1, 27 4161.70 12.74 ** .190 .001
3.5 Limbic condition 1, 27 3513.38 1.86 .024 .184
3.5 Somatomotor condition 1, 27 2782.17 0.01 <.001 .904
3.5 Subcortical condition 1, 27 8146.44 0.53 .012 .473
3.5 Ventral Attention condition 1, 27 5276.93 0.01 <.001 .920
3.5 Visual condition 1, 27 3118.16 1.24 .019 .276

Grouped by scale, condition, subject, age_cat and network:yeo

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "bwc") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name,Age_cat) %>% summarise(meanBWC = mean(bwc)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition',
## 'name'. You can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanBWC", data, within ="condition",between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default Age_cat 1, 26 4144.09 1.87 .032 .183
1.0 Default condition 1, 26 4813.11 5.90 * .109 .022
1.0 Default Age_cat:condition 1, 26 4813.11 0.13 .003 .726
1.0 Dorsal Attention Age_cat 1, 26 7898.64 1.32 .022 .262
1.0 Dorsal Attention condition 1, 26 9770.08 2.58 .052 .120
1.0 Dorsal Attention Age_cat:condition 1, 26 9770.08 7.17 * .132 .013
1.0 Frontoparietal Age_cat 1, 26 7900.66 0.18 .003 .671
1.0 Frontoparietal condition 1, 26 10892.38 7.73 ** .147 .010
1.0 Frontoparietal Age_cat:condition 1, 26 10892.38 0.88 .019 .356
1.0 Limbic Age_cat 1, 26 13621.91 1.78 .040 .194
1.0 Limbic condition 1, 26 8574.02 0.51 .007 .482
1.0 Limbic Age_cat:condition 1, 26 8574.02 0.09 .001 .773
1.0 Somatomotor Age_cat 1, 26 8010.91 1.94 .035 .175
1.0 Somatomotor condition 1, 26 8403.85 0.00 <.001 .981
1.0 Somatomotor Age_cat:condition 1, 26 8403.85 0.03 <.001 .863
1.0 Subcortical Age_cat 1, 26 13893.59 2.06 .035 .163
1.0 Subcortical condition 1, 26 16167.92 0.85 .017 .365
1.0 Subcortical Age_cat:condition 1, 26 16167.92 1.30 .026 .264
1.0 Ventral Attention Age_cat 1, 26 11145.59 0.10 .002 .757
1.0 Ventral Attention condition 1, 26 13444.95 0.15 .003 .702
1.0 Ventral Attention Age_cat:condition 1, 26 13444.95 0.96 .020 .335
1.0 Visual Age_cat 1, 26 10714.94 0.69 .016 .415
1.0 Visual condition 1, 26 6734.80 1.67 .024 .207
1.0 Visual Age_cat:condition 1, 26 6734.80 2.01 .029 .168
1.5 Default Age_cat 1, 26 2115.42 2.24 .036 .146
1.5 Default condition 1, 26 2774.85 4.14 + .083 .052
1.5 Default Age_cat:condition 1, 26 2774.85 0.03 <.001 .853
1.5 Dorsal Attention Age_cat 1, 26 2818.19 1.91 .023 .179
1.5 Dorsal Attention condition 1, 26 6040.94 3.73 + .089 .064
1.5 Dorsal Attention Age_cat:condition 1, 26 6040.94 3.78 + .090 .063
1.5 Frontoparietal Age_cat 1, 26 4796.26 0.45 .008 .508
1.5 Frontoparietal condition 1, 26 5384.84 12.59 ** .204 .002
1.5 Frontoparietal Age_cat:condition 1, 26 5384.84 0.95 .019 .338
1.5 Limbic Age_cat 1, 26 7752.01 1.76 .041 .197
1.5 Limbic condition 1, 26 4398.31 1.87 .025 .183
1.5 Limbic Age_cat:condition 1, 26 4398.31 1.23 .017 .278
1.5 Somatomotor Age_cat 1, 26 4671.15 1.57 .032 .221
1.5 Somatomotor condition 1, 26 3902.01 0.01 <.001 .934
1.5 Somatomotor Age_cat:condition 1, 26 3902.01 0.21 .004 .654
1.5 Subcortical Age_cat 1, 26 7860.38 0.08 .001 .780
1.5 Subcortical condition 1, 26 10222.88 0.43 .009 .517
1.5 Subcortical Age_cat:condition 1, 26 10222.88 1.71 .036 .203
1.5 Ventral Attention Age_cat 1, 26 5826.12 0.50 .009 .485
1.5 Ventral Attention condition 1, 26 7048.02 0.00 <.001 .958
1.5 Ventral Attention Age_cat:condition 1, 26 7048.02 1.18 .024 .287
1.5 Visual Age_cat 1, 26 5789.67 0.54 .012 .470
1.5 Visual condition 1, 26 3978.66 0.77 .012 .388
1.5 Visual Age_cat:condition 1, 26 3978.66 1.40 .021 .248
2.5 Default Age_cat 1, 26 1713.41 1.52 .026 .229
2.5 Default condition 1, 26 2100.54 4.40 * .085 .046
2.5 Default Age_cat:condition 1, 26 2100.54 0.04 <.001 .847
2.5 Dorsal Attention Age_cat 1, 26 2826.53 2.86 .040 .103
2.5 Dorsal Attention condition 1, 26 4548.46 3.18 + .070 .086
2.5 Dorsal Attention Age_cat:condition 1, 26 4548.46 3.30 + .073 .081
2.5 Frontoparietal Age_cat 1, 26 4387.40 0.33 .006 .573
2.5 Frontoparietal condition 1, 26 4203.59 12.09 ** .185 .002
2.5 Frontoparietal Age_cat:condition 1, 26 4203.59 0.67 .012 .422
2.5 Limbic Age_cat 1, 26 5967.81 2.07 .048 .162
2.5 Limbic condition 1, 26 3533.63 1.68 .023 .207
2.5 Limbic Age_cat:condition 1, 26 3533.63 1.11 .016 .302
2.5 Somatomotor Age_cat 1, 26 3867.17 1.17 .025 .288
2.5 Somatomotor condition 1, 26 2867.75 0.01 <.001 .923
2.5 Somatomotor Age_cat:condition 1, 26 2867.75 0.06 .001 .801
2.5 Subcortical Age_cat 1, 26 5198.02 0.10 .001 .759
2.5 Subcortical condition 1, 26 8244.50 0.48 .011 .494
2.5 Subcortical Age_cat:condition 1, 26 8244.50 1.53 .035 .228
2.5 Ventral Attention Age_cat 1, 26 4921.42 0.64 .012 .431
2.5 Ventral Attention condition 1, 26 5350.31 0.00 <.001 .976
2.5 Ventral Attention Age_cat:condition 1, 26 5350.31 0.78 .015 .385
2.5 Visual Age_cat 1, 26 4299.43 0.72 .016 .403
2.5 Visual condition 1, 26 3081.72 1.08 .017 .308
2.5 Visual Age_cat:condition 1, 26 3081.72 1.51 .024 .230
3.5 Default Age_cat 1, 26 1686.68 1.55 .026 .224
3.5 Default condition 1, 26 2080.62 4.39 * .085 .046
3.5 Default Age_cat:condition 1, 26 2080.62 0.03 <.001 .866
3.5 Dorsal Attention Age_cat 1, 26 2830.84 2.88 .041 .102
3.5 Dorsal Attention condition 1, 26 4570.40 3.19 + .070 .086
3.5 Dorsal Attention Age_cat:condition 1, 26 4570.40 3.29 + .072 .081
3.5 Frontoparietal Age_cat 1, 26 4341.95 0.32 .006 .576
3.5 Frontoparietal condition 1, 26 4209.60 12.11 ** .187 .002
3.5 Frontoparietal Age_cat:condition 1, 26 4209.60 0.69 .013 .413
3.5 Limbic Age_cat 1, 26 5924.58 2.15 .049 .155
3.5 Limbic condition 1, 26 3497.30 1.65 .023 .210
3.5 Limbic Age_cat:condition 1, 26 3497.30 1.12 .016 .299
3.5 Somatomotor Age_cat 1, 26 3835.78 1.18 .025 .287
3.5 Somatomotor condition 1, 26 2880.72 0.01 <.001 .922
3.5 Somatomotor Age_cat:condition 1, 26 2880.72 0.08 .001 .785
3.5 Subcortical Age_cat 1, 26 5261.95 0.07 .001 .789
3.5 Subcortical condition 1, 26 7979.30 0.41 .010 .525
3.5 Subcortical Age_cat:condition 1, 26 7979.30 1.57 .035 .222
3.5 Ventral Attention Age_cat 1, 26 4928.03 0.64 .012 .432
3.5 Ventral Attention condition 1, 26 5318.94 0.00 <.001 .970
3.5 Ventral Attention Age_cat:condition 1, 26 5318.94 0.79 .015 .383
3.5 Visual Age_cat 1, 26 4295.87 0.71 .016 .406
3.5 Visual condition 1, 26 3057.38 1.06 .017 .312
3.5 Visual Age_cat:condition 1, 26 3057.38 1.54 .024 .226

Global efficiency

Grouped by scale, condition, subject

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "geff") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition) %>% summarise(meangeff = mean(geff)) -> data.aggr
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID'. You can override
## using the `.groups` argument.
grouped_ggwithinstats(
    data             = data.aggr,
  x                = condition,
  y                = meangeff,
  grouping.var     = threshold,
  type             = "p",
  bf.message = FALSE,
  )

Grouped by scale, condition, subject and age_cat

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "geff") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition, Age_cat) %>% summarise(meangeff = mean(geff)) -> data.aggr

data.aggr %>% ungroup() %>%
  nest_by(threshold) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meangeff", data, within ="condition", between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold Effect df MSE F ges p.value
1.0 Age_cat 1, 26 0.00 0.96 .030 .336
1.0 condition 1, 26 0.00 8.48 ** .051 .007
1.0 Age_cat:condition 1, 26 0.00 0.02 <.001 .892
1.5 Age_cat 1, 26 0.00 1.51 .046 .230
1.5 condition 1, 26 0.00 11.97 ** .075 .002
1.5 Age_cat:condition 1, 26 0.00 0.19 .001 .669
2.5 Age_cat 1, 26 0.00 1.64 .049 .211
2.5 condition 1, 26 0.00 11.46 ** .076 .002
2.5 Age_cat:condition 1, 26 0.00 0.35 .002 .562
3.5 Age_cat 1, 26 0.00 1.65 .049 .210
3.5 condition 1, 26 0.00 11.44 ** .076 .002
3.5 Age_cat:condition 1, 26 0.00 0.35 .003 .557
# aw <- aov_ez("Subj_ID", "meanDegree", data.aggr, within ="condition", between="Age_cat")
# p_an <- afex_plot(aw, x = "condition", trace = "Age_cat")  + ggtitle("test") +   theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm"))

# plot anovas

d_nested <- data.aggr %>% ungroup() %>%
  nest_by(threshold)

d_plots <- 
  d_nested %>% 
  mutate(aov = list(map(data,~aov_ez("Subj_ID", "meangeff", data, within ="condition", between="Age_cat")))) %>%
  mutate(plot = list(map2(aov,threshold,~afex_plot(., x = "condition", trace = "Age_cat") +ggtitle(paste("threshold:",threshold)) + theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm")))))

d_plots$plot_one <- lapply(d_plots$plot, "[[", 1)

library(gridExtra)
do.call(grid.arrange, c(d_plots$plot_one))

Grouped by scale, condition, subject and network:yeo

Need to be run in GraphVar!

Grouped by scale, condition, subject, age_cat and network:yeo

Need to be run in GraphVar first..

Local efficiency

Grouped by scale, condition, subject

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "leff") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition) %>% summarise(mean_leff = mean(leff)) -> data.aggr
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID'. You can override
## using the `.groups` argument.
grouped_ggwithinstats(
    data             = data.aggr,
  x                = condition,
  y                = mean_leff,
  grouping.var     = threshold,
  type             = "p",
  bf.message = FALSE,
  )

Grouped by scale, condition, subject and age_cat

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "leff") %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition, Age_cat) %>% summarise(meanleff = mean(leff)) -> data.aggr

data.aggr %>% ungroup() %>%
  nest_by(threshold) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanleff", data, within ="condition", between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold Effect df MSE F ges p.value
1.0 Age_cat 1, 26 0.00 0.02 <.001 .876
1.0 condition 1, 26 0.00 4.74 * .110 .039
1.0 Age_cat:condition 1, 26 0.00 0.08 .002 .777
1.5 Age_cat 1, 26 0.00 3.19 + .048 .086
1.5 condition 1, 26 0.00 1.11 .024 .303
1.5 Age_cat:condition 1, 26 0.00 0.00 <.001 .974
2.5 Age_cat 1, 26 0.00 0.32 .007 .574
2.5 condition 1, 26 0.00 2.21 .036 .149
2.5 Age_cat:condition 1, 26 0.00 0.20 .003 .658
3.5 Age_cat 1, 26 0.00 0.03 <.001 .855
3.5 condition 1, 26 0.00 2.65 .039 .116
3.5 Age_cat:condition 1, 26 0.00 0.04 <.001 .848
# aw <- aov_ez("Subj_ID", "meanDegree", data.aggr, within ="condition", between="Age_cat")
# p_an <- afex_plot(aw, x = "condition", trace = "Age_cat")  + ggtitle("test") +   theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm"))

# plot anovas

d_nested <- data.aggr %>% ungroup() %>%
  nest_by(threshold)

d_plots <- 
  d_nested %>% 
  mutate(aov = list(map(data,~aov_ez("Subj_ID", "meanleff", data, within ="condition", between="Age_cat")))) %>%
  mutate(plot = list(map2(aov,threshold,~afex_plot(., x = "condition", trace = "Age_cat") +ggtitle(paste("threshold:",threshold)) + theme(legend.position = c(0.87, 0.15),legend.key.size = unit(0.3, "cm")))))

d_plots$plot_one <- lapply(d_plots$plot, "[[", 1)

library(gridExtra)
do.call(grid.arrange, c(d_plots$plot_one))

Grouped by scale, condition, subject and network:yeo

Limbic+

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "leff") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name) %>% summarise(meanleff = mean(leff)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition'. You
## can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanleff", data, within ="condition")))) %>% select(-data) %>% unnest(Model) -> anova_summary

knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default condition 1, 27 0.00 0.85 .019 .364
1.0 Dorsal Attention condition 1, 27 0.00 0.10 .001 .755
1.0 Frontoparietal condition 1, 27 0.00 0.00 <.001 .974
1.0 Limbic condition 1, 27 0.00 4.75 * .069 .038
1.0 Somatomotor condition 1, 27 0.00 0.02 <.001 .889
1.0 Subcortical condition 1, 27 0.00 0.59 .010 .448
1.0 Ventral Attention condition 1, 27 0.00 3.18 + .046 .086
1.0 Visual condition 1, 27 0.00 1.29 .023 .267
1.5 Default condition 1, 27 0.00 0.00 <.001 >.999
1.5 Dorsal Attention condition 1, 27 0.00 0.00 <.001 .985
1.5 Frontoparietal condition 1, 27 0.00 0.03 <.001 .872
1.5 Limbic condition 1, 27 0.00 4.85 * .067 .036
1.5 Somatomotor condition 1, 27 0.00 0.42 .007 .523
1.5 Subcortical condition 1, 27 0.00 0.06 <.001 .812
1.5 Ventral Attention condition 1, 27 0.00 2.11 .029 .158
1.5 Visual condition 1, 27 0.00 0.22 .004 .645
2.5 Default condition 1, 27 0.00 0.02 <.001 .903
2.5 Dorsal Attention condition 1, 27 0.00 0.66 .010 .425
2.5 Frontoparietal condition 1, 27 0.00 0.14 .001 .714
2.5 Limbic condition 1, 27 0.00 11.69 ** .113 .002
2.5 Somatomotor condition 1, 27 0.00 0.33 .005 .572
2.5 Subcortical condition 1, 27 0.00 1.41 .021 .245
2.5 Ventral Attention condition 1, 27 0.00 0.37 .005 .548
2.5 Visual condition 1, 27 0.00 0.02 <.001 .897
3.5 Default condition 1, 27 0.00 0.15 .002 .700
3.5 Dorsal Attention condition 1, 27 0.00 0.82 .014 .372
3.5 Frontoparietal condition 1, 27 0.00 0.01 <.001 .905
3.5 Limbic condition 1, 27 0.00 7.78 ** .089 .010
3.5 Somatomotor condition 1, 27 0.00 0.63 .009 .434
3.5 Subcortical condition 1, 27 0.00 0.00 <.001 .957
3.5 Ventral Attention condition 1, 27 0.00 0.68 .009 .417
3.5 Visual condition 1, 27 0.00 0.08 .002 .786

Grouped by scale, condition, subject, age_cat and network:yeo

Age_cat:condition in the Limbic and Subcortical. Age_cat main effect in Frontoparietal?

data %>% pivot_longer(
    cols = starts_with("ROI"),
    names_to = "ROI",
    values_to = "leff") %>% left_join(.,network.combined) %>% left_join(.,variables_ext) %>% group_by(threshold,Subj_ID,condition,name,Age_cat) %>% summarise(meanleff = mean(leff)) -> data.aggr
## Joining, by = "ROI"
## Joining, by = "fileIndex"
## `summarise()` has grouped output by 'threshold', 'Subj_ID', 'condition',
## 'name'. You can override using the `.groups` argument.
data.aggr %>% ungroup() %>%
  nest_by(threshold,name) %>%
  mutate(Model = list(nice(aov_ez("Subj_ID", "meanleff", data, within ="condition",between="Age_cat")))) %>% select(-data) %>% unnest(Model) -> anova_summary
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
## Converting to factor: Age_cat
## Contrasts set to contr.sum for the following variables: Age_cat
knitr::kable(anova_summary)
threshold name Effect df MSE F ges p.value
1.0 Default Age_cat 1, 26 0.00 0.77 .011 .388
1.0 Default condition 1, 26 0.00 0.73 .017 .401
1.0 Default Age_cat:condition 1, 26 0.00 0.81 .019 .376
1.0 Dorsal Attention Age_cat 1, 26 0.00 1.39 .033 .249
1.0 Dorsal Attention condition 1, 26 0.00 0.14 .002 .716
1.0 Dorsal Attention Age_cat:condition 1, 26 0.00 0.61 .009 .442
1.0 Frontoparietal Age_cat 1, 26 0.00 1.56 .033 .223
1.0 Frontoparietal condition 1, 26 0.00 0.00 <.001 .993
1.0 Frontoparietal Age_cat:condition 1, 26 0.00 0.33 .005 .572
1.0 Limbic Age_cat 1, 26 0.00 0.02 <.001 .882
1.0 Limbic condition 1, 26 0.00 4.61 * .065 .041
1.0 Limbic Age_cat:condition 1, 26 0.00 3.97 + .056 .057
1.0 Somatomotor Age_cat 1, 26 0.00 1.13 .027 .298
1.0 Somatomotor condition 1, 26 0.00 0.05 <.001 .828
1.0 Somatomotor Age_cat:condition 1, 26 0.00 1.23 .017 .277
1.0 Subcortical Age_cat 1, 26 0.00 0.55 .012 .466
1.0 Subcortical condition 1, 26 0.00 1.01 .016 .325
1.0 Subcortical Age_cat:condition 1, 26 0.00 5.73 * .087 .024
1.0 Ventral Attention Age_cat 1, 26 0.00 0.03 <.001 .873
1.0 Ventral Attention condition 1, 26 0.00 3.09 + .046 .091
1.0 Ventral Attention Age_cat:condition 1, 26 0.00 0.02 <.001 .879
1.0 Visual Age_cat 1, 26 0.00 0.14 .003 .716
1.0 Visual condition 1, 26 0.00 1.61 .028 .216
1.0 Visual Age_cat:condition 1, 26 0.00 2.36 .041 .136
1.5 Default Age_cat 1, 26 0.00 1.12 .023 .300
1.5 Default condition 1, 26 0.00 0.00 <.001 .962
1.5 Default Age_cat:condition 1, 26 0.00 0.46 .008 .504
1.5 Dorsal Attention Age_cat 1, 26 0.00 1.18 .027 .287
1.5 Dorsal Attention condition 1, 26 0.00 0.02 <.001 .899
1.5 Dorsal Attention Age_cat:condition 1, 26 0.00 2.31 .034 .141
1.5 Frontoparietal Age_cat 1, 26 0.00 4.70 * .116 .040
1.5 Frontoparietal condition 1, 26 0.00 0.01 <.001 .916
1.5 Frontoparietal Age_cat:condition 1, 26 0.00 0.58 .006 .454
1.5 Limbic Age_cat 1, 26 0.00 0.88 .020 .357
1.5 Limbic condition 1, 26 0.00 4.54 * .065 .043
1.5 Limbic Age_cat:condition 1, 26 0.00 1.58 .023 .220
1.5 Somatomotor Age_cat 1, 26 0.00 0.47 .010 .501
1.5 Somatomotor condition 1, 26 0.00 0.31 .005 .581
1.5 Somatomotor Age_cat:condition 1, 26 0.00 1.76 .027 .196
1.5 Subcortical Age_cat 1, 26 0.00 3.05 + .063 .093
1.5 Subcortical condition 1, 26 0.00 0.10 .002 .759
1.5 Subcortical Age_cat:condition 1, 26 0.00 0.99 .016 .328
1.5 Ventral Attention Age_cat 1, 26 0.00 0.06 .001 .810
1.5 Ventral Attention condition 1, 26 0.00 2.08 .030 .161
1.5 Ventral Attention Age_cat:condition 1, 26 0.00 0.07 .001 .790
1.5 Visual Age_cat 1, 26 0.00 0.51 .010 .481
1.5 Visual condition 1, 26 0.00 0.30 .006 .590
1.5 Visual Age_cat:condition 1, 26 0.00 1.19 .022 .285
2.5 Default Age_cat 1, 26 0.00 0.01 <.001 .911
2.5 Default condition 1, 26 0.00 0.01 <.001 .909
2.5 Default Age_cat:condition 1, 26 0.00 0.00 <.001 .945
2.5 Dorsal Attention Age_cat 1, 26 0.00 0.17 .004 .681
2.5 Dorsal Attention condition 1, 26 0.00 0.55 .009 .465
2.5 Dorsal Attention Age_cat:condition 1, 26 0.00 0.75 .012 .393
2.5 Frontoparietal Age_cat 1, 26 0.00 3.45 + .086 .075
2.5 Frontoparietal condition 1, 26 0.00 0.26 .003 .615
2.5 Frontoparietal Age_cat:condition 1, 26 0.00 3.09 + .033 .091
2.5 Limbic Age_cat 1, 26 0.00 0.36 .010 .553
2.5 Limbic condition 1, 26 0.00 11.18 ** .111 .003
2.5 Limbic Age_cat:condition 1, 26 0.00 1.14 .013 .295
2.5 Somatomotor Age_cat 1, 26 0.00 1.16 .026 .290
2.5 Somatomotor condition 1, 26 0.00 0.23 .004 .633
2.5 Somatomotor Age_cat:condition 1, 26 0.00 1.81 .028 .191
2.5 Subcortical Age_cat 1, 26 0.00 2.02 .044 .167
2.5 Subcortical condition 1, 26 0.00 1.79 .027 .193
2.5 Subcortical Age_cat:condition 1, 26 0.00 2.66 .040 .115
2.5 Ventral Attention Age_cat 1, 26 0.00 0.17 .004 .684
2.5 Ventral Attention condition 1, 26 0.00 0.34 .005 .566
2.5 Ventral Attention Age_cat:condition 1, 26 0.00 0.05 <.001 .828
2.5 Visual Age_cat 1, 26 0.00 0.20 .003 .660
2.5 Visual condition 1, 26 0.00 0.05 .001 .825
2.5 Visual Age_cat:condition 1, 26 0.00 1.65 .035 .210
3.5 Default Age_cat 1, 26 0.00 0.69 .018 .414
3.5 Default condition 1, 26 0.00 0.12 .001 .729
3.5 Default Age_cat:condition 1, 26 0.00 0.21 .002 .649
3.5 Dorsal Attention Age_cat 1, 26 0.00 0.52 .011 .477
3.5 Dorsal Attention condition 1, 26 0.00 0.72 .013 .403
3.5 Dorsal Attention Age_cat:condition 1, 26 0.00 0.38 .007 .544
3.5 Frontoparietal Age_cat 1, 26 0.00 3.01 + .070 .094
3.5 Frontoparietal condition 1, 26 0.00 0.00 <.001 .988
3.5 Frontoparietal Age_cat:condition 1, 26 0.00 2.29 .030 .143
3.5 Limbic Age_cat 1, 26 0.00 1.19 .031 .285
3.5 Limbic condition 1, 26 0.00 7.96 ** .086 .009
3.5 Limbic Age_cat:condition 1, 26 0.00 4.99 * .056 .034
3.5 Somatomotor Age_cat 1, 26 0.00 1.61 .037 .216
3.5 Somatomotor condition 1, 26 0.00 0.49 .007 .489
3.5 Somatomotor Age_cat:condition 1, 26 0.00 2.38 .033 .135
3.5 Subcortical Age_cat 1, 26 0.00 3.23 + .073 .084
3.5 Subcortical condition 1, 26 0.00 0.05 <.001 .825
3.5 Subcortical Age_cat:condition 1, 26 0.00 5.38 * .070 .028
3.5 Ventral Attention Age_cat 1, 26 0.00 0.40 .010 .535
3.5 Ventral Attention condition 1, 26 0.00 0.66 .009 .424
3.5 Ventral Attention Age_cat:condition 1, 26 0.00 0.01 <.001 .932
3.5 Visual Age_cat 1, 26 0.00 0.63 .010 .433
3.5 Visual condition 1, 26 0.00 0.12 .003 .734
3.5 Visual Age_cat:condition 1, 26 0.00 0.96 .021 .335