Exclude participants
df %>%
filter(group == "DYS" | (group == "TD" & is.na(other_diagnoses))) %>%
mutate(ID = as.character(ID)) %>%
filter(!startsWith(ID, "VER")) -> df
# length(unique(df$ID)) 86
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
Statistic analysis
Accuracy
# Model accuracy
df %>% mutate_if(is.character, as.factor) %>%
mutate(age = scale(age), age = as.double(age),
accuracy = as.factor(accuracy),
frequency = log(frequency), frequency = as.double(frequency)) -> df
df %>% glmer(formula = accuracy ~
# group * condition +
group +
condition +
# name_school +
age * group +
(1 + condition|ID) + (1|item),
family = "binomial",
control = glmerControl(optimizer = "bobyqa")) -> m1
## test model
# drop1(m1, test = "Chisq")
Model accuracy
|
|
Chisq
|
Df
|
Pr(>Chisq)
|
|
(Intercept)
|
82.57
|
1
|
0.000
|
|
group
|
21.67
|
1
|
0.000
|
|
condition
|
0.12
|
1
|
0.728
|
|
age
|
5.12
|
1
|
0.024
|
|
group:age
|
3.30
|
1
|
0.069
|
|
group
|
emmean
|
SE
|
|
DYS
|
0.98
|
0.29
|
|
TD
|
0.99
|
0.27
|
|
group
|
age.trend
|
SE
|
df
|
asymp.LCL
|
asymp.UCL
|
z.ratio
|
p.value
|
|
DYS
|
0.48
|
0.21
|
Inf
|
0.06
|
0.89
|
2.26
|
0.024
|
|
TD
|
0.01
|
0.15
|
Inf
|
-0.29
|
0.30
|
0.04
|
0.967
|

RT
df %>%
# only correct answers
filter(accuracy == 1) %>%
mutate(rt = log(reaction_time)) -> df.model
# model
df.model %>%
lmer(formula =
rt ~
group * condition +
# group +
age +
(1 + condition|ID) + (1|item)) -> m2
### test
#drop1(m2, test = "Chisq")
# Anova(m2, type = "III")
Model RT
|
|
Chisq
|
Df
|
Pr(>Chisq)
|
|
(Intercept)
|
19686.84
|
1
|
0.000
|
|
group
|
56.46
|
1
|
0.000
|
|
condition
|
22.15
|
1
|
0.000
|
|
age
|
0.24
|
1
|
0.624
|
|
group:condition
|
5.14
|
1
|
0.023
|
|
contrast
|
group
|
estimate
|
SE
|
df
|
z.ratio
|
p.value
|
|
nonword - real
|
DYS
|
0.24
|
0.05
|
Inf
|
4.71
|
0.000
|
|
nonword - real
|
TD
|
0.13
|
0.04
|
Inf
|
3.01
|
0.003
|

Plot

LexITA total score
- Variable
tot.lexita comparable to LexTALE:
tot.yes.words - 2* tot.yes.nonwords
|
Group
|
Accuracy (M)
|
sd
|
range
|
|
DYS
|
52.69
|
8.05
|
17
|
|
DYS
|
52.69
|
8.05
|
60
|
|
TD
|
57.06
|
2.01
|
48
|
|
TD
|
57.06
|
2.01
|
60
|
### Model accuracy
df1 %>%
mutate_if(is.character, as.factor) %>%
## add + 2 to avoid negative values and use glm()
mutate(age = scale(age),
age = as.double(age)) %>%
glm(formula = tot.lexita ~ group * age, family = poisson(link = "log")) -> m3
|
Â
|
tot lexita
|
|
Predictors
|
Incidence Rate Ratios
|
CI
|
p
|
|
(Intercept)
|
50.98
|
48.09 – 53.98
|
<0.001
|
|
group [TD]
|
1.12
|
1.05 – 1.20
|
0.001
|
|
age
|
1.08
|
1.01 – 1.15
|
0.018
|
|
group [TD] × age
|
0.93
|
0.86 – 1.00
|
0.041
|
|
Observations
|
80
|
|
R2 Nagelkerke
|
0.288
|
LDT: Correct responses
|
Group
|
Estimate
|
SE
|
CI
|
|
DYS
|
50.98
|
0.03
|
48.12 - 54.02
|
|
TD
|
57.06
|
0.02
|
54.97 - 59.23
|
LDT: Correct responses
|
|
LR Chisq
|
Df
|
Pr(>Chisq)
|
|
group
|
10.49
|
1
|
0.001
|
|
age
|
5.65
|
1
|
0.017
|
|
group:age
|
4.18
|
1
|
0.041
|
|
AIC
|
AICc
|
BIC
|
R2_Nagelkerke
|
RMSE
|
Sigma
|
Score_log
|
Score_spherical
|
|
517.06
|
517.59
|
526.58
|
0.29
|
4.67
|
1
|
-3.18
|
0.11
|
emtrends(m3, pairwise ~ group, var = "age", adjust = "bonferroni", infer = T)$emtrends %>% summary() %>% as.data.frame() %>%
mutate(across(age.trend:p.value, ~round(.x,3))) %>%
kable() %>% kable_styling()
|
group
|
age.trend
|
SE
|
df
|
asymp.LCL
|
asymp.UCL
|
z.ratio
|
p.value
|
|
DYS
|
0.075
|
0.031
|
Inf
|
0.013
|
0.137
|
2.375
|
0.018
|
|
TD
|
0.000
|
0.018
|
Inf
|
-0.036
|
0.036
|
0.018
|
0.986
|
