Exclusion of participants
df %>%
filter(group == "DYS" | (group == "TD" & is.na(other_diagnoses))) %>%
filter(!startsWith(ID, "VER")) -> df
df %>%
mutate(
exclude = case_when(
ID == "VER02" ~ 1, # ADHD - university - DYS
ID == "VER04" ~ 1, # ADHD - university - DYS
ID == "MEN12" ~ 1, # discalculia - 3rd - TD
ID == "MEN18" ~ 1, # disgrafia, discalculia - 3rd - TD
ID == "MEN26" ~ 1, # disgrafia - 5th - TD,
ID == "LAE33" ~ 1, # disgrafia, disortografia, 3rd - TD,
### new exclusion criteria:
ID == "LAE38" ~ 1,
ID == "LC19" ~ 1,
ID == "MEN29" ~ 1,
ID == "MEN02" ~ 1,
ID == "MEN10" ~ 1,
ID == "LAE23" ~ 1,
# ID == "MEN35" ~ 1,
TRUE ~ 0
)
) %>%
filter(exclude == 0) %>%
# stricter crtiteria
# filter(group.exclusion != "PR") %>%
# less strict criteria
# filter(group == "DYS" | (group == "TD" & reading.score > -2)) %>%
filter(ID != "VER01" & ID != "VER03") %>%
dplyr::select(-exclude) -> df
Inferential Statistics
Total score
df %>%
mutate(age = scale(age), age = as.double(age)) %>%
mutate_if(is.character, as.factor) %>%
glm(formula = total ~ group + age,
family = "poisson") -> m1
|
Â
|
total
|
|
Predictors
|
Incidence Rate Ratios
|
CI
|
p
|
|
(Intercept)
|
28.57
|
26.64 – 30.59
|
<0.001
|
|
group [TD]
|
1.65
|
1.52 – 1.79
|
<0.001
|
|
age
|
1.08
|
1.04 – 1.12
|
<0.001
|
|
Observations
|
80
|
|
R2 Nagelkerke
|
0.866
|
LDT: Total score
|
Group
|
Estimate
|
SE
|
CI
|
|
DYS
|
28.57
|
0.04
|
26.66 - 30.61
|
|
TD
|
47.06
|
0.02
|
45.18 - 49.01
|
LDT: Total score
|
|
LR Chisq
|
Df
|
Pr(>Chisq)
|
|
group
|
153.47
|
1
|
0
|
|
age
|
17.83
|
1
|
0
|
|
AIC
|
AICc
|
BIC
|
R2_Nagelkerke
|
RMSE
|
Sigma
|
Score_log
|
Score_spherical
|
|
631.17
|
631.49
|
638.32
|
0.87
|
9.02
|
1
|
-3.91
|
0.09
|
Errors
df %>%
mutate_if(is.character, as.factor) %>%
mutate(age = scale(age), age = as.double(age)) %>%
glm(formula = errori ~ group * age,
family = "poisson") -> m2
|
Â
|
errori
|
|
Predictors
|
Incidence Rate Ratios
|
CI
|
p
|
|
(Intercept)
|
4.15
|
3.41 – 4.99
|
<0.001
|
|
group [TD]
|
0.41
|
0.31 – 0.55
|
<0.001
|
|
age
|
0.59
|
0.46 – 0.74
|
<0.001
|
|
group [TD] × age
|
1.69
|
1.23 – 2.32
|
0.001
|
|
Observations
|
80
|
|
R2 Nagelkerke
|
0.480
|
LDT: Errors
|
Group
|
Estimate
|
SE
|
CI
|
|
DYS
|
4.15
|
0.10
|
3.43 - 5.02
|
|
TD
|
1.70
|
0.11
|
1.37 - 2.11
|
LDT: Errors
|
|
LR Chisq
|
Df
|
Pr(>Chisq)
|
|
group
|
36.85
|
1
|
0.000
|
|
age
|
19.86
|
1
|
0.000
|
|
group:age
|
10.61
|
1
|
0.001
|
|
AIC
|
AICc
|
BIC
|
R2_Nagelkerke
|
RMSE
|
Sigma
|
Score_log
|
Score_spherical
|
|
351.98
|
352.51
|
361.51
|
0.48
|
2.38
|
1
|
-2.15
|
0.1
|
emtrends(m2, pairwise ~ group, var = "age", infer = T, adjust = "bonferroni")$emtrends %>%
as.data.frame() %>%
mutate(across(age.trend:z.ratio, ~round(.x, 2)),
p.value = round(p.value,3)) %>%
kable() %>% kable_styling()
|
group
|
age.trend
|
SE
|
df
|
asymp.LCL
|
asymp.UCL
|
z.ratio
|
p.value
|
|
DYS
|
-0.53
|
0.12
|
Inf
|
-0.77
|
-0.3
|
-4.41
|
0.000
|
|
TD
|
-0.01
|
0.11
|
Inf
|
-0.22
|
0.2
|
-0.06
|
0.952
|
Correct answers
df %>%
mutate_if(is.character, as.factor) %>%
mutate(age = scale(age), age = as.double(age)) %>%
glm(formula = successi ~ group * age,
family = "poisson") -> m3
|
Â
|
successi
|
|
Predictors
|
Incidence Rate Ratios
|
CI
|
p
|
|
(Intercept)
|
33.48
|
31.17 – 35.89
|
<0.001
|
|
group [TD]
|
1.46
|
1.35 – 1.58
|
<0.001
|
|
age
|
0.98
|
0.91 – 1.06
|
0.618
|
|
group [TD] × age
|
1.11
|
1.01 – 1.21
|
0.022
|
|
Observations
|
80
|
|
R2 Nagelkerke
|
0.788
|
LDT: Correct responses
|
Group
|
Estimate
|
SE
|
CI
|
|
DYS
|
33.48
|
0.04
|
31.2 - 35.92
|
|
TD
|
48.82
|
0.02
|
46.91 - 50.82
|
LDT: Correct responses
|
|
LR Chisq
|
Df
|
Pr(>Chisq)
|
|
group
|
89.26
|
1
|
0.000
|
|
age
|
0.25
|
1
|
0.618
|
|
group:age
|
5.21
|
1
|
0.022
|
|
AIC
|
AICc
|
BIC
|
R2_Nagelkerke
|
RMSE
|
Sigma
|
Score_log
|
Score_spherical
|
|
622.32
|
622.85
|
631.85
|
0.79
|
8.93
|
1
|
-3.84
|
0.1
|
emtrends(m3, pairwise ~ group, var = "age", infer = T, adjust = "bonferroni")$emtrends %>% as.data.frame() %>%
mutate(across(age.trend:z.ratio, ~round(.x, 2)),
p.value = round(p.value,3)) %>%
kable() %>% kable_styling()
|
group
|
age.trend
|
SE
|
df
|
asymp.LCL
|
asymp.UCL
|
z.ratio
|
p.value
|
|
DYS
|
-0.02
|
0.04
|
Inf
|
-0.10
|
0.06
|
-0.50
|
0.618
|
|
TD
|
0.08
|
0.02
|
Inf
|
0.04
|
0.12
|
4.12
|
0.000
|
Plots
