6  Quasi-experimental effects of physical fitness on reaction time in a Simon task

Code
using Pkg; Pkg.activate(".")

#using Arrow
using CairoMakie        # graphics back-end
using CategoricalArrays
using DataFrames
using MixedModels
using MixedModelsMakie  # diagnostic plots
using MixedModelsExtras # partial effects
using PrettyTables
using RCall             # call R from Julia
using Parquet
#using AlgebraOfGraphics
#using Chain
#using DataFrameMacros   # simplified dplyr-like data wrangling
#using Random            # random number generators
#using StatsModels
#using PGFPlotsX
#
#using AlgebraOfGraphics: boxplot
#using AlgebraOfGraphics: density

#using MixedModelsMakie: qqnorm
#using MixedModelsMakie: ridgeplot
#using MixedModelsMakie: scatter
#using MixedModelsMakie: caterpillar

CairoMakie.activate!(; type="png");

R"""
library(tidyverse)
suppressWarnings(suppressMessages(library(tidyverse)))
load(file="data/simon_raw.rda")
load(file="data/info.rda")
load(file="data/ages.rda")

cbPalette <- c( "#0072B2", "#D55E00", "#009E73", "#CC79A7",
                "#F0E442", "#56B4E9", "#999999", "#E69F00")

data <- info |> 
  select(Child, Time, gender) |> 
  left_join(ages |> 
              select(Child, Time, age)) |> 
  left_join(simon_raw) |> 
  subset(!is.na(RT)) |> 
  mutate(block = case_when(trialnumber %in% -5:0  ~ 0,
                           trialnumber %in%  1:20 ~ 1,
                           trialnumber %in% 21:40 ~ 2,
                           trialnumber %in% 41:60 ~ 3)) |> 
  unite(Condition, c(Colour, Side, Congruence), sep = "_", remove = FALSE)

dat <- data |> 
  subset(trialnumber > 0 & 
           Answer == "correct" & 
           between(RT, 500, 10000)) |> 
  mutate(speed=1000/RT)
""";

@rget dat;

contrasts = merge(
      Dict(:Congruence => EffectsCoding(base= "incon"; levels=["con", "incon"])),
      Dict(:Colour => EffectsCoding(base= "blue"; levels=["red", "blue"])),
      Dict(:Side => EffectsCoding(base= "left"; levels=["right", "left"])),
      Dict(:gender => EffectsCoding(base= "girl"; levels=["girl", "boy"])),
      Dict(nm => Grouping() for nm in (:Child, :School))
);

transform!(dat,
    :Child => categorical => :Child,
    :Time => categorical => :Time,
    :gender => categorical => :gender,
    :Condition  => categorical => :Condition,
    :Colour  => categorical => :Colour,
    :Side  => categorical => :Side,
    :Congruence  => categorical => :Congruence,
    :age => (x -> x .- 9.9) => :a1);

6.1 Introduction

Due to the unique data assessment in the SMaRTER study, where physical fitness information of children physical fitness deficits were obtained alongside a large quantity of executive function measurements in the Simon task. This data structure allowed for a detailed analysis approach which assessed how the different components of physical fitness might moderate Simon task reaction time. Further, as multiple assessments were available for each child, an approach assessing individual differences in these moderations was feasible. Accordingly, this chapter is concerned with the effects of EMOTIKON fitness tests on Simon task reaction time, further elucidating individual differences in these effects.

6.2 Statistical analysis

The central variable of this analysis is reaction time in the Simon task, where side (i.e., right or left side of the screen), colour (i.e., red or blue stimuli), or congruence (i.e., stimuli were on the same or opposite side of the correct answer button) of the stimulus were manipulated. Performance in 6 min run, 20 m sprint, star run, standing long jump, ball push test, and one leg balance were used as covariates. In addition, age of participants and gender were included as covariates. For details on pre-processing of physical fitness data, see Section 8.1.4 and for age data, see Section 8.1.2. As far as reaction times are concerned, only correct responses in the range of 500 to 10000 ms were taken into account. A Boxcox distribution analysis of reaction times (Box & Cox, 1964) suggested a reciprocal transformation to response speed [speed = 1000/reaction time] to obtain normally distributed model residuals (see Figure 6.1). There was a strong general trend in speed over time for congruence, side, and colour (see Figure 6.2).

Model fitting followed a parsimonious approach (Bates et al., 2018) and occurred in two steps. In the first model, the main effects congruence, side, and colour were included as fixed effects together with the covariates age and gender. Reliable fixed effects were entered into the individual random effects structure to account for variance between individuals. After selecting a model based on this specification, 6 min run, star run, 20 m sprint, standing long jump, ball push test, and one leg balance were added to the fixed effects. As with the base model, the reliable fixed effects were entered into the individual random effects structure to elucidate individual differences in the association between executive function and physical fitness components. Contrasts for congruence, side, colour, and gender were set using the ‘EffectsCoding’-command from the MixedModel package in Julia. Model diagnostics for the distribution of variance components in the random effect structure in the fitted models were based on qq and caterpillar-plots and are reported in the results.

Code
RCall.ijulia_setdevice(MIME("image/png"); width=10, height=5.0)

R"""
box <- lindia::gg_boxcox(lm(RT ~ 1 + Congruence + Side + Colour + Child, data = dat), showlambda = FALSE)
hist <- dat |> 
mutate(speed=1000/RT) |> 
ggplot(aes(x=speed)) +
geom_histogram(color = "black", fill = "grey", bins=30) + 
theme_bw()
ggsave("figs/c06/boxhist.png", gridExtra::grid.arrange(box,hist, ncol=2), height=4, width = 10)
""";

Figure 6.1: Box-Cox distribution of reaction time and histograms of reaction speed
Code
R"""
cbPalette <- c( "#0072B2", "#D55E00", "#009E73", "#CC79A7",
                "#F0E442", "#56B4E9", "#999999", "#E69F00")
simon <- dat |>
  group_by(Time, Colour, Side, Congruence, Condition) |>
  reframe(M = mean(speed), SD=sd(speed), N=n(), SE=SD/sqrt(N))

fig_speed <-
  simon |>
  ggplot(aes(x=Time, y=M, group=Condition, color=Colour)) +
      geom_point(size=2, aes(shape=Side), position=position_dodge(0.2)) +
      geom_line(size=0.7, aes(group=Condition, linetype=Congruence),position=position_dodge(0.2)) +
      geom_errorbar(aes(ymin=M-2*SE, ymax=M+2*SE), width=.1, linewidth=0.7,position=position_dodge(0.2)) +
      scale_color_manual("Colour", values=cbPalette[1:2]) +
      labs(x="Time", y="Response speed [1/s]") +
      theme_bw(base_size=13) + 
      theme(legend.position = "bottom")

ggsave("figs/c06/speedTime.png", print(fig_speed), height=4, width = 8)
""";

Figure 6.2: Development of response speed for main effects in the Simon task across all assessments

6.3 Simon Task

6.3.1 Model fitting

Model selection is documented in Section 9.1.1. The final model was fitted with congruence, side, colour, age, and gender as fixed effects and variance components for grand mean, congruence, side, colour, and age in the random effect structure for each child. Correlation parameters were estimated for age and the three experimental effects of congruence, side, and colour.

f2 = @formula(speed ~  1 + Congruence + Side + Colour + a1 + gender +
                       (1 + a1 + Congruence + Side + Colour | Child));
m2 = fit(MixedModel, f2, dat; contrasts);

6.3.2 Results

6.3.2.1 Fixed effects

The LMM for response speed in the Simon task revealed the expected effect of responding faster to congruent trials compared to incongruent ones (congruence: β = .029; SE = .003;z = 11.39; p < .001). Responses were also faster on the right than on the left side (side: β = -.005; SE = .002; z = -1.99; p = .046). The effect of colour was not significant. As for the covariates, reaction time increased significantly with age (age: β = .136; SE = .009; z = 15.59; p < .001) and boys showed a faster response speed compared to girls (gender: β = .04; SE = 0.016; z = 2.5; p = .012). The effects are shown in Figure 6.4 and reported in Table 6.1. Of note, depicting effects for side, across age and gender visualised a potential interaction for side and age. However, during the model selection process interactions between main effects with age and gender did not significantly improve the models fit and thus were not included in the final model. Means and standard deviation of included variables are displayed in Section 9.1.1.2.

Code
R"""
plot_m2_1 <- dat |>
  mutate(gender=ifelse(gender=="girl","girls","boys")) |>
  ggplot(aes(x=age, y=speed, color=gender)) +    
  geom_smooth(aes(group=interaction(Congruence, gender), linetype=Congruence), method = "lm", formula = 'y ~ x') +
  labs(y = "response speed [m/s]", x = "Age [years]") +
  scale_color_manual("Colour", values=cbPalette[3:4]) +
  labs(x="Time", y="Response speed [1/s]") +
  theme_bw(base_size=13) + 
  theme(legend.position = "bottom")

plot_m2_2 <- dat |>
  mutate(gender=ifelse(gender=="girl","girls","boys")) |>
  ggplot(aes(x=age, y=speed, color=gender)) +    
  geom_smooth(aes(group=interaction(Side, gender), linetype=Side), method = "lm", formula = 'y ~ x') +
  labs(y = "response speed [m/s]", x = "Age [years]") +
  scale_color_manual("Colour", values=cbPalette[3:4]) +
  labs(x="Time", y="Response speed [1/s]") +
  theme_bw(base_size=13) + 
  theme(legend.position = "bottom")

ggsave("figs/c06/fem2.png", gridExtra::grid.arrange(plot_m2_1, plot_m2_2, nrow =1), height=5, width = 10)
""";

Figure 6.3: Depiction of effects of Congruence, Side, age, and gender in Simon task reponse speed
Code
coefm2 = transform!(DataFrame(coeftable(m2)), 
              [:Name] .=> (x -> ifelse.(x .=="(Intercept)", "Grand mean", x)) .=> [:Name],
              [:z] .=> (x -> round.(x, digits=1)) .=> [:z],
              [:"Coef." :"Std. Error"] .=> (x -> round.(x, digits=3)) .=> [:Est :SE],
              [:"Pr(>|z|)"] .=> (x -> ifelse.(x .< 0.001, "<0.001", round.(x, digits=3))) .=> [:p]);

coefm2
pretty_table(select(coefm2, :Name, :Est, :SE, :z, :p), 
             header = (["Name","Est.","SE","z","p"]),
             alignment=[:l, :r, :r, :r, :r],
             backend = Val(:html))
Table 6.1: Fixed effects of the Simon Task main effects, age [a1], and gender
Name Est. SE z p
Grand mean 0.987 0.018 56.1 <0.001
Congruence: con 0.029 0.003 11.4 <0.001
Side: right -0.005 0.002 -2.0 0.046
Colour: red 0.005 0.003 1.7 0.096
a1 0.136 0.009 15.6 <0.001
gender: boy 0.04 0.016 2.5 0.012

6.3.2.2 Variance components and correlation parameters

Reliable individual differences were found for the three experimental effects. Moreover, some of them correlated with each other. Specifically, effects of colour and congruence correlated with r = -.41, meaning that children who were more affected by congruence being less affected by different colours. Colour and side effects correlated with r = -.58, meaning that children who exhibited a larger Colour effect tended to exhibit a smaller Side effect on their reaction speed. Note that there are significant correlation parameters associated with the colour effect, although the fixed effect of colour was not significant. This can be explained by the fact that individual differences in the colour effect cancelled each other out in the overall effect. Variance components and their correlations are reported in Table 6.2 and depicted in Figure 6.4.

Code
vcm2 = VarCorr(m2);
c = round.(vcm2.σρ.Child.ρ, digits = 3);
v = round.(values(vcm2.σρ.Child.σ), digits = 3);
sd = round.(abs2.(values(vcm2.σρ.Child.σ)), digits = 3);
n = keys(vcm2.σρ.Child.σ);
vcm2_tbl =DataFrame(Groups=["Child"," "," "," "," ","Residual"],
          Name=["Grand mean",n[2],n[3],n[4],n[5]," "],
          Var=[v[1],v[2],v[3],v[4],v[5],round.(vcm2.s, digits=3)],
          SD=[sd[1],sd[2],sd[3],sd[4],sd[5],round.(abs2.(vcm2.s), digits=3)],
          c1=[" ", c[1], c[2], c[3], c[4], " "],
          c2=[" ", " ",  c[5], c[6], c[7], " "],
          c3=[" ", " ",  " ",  c[8], c[9], " "],
          c4=[" ", " ",  " ",  " ",  c[10]," "]);
vcm2_tbl
pretty_table(vcm2_tbl, 
             header = (["Groups","Name","Var","SD","Corr"," "," "," ",]),
             alignment=[:l, :l, :r, :r, :r, :r, :r, :r],
             backend = Val(:html))
Table 6.2: Random effects of the Simon Task main effects and age [a1]
Groups Name Var SD Corr
Child Grand mean 0.15 0.023
a1 0.067 0.004 0.303
Congruence: con 0.016 0.0 0.019 0.14
Side: right 0.012 0.0 -0.093 0.197 -0.17
Colour: red 0.023 0.001 -0.386 0.132 -0.413 -0.576
Residual 0.24 0.058
Code
cms2 = raneftables(m2);   
cms2_Chld = DataFrame(cms2.Child);
@rput cms2_Chld;

R"""
plot_m2_3 <- cms2_Chld |> 
  ggplot(aes(x=`Congruence: con`, y=`Colour: red`)) +
  geom_point() +
  geom_smooth(method = "lm", formula = y ~ x, colour = "black", se = F) +
  xlab("congruence effect") +
  ylab("colour effect") +
  theme_bw()

plot_m2_4 <- cms2_Chld |> 
  ggplot(aes(x=`Side: right`, y=`Colour: red`)) +
  geom_point() +
  geom_smooth(method = "lm", formula = y ~ x, colour = "black", se = F) +
  xlab("side effect") +
  ylab("colour effect") +
  theme_bw()

ggsave("figs/c06/rem2.png", gridExtra::grid.arrange(plot_m2_3, plot_m2_4, nrow =1), height=3, width = 6)
""";

Figure 6.4: Visual depiction of correlations of individual Simon task variance components

6.3.2.3 Model performance

A qq-plot and qq-caterpillar-plot (see Figure 6.4) of the LMM showed no outliers in the model residuals and residuals of the random effect structure of Child.

Code
qqn_m2 = qqnorm(m2);
qqc_m2 = qqcaterpillar(m2);
display(qqn_m2)
display(qqc_m2)
(a) qq-plot
(b) qq-caterpillar-plot
CairoMakie.Screen{IMAGE}
(c)
Figure 6.5: Model diagnostics for m2

6.4 Simon Task x EMOTIKON

Using the previous LMM as a foundation, EMOTIKON Tests were included as fixed effects and as individual variance components.

Code
dat2 = DataFrame(read_parquet("data/emo.parquet"))
dat2 = select!(dat2, Not(:Score))
dat2 = unstack(dat2, :Test, :zScore)
dat2 = transform!(dat2,
    :Child => categorical => :Child,
    :Time => categorical => :Time);
dat2 = dat2[completecases(dat2), :];
Data = leftjoin(dat, dat2, on = [:Child, :Time]);
Data = Data[completecases(Data, :OLB_l), :];

6.4.1 Model fitting

The model selection process is documented in Section 9.1.2. The final LMM was fitted with Congruence, Side, Colour, age, gender, 6 min run, star run, and one leg balance test as fixed effects and with variance components for Grand Mean, Age, Congruence, Side, Colour, one leg balance, star run, and 6 min run in Child’s random effects structure.

f8  = @formula(speed ~ 1 + Congruence + Side + Colour + a1 + gender +
                           Run + Star_r + OLB_l +
                           (1 + a1 + Congruence + Side + Colour + Run + Star_r + OLB_l| Child));
m8 = fit(MixedModel, f8, Data; contrasts);

6.4.2 Results

6.4.2.1 Fixed effects

As reported above, the LMM revealed expected faster responses in the Simon task for congruent than incongruent trials (congruence: β = .029; SE = .003; z = 11.42; p < .001).
Effects of side and colour were not significant with EMOTIKON covariates in the model. As before, older children responded faster than younger children (age: β = .136; SE = .01; z = 11.77; p < .001).

The main interest was in effects of physical fitness test performances on response speed and their interactions with Simon task reaction speeds. None of these effects were significant (see Table 6.3).

However, we noticed that there was a negative association with

  • 6 min run (β = -.011; SE = .005; z = -2.37; p = .018), and positive association with
  • one leg balance (β = .013; SE = .003; z = 4.67; p < .001), and
  • star run (β = .023; SE = .005; z = 4.74; p < .001),

when the three tests were not included in the random effects for Child (see Section 9.1.2.1 for complete documentation). Means and standard deviation of included variables are displayed in Section 9.1.2.2.

Code
coefm8 = transform!(DataFrame(coeftable(m8)), 
              [:Name] .=> (x -> ifelse.(x .=="(Intercept)", "Grand mean", x)) .=> [:Name],
              [:z] .=> (x -> round.(x, digits=1)) .=> [:z],
              [:"Coef." :"Std. Error"] .=> (x -> round.(x, digits=3)) .=> [:Est :SE],
              [:"Pr(>|z|)"] .=> (x -> ifelse.(x .< 0.001, "<0.001", round.(x, digits=3))) .=> [:p]);
coefm8
pretty_table(select(coefm8, :Name, :Est, :SE, :z, :p), 
             header = (["Name","Est.","SE","z","p"]),
             alignment=[:l, :r, :r, :r, :r],
             backend = Val(:html))
Table 6.3: Fixed effects of the Simon Task main effects, 6 min run [Run], star run [Star_r], one leg balance [OLB_l], age [a1], and gender
Name Est. SE z p
Grand mean 1.009 0.029 35.3 <0.001
Congruence: con 0.029 0.003 11.4 <0.001
Side: right -0.004 0.002 -1.8 0.073
Colour: red 0.005 0.003 1.7 0.097
a1 0.136 0.012 11.8 <0.001
gender: boy 0.022 0.019 1.1 0.269
Run 0.004 0.02 0.2 0.86
Star_r 0.032 0.021 1.6 0.117
OLB_l -0.004 0.014 -0.3 0.773

6.4.2.2 Variance components and correlation parameters

There were individual differences in the effects of age, Colour, Side, and Congruence, and for performance in the three EMOTIKON tests (6 min run, star run, and one leg balance) on response speed in the Simon task. Correlation parameter of the previous model were replicated (with slightly larger magnitudes, see Figure 6.4). There were also a relevant positive correlation between the grand mean and 6 min run effects (r = .45), a negative correlation between effects of age and star run (r = -.4), and negative correlation between effects of 6 min run and star run (r = -.46). As shown in Figure 6.6, children with a higher 6 min run effect had faster reaction times. Children with a higher star run effect on response speed had a smaller age effect, and children with a higher 6 min run effect tended to have a lower star run effect on response speed. Variance components and their correlations are reported in Table 6.4.

Code
vcm8 = VarCorr(m8);
c = round.(vcm8.σρ.Child.ρ, digits = 3);
v = round.(values(vcm8.σρ.Child.σ), digits = 3);
se = round.(abs2.(values(vcm8.σρ.Child.σ)), digits = 3);
n = keys(vcm8.σρ.Child.σ);
vcm8_tbl =DataFrame(Groups=["Child"," "," "," "," "," "," "," ","Residual"],
          Name=["Grand mean",n[2],n[3],n[4],n[5],n[6],n[7],n[8]," "],
          Var=[v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],round.(vcm8.s, digits=3)],
          SE=[se[1],se[2],se[3],se[4],se[5],se[6],se[7],se[8],round.(abs2.(vcm8.s), digits=3)],
          c1=[" ", c[1], c[2], c[3], c[4], c[5], c[6], c[7], " "],
          c2=[" ", " ",  c[8], c[9], c[10],c[11],c[12],c[13]," "],
          c3=[" ", " ",  " ",  c[14],c[15],c[16],c[17],c[18]," "],
          c4=[" ", " ",  " ",  " ",  c[19],c[20],c[21],c[22]," "],
          c5=[" ", " ",  " ",  " ",  " ",  c[23],c[24],c[25]," "],
          c6=[" ", " ",  " ",  " ",  " ",  " ",  c[26],c[27]," "],
          c7=[" ", " ",  " ",  " ",  " ",  " ",  " ",  c[28]," "]);
vcm8_tbl
pretty_table(vcm8_tbl, 
             header = (["Groups","Name","Var","SE","Corr"," "," "," "," "," "," "]),
             alignment=[:l, :l, :r, :r, :r, :r, :r, :r, :r, :r, :r],
             backend = Val(:html))
Table 6.4: Random effects of the Simon Task main effects, 6 min run [Run], star run [Star_r], one leg balance [OLB_l], age [a1], and gender
Groups Name Var SE Corr
Child Grand mean 0.215 0.046
a1 0.077 0.006 0.08
Congruence: con 0.016 0.0 0.309 -0.112
Side: right 0.012 0.0 0.153 -0.407 0.147
Colour: red 0.024 0.001 -0.047 -0.661 -0.166 0.1
Run 0.147 0.022 -0.118 0.454 0.215 0.06 -0.226
Star_r 0.15 0.023 0.259 0.08 -0.398 -0.469 -0.107 -0.002
OLB_l 0.106 0.011 -0.071 0.23 0.073 -0.185 -0.051 -0.097 -0.16
Residual 0.233 0.054
Figure 6.6: Visual depiction of correlations of individual EMOTIOKON tests variance components

6.4.2.3 Model performance

A qq-plot and qq-caterpillar-plot (see Figure 6.7) of the LMM showed no outliers in the model residuals and residuals of the random effect structure of Child.

Code
qqn_m8 = qqnorm(m8);
qqc_m8 = qqcaterpillar(m8);
display(qqn_m8)
display(qqc_m8)
(a) qq-plot
(b) qq-caterpillar-plot
CairoMakie.Screen{IMAGE}
(c)
Figure 6.7: Model diagnostics for m8

6.5 Summary of results

6.5.1 Fixed effects

Assessing the interrelations of physical fitness and executive function in children with deficits in their physical fitness, the main findings of both LMMs were (1) consistent congruence effects, with faster responses in congruent trials compared to incongruent trials, (2) consistent age and gender effects, with reaction speed increasing with age and being faster in boys compared to girls, and (3) a significant side effects, with faster response speeds on the left side compared to the right

The LMMs including the EMOTIKON tests revealed (4) significant positive effects for one leg balance and star run performances and a significant negative effect for 6 min run performances on Simon task response speed, when individual differences in these tests were not accounted for.

6.5.2 Variance components and correlation parameter

Both LMMs revealed the Simon task main effects to be relevant individual variance components and further revealed (5) a negative correlation for colour and congruence effects, indicating that children who were more affected by the congruent condition were less affected by different colours in their response speed, and (6) a negative correlation for colour and side effects, indicating that children who’s Simon task speed was more affected by the side condition were less affected by different colours.

The LMM including EMOTIKON tests in the random effect structure of the children further showed 6 min run, star run, and one leg balance test to be relevant individual variance components and additionally showed (7) a positive correlation between grand mean and 6 min run effects, indicating children with a larger 6 min run effect had faster overall response speeds, (8) a negative correlation between star run and age effects, indicating that children with a larger star run effect had a smaller age effect, and (9) a negative correlation between 6 min run and star run effects, indicating that children with a larger 6 min run effect had a smaller star run effect.

6.6 Discussion

The significant effects for congruence, meaning faster response speeds for congruent compared to incongruent conditions, as well as overall improvements in response speed with age were consistent with current literature on Simon task performances in children (Davidson et al., 2006). A likely cause of congruence effects is the tendency to respond on the same side as the stimulus (Valle-Inclán, 1996), which is the dominant response that must be suppressed or inhibited to correctly identify incongruent stimuli (Bastian et al., 2016; Hilchey & Klein, 2011), causing a delay in response time. The improvement in reaction speed with age could be explained by growth- and maturity-related changes of physiological and psychological conditions that play a role in the Simon task, such as reaction to appearance of the stimulus with subsequent identification or execution of the respective motor response (Chan et al., 1991). Other aspects to consider are cultural and learning aspects associated with the task, such as increasing familiarity with a tablet, as well as learning from repeated test execution (Li et al., 2004).

Moreover, the first LMM showed effects for side and gender, with faster reaction times for boys compared to girls and for the left side compared to the right. As mentioned in Section 2.4.3, Simon task conditions were biased towards the left side (i.e., 40 left and 20 right), which may have biased children to pay more attention to the left side and thus achieving faster reaction speeds for stimuli appearing there. Another influence could result from general prevalences of right-handedness (Papadatou-Pastou et al., 2020) (handedness was not assessed in the SMaRTER study), as children may have covered parts of the right side of the screen with their right hand hovering above it in order to react quickly to presented stimuli. This could have shifted their attention more towards the left side. Interestingly, Figure 6.2 and Figure 6.3 show a possible interaction between side/colour and age, with a shift in side/colour occurring between t3 and t6, which frame the onset of the covid pandemic. However, since interactions were not included in the model, these results are not further discussed. In terms of gender, a study examining effects of different conditions of task switching using Simon task variations in 325 children aged 4 to 13 years found no gender differences for any conditions examined (Davidson et al., 2006). One possible reason for gendered differences found in this analysis might be a gendered upbringing where, for example, boys are more fixated on technical toys compared to girls (Todd et al., 2017). However, interpretation of gender differences in cognition must be done with caution, considering that the established field of gender neuroscience seems to be biased by the assumption of a “biological binary gender distribution” (Jordan-Young, 2010) and gender effects (as well as effects for side) did not remain significant when physical fitness components were entered into the model.

In both LMMs, correlations of individual variance components for colour and congruence effects as well as colour and side effects were negative. Since reaction speeds were faster for red as well as congruent stimuli, this correlation suggests that children who have slower reaction speeds in the incongruent condition (compared to the congruent condition) have faster reaction speeds for the blue stimulus (compared to the red stimulus). In other words, children who have greater cognitive flexibility (i.e., lower congruence effects) tend to have faster reaction times to red stimuli (i.e., larger colour effects). Studies have found faster reaction times for red stimuli compared to blue or grey stimuli across a range of cognitive assessments (Elliot, 2019; Elliot & Aarts, 2011), though they appear to vary depending on conditions like difficulty and type of cognitive task in which they were assessed (Elliot, 2019; Xia et al., 2016). Accordingly, since no significant main effect for colour was found in any of the models, this could imply that the colour effect might have been “overshadowed” or “swallowed” by the congruence effect. A similar dynamic could have caused the correlation of the individual variance components colour and side. However, this effect could also have been caused by the already mentioned skewness of the Simon task in favour of left stimuli.

Including 6 min run, star run, and one leg balance in the fixed effects revealed positive effects on reaction speed for star run and one leg balance performances and a negative effect of reaction speed for 6 min run performance. As star run and one leg balance are both tests placed in the coordinative domain of physical fitness, they are expected to involve cognitive aspect which might also have beneficial effects on reaction speed. Thus, the positive effect of star run and one leg balance performances on Simon task reaction speed are consistent with recent findings (Haverkamp et al., 2021; Marchetti et al., 2015; Niet et al., 2014). The negative effect of 6 min run performances on reaction speeds in the Simon task on the other hand were in the opposite direction than expected (Hillman et al., 2009; Kvalø et al., 2019; Niet et al., 2014). However, these fixed effects could not be replicated in a model in which individual variance of these tests was accounted for.

The inclusion of physical fitness tests as individual variance components revealed a positive correlation between overall reaction speed and 6 min run effects, showing that children who elicit greater 6 min run effects also tend to have faster overall reaction speeds. This could be explained by structural changes in the brain induced by higher levels of cardiorespiratory fitness associated with improvements in executive function (Chaddock et al., 2011, 2012; Chaddock-Heyman et al., 2014; Cotman et al., 2007, 2007; Hillman et al., 2008; Tyndall et al., 2018). It is also possible that faster reaction speed signifies enhanced executive functions that are associated with improved pacing, thereby linking better executive functions to improved 6 min run performance (Hyland-Monks et al., 2018). In addition, the direction could be moderated by the social environment, as environments that support physical activity or provide better access to increase cardiorespiratory fitness also provide better access to cognitive engagement (Brockman et al., 2009).

A negative correlation was found between star run and 6 min run effects on reaction speed, which means that children with a larger 6 min run effect are more likely to have a smaller star run effect and vice versa. This might suggest that there are different aspects associated with 6 min run or star run performances that promote executive function but might inhibit each other. Even if a trade-off may be possible between the above-mentioned neurophysiological changes associated with either cardiorespiratory fitness or coordinative aspects that are present in star run but not in 6 min run (such as improved cerebellar activation and excitability (Diedrichsen et al., 2007)), it seems unlikely that these aspects have mutually exclusive structure in their effect on reaction speed. Other possible explanation could therefore be that, on one hand, physiological changes associated with high physical activity and thus better 6 min run have a positive effect on executive functions (Hillman et al., 2005, 2009). While on the other hand, children with low levels of physical activity might be more likely to be invested in sedentary activities such as computer games, which are beneficial for development of executive functions (Nuyens et al., 2019). This is then positively related to faster reaction times in the Simon task as well as improved star run performance, but may show no connection to 6 min run performances or its effect on reaction speed. Another aspect to consider at this point is that the negative correlation between 6 min run and star run effects could be caused by covid pandemic-related changes in daily life, as habitual physical activity likely decreased and screen time increased during the last two assessments (Nagata et al., 2020; Schmidt et al., 2020, 2022). Note that these effects were not examined due to large dropouts in both assessments during the pandemic (see Section 2.6).

Similarly, these interdependencies may also account for the negative correlation between individual variance components found for age and star run effects on reaction speed, meaning that children with greater age-related improvements in reaction speed tend to have a smaller star run-related improvements. It should be noted that both age and star run have a positive effect on individual reaction speed and accordingly influence each other in magnitude rather than direction. Here too, changes in daily life associated with the covid pandemic may have negatively influenced the magnitude of 6 min run effects through reduced physical activity, while increased screen time may have promoted age-related improvements in the Simon task linked to familiarity with computer interfaces, as well as improved executive functions (Kovacs et al., 2022). Considering the impact of lockdown measures in the analysis, inferences should also be made about SARS-CoV-2 infections, especially in light of accumulating evidence linking SARS-CoV-2 infections and post-covid symptoms with cognitive impairments such as cognitive deficits, executive dysfunction, increased risk of seizures, and others (Hall et al., 2022; Taquet et al., 2022; Yea et al., 2023). Although these more severe impairments are comparatively rare in infected children, they suggest that SARS-CoV-2 infections could affect cognitive development in children. The decline in comprehensive testing for SARS-CoV-2 infections (MBJS, 2022a, 2022b) combined with the higher prevalence of asymptomatic infections in children (Ravindra et al., 2022) allows speculation about possible SARS-CoV-2-related cognitive shifts in youth populations. However, these effects are still unclear today and need to be clarified in future research.

Overall, these results underscore the relationship between physical fitness and executive function in children, as well as considerations of individual differences in these relationships. However, since comparable information is scarce, the question arises whether these correlations only exist in children with physical fitness deficits or whether they can be extrapolated to physically fit children. More specifically, how different aspects of physical fitness (e.g., different components and their levels) are related to children’s executive function, and how these relationships are associated with the lived environment and socioeconomic conditions.