Abstract

This eye-tracking study examines how heritage speakers of Spanish process gender agreement morphology at a distance, focusing on the activation of the gender feature while reading sentences. The work of Keating (2022, 2024) is conceptually replicated and further extended by assessing whether reduced sensitivity to gender agreement violations when another word intervenes between the head noun and its modifying adjective stems from weakened gender feature activation, and whether a gender-marked determiner enhances this activation. 53 English-dominant heritage speakers of Spanish, and a comparison group of 32 Spanish-dominant monolingually raised speakers read sentences with and without gender agreement violations while their eye movements were monitored. Sentences contained violations in adjectives modified by the intensifier “muy” under two conditions: a no-cue condition (e.g., árboles muy altos/* altas) and a cue condition with a gender-marked determiner (e.g., unos árboles muy altos/*altas). 5 measures of reading time in the adjective (first-fixation, gaze duration, rereading, go-past time, and total time), are analyzed.

Participants

Participants are devided by schooling modality and Age of Onset of Bilingualism (Onset of English).

Schooling:

# Participants information

participant_tracking_hsg <-read_excel('participant_tracking_hsg.xlsx')

# Grouped summary
excluded_ids <- c("HS008", "HS009", "HS019", "HS053", "HS043") 

#HS008, HS009 and HS043 discarded due to low proficiency. HS019 discarded due to technical issues. HS053 was not able to do eye tracking part 

summary_participants <- participant_tracking_hsg %>%
  filter(!subjectid %in% excluded_ids) %>%
  group_by(group) %>%
  summarise(
    count = n(),
    mean_proficiency = mean(proficiency, na.rm = TRUE),
    sd_proficiency = sd(proficiency, na.rm = TRUE),
    proficiency_range = paste0(min(proficiency, na.rm = TRUE), "–", max(proficiency, na.rm = TRUE)),
    mean_dominance = mean(dominance, na.rm = TRUE),
    sd_dominance = sd(dominance, na.rm = TRUE),
    mean_aob_spanish = mean(aob_spanish, na.rm = TRUE),
    mean_aob_english = mean(aob_english, na.rm = TRUE)
  )


table(
  participant_tracking_hsg %>%
    filter(!subjectid %in% excluded_ids) %>%
    select(group, school_modality)
)
##              school_modality
## group         dual_elementary dual_high_school dual_middle english_only
##   heritage                 16                2           1           16
##   nonheritage               0                0           0            0
##              school_modality
## group         esl_elementary spanish_interrupted spanish_only
##   heritage                17                   1            0
##   nonheritage              0                   0           32

AOB:

# Step 1: Filter heritage group
heritage_only <- participant_tracking_hsg %>%
  filter(group == "heritage")

# Step 2: Create cohorts based on aob_english
heritage_only <- heritage_only %>%
  filter(!subjectid %in% excluded_ids) %>%
  mutate(english_cohort = case_when(
    aob_english >= 0 & aob_english <= 3 ~ "0-3",
    aob_english >= 4 & aob_english <= 6 ~ "4-6",
    aob_english >= 7 & aob_english <= 15 ~ "> 7",
    TRUE ~ NA_character_  # catch any values outside the expected range
  ))

# Step 3: Summarize per cohort
cohort_summary <- heritage_only %>%
  group_by(english_cohort) %>%
  summarise(
    count = n(),
    mean_proficiency = mean(proficiency, na.rm = TRUE),
    sd_proficiency = sd(proficiency, na.rm = TRUE),
    mean_dominance = mean(dominance, na.rm = TRUE),
    sd_dominance = sd(dominance, na.rm = TRUE)
  )

# View the summary
cohort_summary
## # A tibble: 3 × 6
##   english_cohort count mean_proficiency sd_proficiency mean_dominance
##   <chr>          <int>            <dbl>          <dbl>          <dbl>
## 1 0-3               18             41.6           4.80           38.1
## 2 4-6               22             41.7           4.00           25.6
## 3 > 7               13             40.4           5.06           26.1
## # ℹ 1 more variable: sd_dominance <dbl>

Visualizations on proficiency (measured by the DELE) and dominance (measured by BLP) are presented below

ggplot(participant_tracking_hsg %>% filter(!subjectid %in% excluded_ids), 
       aes(x = group, y = proficiency, fill = group)) +
  geom_boxplot() +
  labs(title = "Proficiency by Group", x = "Group", y = "Proficiency") +
  scale_x_discrete(labels = c("heritage" = "Heritage", "nonheritage" = "Comparison Group")) +
  scale_fill_grey(start = 0.4, end = 0.8) +
  theme_minimal()

ggplot(participant_tracking_hsg %>% filter(!subjectid %in% excluded_ids), 
       aes(x = group, y = dominance, fill = group)) +
  geom_boxplot() +
  labs(title = "Dominance by Group", x = "Group", y = "Dominance Score") +
  scale_x_discrete(labels = c("heritage" = "Heritage", "nonheritage" = "Comparison Group")) +
  scale_fill_grey(start = 0.4, end = 0.8) +
  theme_minimal()

Now, let’s prepare the reading data.

Data Viewer merged fixations shorter than 80 ms with a neighboring fixation that measured at least 80 ms if the two were located within 1° of visual angle. The remaining fixations that were <80ms or >800 ms, were discarded. This affected 8.2% of the data (2648 single fixations out of 32292 total fixations). Windorization was applied to the raw data for each measure by group and condition for values 3 SDs greater than respective group means. That is, these values were trimmed to the cutoff (mean) value. This affected 1.48% of data in all conditions/measures (1866 out of 126552 data points). Skips accounted for 6.18% of data loss (no cue: 59 out of 946; cue: 58 out of 948 = 117 out of 1894). Incorrect gender assignment accounted for 1.28% or trials (No cue: 12 trials out of 846; cue: 11 trials out of 948; 23 trials out of 1794 = 1.28%). 84.34% of the data remained. Log transformation was applied to each reading measure to avoid positive skew.

Let’s prepare the data:

#define soubgroups by AOB (monolingually-raised fall under >10)
hsg_winsorized_cleaned <-read_excel('hsg_winsorized_cleaned.xlsx')


hsg_winsorized_cleaned$group <- with(hsg_winsorized_cleaned, case_when(
  aob_english <= 3 ~ "0-3",
  aob_english >= 4 & aob_english <= 6 ~ "4-6",
  aob_english >= 7 & aob_english <= 10 ~ "7-9",
  aob_english > 10 ~ ">10"
))

hsg_winsorized_cleaned$group <- factor(hsg_winsorized_cleaned$group,
                                       levels = c("0-3", "4-6", "7-9", ">10"))
#participant counts per sobgroup
hsg_winsorized_cleaned %>%
  group_by(group) %>%
  summarise(n_participants = n_distinct(subjectid))
## # A tibble: 4 × 2
##   group n_participants
##   <fct>          <int>
## 1 0-3               19
## 2 4-6               22
## 3 7-9               13
## 4 >10               32

No Cue Condition Visualizations

### First Fixation Duration:
ffd_by_nocue <- hsg_winsorized_cleaned %>% 
  filter(condition == "no_cue", IA_ID == 6) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_FIRST_FIXATION_DURATION, na.rm = TRUE),
    sd = sd(IA_FIRST_FIXATION_DURATION, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(ffd_by_nocue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      150  232.  94.3  7.70 15.2 
## 2 0-3   mismatch   148  247. 101.   8.33 16.5 
## 3 4-6   match      166  216.  93.3  7.24 14.3 
## 4 4-6   mismatch   171  228.  76.8  5.87 11.6 
## 5 7-9   match      101  224.  83.9  8.35 16.6 
## 6 7-9   mismatch   103  217.  81.7  8.05 16.0 
## 7 >10   match      256  195.  77.9  4.87  9.59
## 8 >10   mismatch   255  218.  80.2  5.02  9.89
ggplot(ffd_by_nocue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "First Fixation Duration by Group and Grammaticality",
       x = "AOB",
       y = "Mean First Fixation Duration (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Gaze Duration
frdt_by_nocue <- hsg_winsorized_cleaned %>% 
  filter(condition == "no_cue", IA_ID == 6) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_FIRST_RUN_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_FIRST_RUN_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(frdt_by_nocue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      150  300.  148. 12.1   23.9
## 2 0-3   mismatch   148  319.  142. 11.6   23.0
## 3 4-6   match      166  272.  136. 10.6   20.9
## 4 4-6   mismatch   171  303.  153. 11.7   23.2
## 5 7-9   match      101  301.  158. 15.8   31.3
## 6 7-9   mismatch   103  276.  151. 14.9   29.6
## 7 >10   match      256  238.  123.  7.71  15.2
## 8 >10   mismatch   255  264.  128.  8.03  15.8
ggplot(frdt_by_nocue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "Gaze Duration by Group and Grammaticality",
       x = "AOB",
       y = "Mean Gaze Duration (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Total (Dwell) Time:
tdt_by_nocue <- hsg_winsorized_cleaned %>% 
  filter(condition == "no_cue", IA_ID == 6) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(tdt_by_nocue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      150  460.  279.  22.8  45.0
## 2 0-3   mismatch   148  506.  278.  22.9  45.2
## 3 4-6   match      166  394.  255.  19.8  39.0
## 4 4-6   mismatch   171  568.  355.  27.2  53.6
## 5 7-9   match      101  473.  321.  31.9  63.3
## 6 7-9   mismatch   103  447.  262.  25.8  51.2
## 7 >10   match      256  321.  187.  11.7  23.0
## 8 >10   mismatch   255  479.  304.  19.0  37.5
ggplot(tdt_by_nocue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "Total Dwell Time by Group and Grammaticality",
       x = "AOB",
       y = "Mean Total Dwell Time (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Regression Path Duration (Go-Past):
rpd_by_nocue <- hsg_winsorized_cleaned %>% 
  filter(condition == "no_cue", IA_ID == 6) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_REGRESSION_PATH_DURATION, na.rm = TRUE),
    sd = sd(IA_REGRESSION_PATH_DURATION, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(rpd_by_nocue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      150  408.  334.  27.3  53.9
## 2 0-3   mismatch   148  428.  342.  28.1  55.5
## 3 4-6   match      166  348.  271.  21.1  41.6
## 4 4-6   mismatch   171  443.  371.  28.4  56.0
## 5 7-9   match      101  436.  334.  33.2  65.8
## 6 7-9   mismatch   103  400.  297.  29.2  58.0
## 7 >10   match      256  313.  269.  16.8  33.1
## 8 >10   mismatch   255  407.  316.  19.8  38.9
ggplot(rpd_by_nocue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 4,
            color = "white",
            size = 3) +
  labs(title = "Go-Past by Group and Grammaticality",
       x = "AOB",
       y = "Mean Regression Path Duration (Go-Past) (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Rereading
rr_by_nocue <- hsg_winsorized_cleaned %>% 
  filter(condition == "no_cue", IA_ID == 6) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_SECOND_RUN_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_SECOND_RUN_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(rr_by_nocue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      150 114.   158. 12.9   25.5
## 2 0-3   mismatch   148 121.   159. 13.1   25.8
## 3 4-6   match      166  96.7  143. 11.1   21.8
## 4 4-6   mismatch   171 170.   174. 13.3   26.3
## 5 7-9   match      101 107.   160. 15.9   31.6
## 6 7-9   mismatch   103 122.   140. 13.8   27.3
## 7 >10   match      256  71.5  115.  7.21  14.2
## 8 >10   mismatch   255 139.   164. 10.3   20.3
ggplot(rr_by_nocue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 4,
            color = "white",
            size = 3) +
  labs(title = "Rereading Time by Group and Grammaticality",
       x = "AOB",
       y = "Mean Rereading Time (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

Cue Condition

#Cue Condition Visualizations
### First Fixation Duration:
ffd_by_cue <- hsg_winsorized_cleaned %>% 
  filter(condition == "cue", IA_ID == 7) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_FIRST_FIXATION_DURATION, na.rm = TRUE),
    sd = sd(IA_FIRST_FIXATION_DURATION, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(ffd_by_cue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      148  235.  98.9  8.13 16.1 
## 2 0-3   mismatch   150  219.  95.1  7.76 15.3 
## 3 4-6   match      165  227.  93.2  7.26 14.3 
## 4 4-6   mismatch   169  231.  79.7  6.13 12.1 
## 5 7-9   match      102  214.  83.7  8.28 16.4 
## 6 7-9   mismatch   103  240.  78.5  7.74 15.4 
## 7 >10   match      255  210.  72.5  4.54  8.94
## 8 >10   mismatch   256  216.  80.7  5.04  9.93
ggplot(ffd_by_cue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "First Fixation Duration by Group and Grammaticality",
       x = "AOB",
       y = "Mean First Fixation Duration (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Gaze Duration
frdt_by_cue <- hsg_winsorized_cleaned %>% 
  filter(condition == "cue", IA_ID == 7) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_FIRST_RUN_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_FIRST_RUN_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(frdt_by_cue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      148  293.  145. 11.9   23.6
## 2 0-3   mismatch   150  307.  178. 14.6   28.8
## 3 4-6   match      165  283.  128.  9.98  19.7
## 4 4-6   mismatch   169  296.  143. 11.0   21.7
## 5 7-9   match      102  274.  139. 13.7   27.2
## 6 7-9   mismatch   103  300.  118. 11.7   23.1
## 7 >10   match      255  244.  107.  6.68  13.2
## 8 >10   mismatch   256  258.  110.  6.89  13.6
ggplot(frdt_by_cue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "Gaze Duration by Group and Grammaticality",
       x = "AOB",
       y = "Mean Gaze Duration (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Total (Dwell) Time:
tdt_by_cue <- hsg_winsorized_cleaned %>% 
  filter(condition == "cue", IA_ID == 7) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(tdt_by_cue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      148  428.  263.  21.6  42.7
## 2 0-3   mismatch   150  530.  359.  29.3  57.9
## 3 4-6   match      165  382.  206.  16.0  31.6
## 4 4-6   mismatch   169  548.  339.  26.0  51.4
## 5 7-9   match      102  424.  283.  28.0  55.5
## 6 7-9   mismatch   103  563.  288.  28.4  56.3
## 7 >10   match      255  358.  208.  13.0  25.7
## 8 >10   mismatch   256  507.  315.  19.7  38.7
ggplot(tdt_by_cue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 3,
            color = "white",
            size = 3) +
  labs(title = "Total Dwell Time by Group and Grammaticality",
       x = "AOB",
       y = "Mean Total Dwell Time (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Regression Path Duration (Go-Past):
rpd_by_cue <- hsg_winsorized_cleaned %>% 
  filter(condition == "cue", IA_ID == 7) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_REGRESSION_PATH_DURATION, na.rm = TRUE),
    sd = sd(IA_REGRESSION_PATH_DURATION, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(rpd_by_cue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      148  408.  346.  28.5  56.3
## 2 0-3   mismatch   150  442.  412.  33.6  66.5
## 3 4-6   match      165  358.  294.  22.9  45.1
## 4 4-6   mismatch   169  453.  426.  32.7  64.6
## 5 7-9   match      102  363.  288.  28.5  56.5
## 6 7-9   mismatch   103  493.  339.  33.4  66.3
## 7 >10   match      255  332.  249.  15.6  30.7
## 8 >10   mismatch   256  424.  378.  23.6  46.5
ggplot(rpd_by_cue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 4,
            color = "white",
            size = 3) +
  labs(title = "Go-Past by Group and Grammaticality",
       x = "AOB",
       y = "Mean Regression Path Duration (Go-Past) (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

### Rereading
rr_by_cue <- hsg_winsorized_cleaned %>% 
  filter(condition == "cue", IA_ID == 7) %>% 
  group_by(group, match) %>% 
  summarise(
    n = n(),
    mean = mean(IA_SECOND_RUN_DWELL_TIME, na.rm = TRUE),
    sd = sd(IA_SECOND_RUN_DWELL_TIME, na.rm = TRUE)
  ) %>% 
  mutate(
    se = sd / sqrt(n),
    ci = se * qt((1 - 0.05) / 2 + 0.5, n - 1)
  )
## `summarise()` has grouped output by 'group'. You can override using the
## `.groups` argument.
print(rr_by_cue)
## # A tibble: 8 × 7
## # Groups:   group [4]
##   group match        n  mean    sd    se    ci
##   <fct> <chr>    <int> <dbl> <dbl> <dbl> <dbl>
## 1 0-3   match      148 111.   152. 12.5   24.7
## 2 0-3   mismatch   150 144.   165. 13.4   26.6
## 3 4-6   match      165  81.4  123.  9.58  18.9
## 4 4-6   mismatch   169 160.   163. 12.5   24.8
## 5 7-9   match      102  96.8  139. 13.8   27.4
## 6 7-9   mismatch   103 161.   178. 17.6   34.9
## 7 >10   match      255  87.2  130.  8.12  16.0
## 8 >10   mismatch   256 153.   151.  9.44  18.6
ggplot(rr_by_cue, aes(x = group, y = mean, fill = match)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9), color = "black") +
  geom_errorbar(aes(ymin = mean - ci, ymax = mean + ci),
                position = position_dodge(0.9), width = 0.2) +
  geom_text(aes(label = paste0(round(mean, 1), "\n(", round(sd, 1), ")")),
            position = position_dodge(width = 0.9),
            vjust = 4,
            color = "white",
            size = 3) +
  labs(title = "Rereading Time by Group and Grammaticality",
       x = "AOB",
       y = "Mean Rereading Time (ms)",
       fill = "Grammaticality") +
  scale_fill_grey(start = 0.3, end = 0.8) +
  theme_minimal(base_size = 14)

RQ1: To what extent is sensitivity to gender agreement violations delayed when processing adjectives that appear distant from the head noun by heritage and nonheritage speakers of Spanish? Does AOB play a role?

RQ1 conceptually replicates the nonadjacent condition in Keating’s (2022; 2025) experiment, in which gender agreement violations in adjectives occur when a word in-tervenes between a noun and its modifying adjective (e.g., árboles muy altos/*altas). We examined the time course of grammaticality processing at the adjective region by ana-lyzing reading measures associated with early (First Fixation, Gaze Duration) and late (Go-Past, Rereading, Total Time) stages of morphosyntactic processing. Consistent with Keating (2022; 2025), we expect weaker sensitivity to gender agreement violations in both HSs and Spanish-dominant controls in early measures. AOB is not expected to modulate sensitivity in this condition, but proficiency is expected to have an effect in later measures.

hsg_winsorized_cleaned$group <- factor(
  hsg_winsorized_cleaned$group,
  levels = c("0-3", "4-6", "7-9", ">10")  # Ensure correct order
)

contrasts(hsg_winsorized_cleaned$group) <- contr.helmert(4)[, 3:1]

print(contrasts(hsg_winsorized_cleaned$group))
##     [,1] [,2] [,3]
## 0-3   -1   -1   -1
## 4-6   -1   -1    1
## 7-9   -1    2    0
## >10    3    0    0
hsg_winsorized_cleaned$trial_order_c <- scale(hsg_winsorized_cleaned$Trial_Index_, center = TRUE, scale = FALSE)
hsg_winsorized_cleaned$adj_length_c <- scale(hsg_winsorized_cleaned$length, center = TRUE, scale = FALSE)
hsg_winsorized_cleaned$proficiency_c <- scale(hsg_winsorized_cleaned$proficiency, center = TRUE, scale = FALSE)


# Base filtering by condition and IA_ID
no_cue_data <- hsg_winsorized_cleaned %>%
  filter(condition == "no_cue", IA_ID == 6)

# First Fixation Duration (FFD)
log_ffd_data <- no_cue_data %>%
  filter(IA_FIRST_FIXATION_DURATION > 0) %>%
  mutate(log_ffd = as.numeric(log(IA_FIRST_FIXATION_DURATION)))

# Gaze Duration (First Run Dwell Time)
log_gaze_data <- no_cue_data %>%
  filter(IA_FIRST_RUN_DWELL_TIME > 0) %>%
  mutate(log_gaze = as.numeric(log(IA_FIRST_RUN_DWELL_TIME)))

# Total Dwell Time
log_total_data <- no_cue_data %>%
  filter(IA_DWELL_TIME > 0) %>%
  mutate(log_total = as.numeric(log(IA_DWELL_TIME)))

# Go-Past Time (Regression Path Duration)
log_gp_data <- no_cue_data %>%
  filter(IA_REGRESSION_PATH_DURATION > 0) %>%
  mutate(log_gp = as.numeric(log(IA_REGRESSION_PATH_DURATION)))

# Rereading Time (Second Run Dwell Time)
log_rr_data <- no_cue_data %>%
  filter(IA_SECOND_RUN_DWELL_TIME > 0) %>%
  mutate(log_rr = as.numeric(log(IA_SECOND_RUN_DWELL_TIME)))


# Check group × match distribution
table(no_cue_data$group, no_cue_data$match)
##      
##       match mismatch
##   0-3   150      148
##   4-6   166      171
##   7-9   101      103
##   >10   256      255
#Model building for FFD
m1_nocue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_ffd_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -4.9e+00
#(Best Model)
m2_nocue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_ffd_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -9.3e+01
m3_nocue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_ffd_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -1.3e+03
m4_nocue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_ffd_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))

anova(m1_nocue_ffd, m2_nocue_ffd, m3_nocue_ffd, m4_nocue_ffd)
## Data: log_ffd_data
## Models:
## m4_nocue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_nocue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_nocue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_nocue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##              npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)    
## m4_nocue_ffd   21 769.93 878.70 -363.97   727.93                          
## m3_nocue_ffd   23 799.61 918.73 -376.81   753.61  0.0000  2  1.0000000    
## m2_nocue_ffd   25 802.40 931.89 -376.20   752.40  1.2058  2  0.5472131    
## m1_nocue_ffd   37 791.76 983.39 -358.88   717.76 34.6444 12  0.0005334 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m2_nocue_ffd)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match | item)
##    Data: log_ffd_data
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    802.4    931.9   -376.2    752.4     1287 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.04461 -0.64526 -0.02846  0.63318  2.88875 
## 
## Random effects:
##  Groups    Name          Variance Std.Dev. Corr
##  subjectid (Intercept)   0.000000 0.00000      
##            matchmismatch 0.010057 0.10029   NaN
##  item      (Intercept)   0.000000 0.00000      
##            matchmismatch 0.001793 0.04235   NaN
##  Residual                0.099279 0.31509      
## Number of obs: 1312, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.340e+00  2.270e-02  1.057e+03 235.232
## matchmismatch                       2.060e-02  3.508e-02  9.548e+01   0.587
## group1                             -1.483e-02  1.584e-02  1.097e+03  -0.936
## group2                              1.377e-02  1.444e-02  1.094e+03   0.954
## group3                              4.002e-03  2.038e-02  1.093e+03   0.196
## proficiency_c                      -8.006e-03  4.247e-03  1.096e+03  -1.885
## trial_order_c                       5.166e-04  2.446e-04  1.173e+03   2.112
## adj_length_c                        7.258e-03  8.788e-03  2.259e+02   0.826
## matchmismatch:group1                1.846e-02  2.660e-02  9.428e+01   0.694
## matchmismatch:group2               -2.400e-02  2.409e-02  9.340e+01  -0.996
## matchmismatch:group3               -1.119e-02  3.349e-02  9.245e+01  -0.334
## matchmismatch:proficiency_c        -1.130e-03  7.048e-03  9.398e+01  -0.160
## group1:proficiency_c                1.132e-03  3.484e-03  1.097e+03   0.325
## group2:proficiency_c                2.034e-03  2.571e-03  1.095e+03   0.791
## group3:proficiency_c                7.590e-03  3.955e-03  1.094e+03   1.919
## matchmismatch:group1:proficiency_c -3.001e-04  5.831e-03  9.475e+01  -0.051
## matchmismatch:group2:proficiency_c  2.769e-03  4.219e-03  9.411e+01   0.656
## matchmismatch:group3:proficiency_c -2.811e-03  6.477e-03  9.638e+01  -0.434
##                                    Pr(>|t|)    
## (Intercept)                          <2e-16 ***
## matchmismatch                        0.5584    
## group1                               0.3494    
## group2                               0.3404    
## group3                               0.8444    
## proficiency_c                        0.0597 .  
## trial_order_c                        0.0349 *  
## adj_length_c                         0.4098    
## matchmismatch:group1                 0.4893    
## matchmismatch:group2                 0.3216    
## matchmismatch:group3                 0.7390    
## matchmismatch:proficiency_c          0.8730    
## group1:proficiency_c                 0.7453    
## group2:proficiency_c                 0.4291    
## group3:proficiency_c                 0.0552 .  
## matchmismatch:group1:proficiency_c   0.9591    
## matchmismatch:group2:proficiency_c   0.5133    
## matchmismatch:group3:proficiency_c   0.6653    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m2_nocue_ffd, parm = "beta_", method = "Wald")
##                                            2.5 %       97.5 %
## (Intercept)                         5.295429e+00 5.3844137962
## matchmismatch                      -4.815333e-02 0.0893611597
## group1                             -4.587164e-02 0.0162144411
## group2                             -1.452831e-02 0.0420714215
## group3                             -3.594796e-02 0.0439514445
## proficiency_c                      -1.632839e-02 0.0003174414
## trial_order_c                       3.727641e-05 0.0009959969
## adj_length_c                       -9.966832e-03 0.0244818958
## matchmismatch:group1               -3.367656e-02 0.0706055305
## matchmismatch:group2               -7.120959e-02 0.0232101079
## matchmismatch:group3               -7.683248e-02 0.0544500719
## matchmismatch:proficiency_c        -1.494442e-02 0.0126848981
## group1:proficiency_c               -5.695688e-03 0.0079598125
## group2:proficiency_c               -3.005172e-03 0.0070730058
## group3:proficiency_c               -1.620999e-04 0.0153423427
## matchmismatch:group1:proficiency_c -1.172823e-02 0.0111280118
## matchmismatch:group2:proficiency_c -5.500557e-03 0.0110375886
## matchmismatch:group3:proficiency_c -1.550527e-02 0.0098835396
#Model building for Gaze Duration
m1_nocue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_gaze_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(Best Model)
m2_nocue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_gaze_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m3_nocue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_gaze_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -1.2e+03
m4_nocue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_gaze_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


anova(m1_nocue_gaze, m2_nocue_gaze, m3_nocue_gaze, m4_nocue_gaze)
## Data: log_gaze_data
## Models:
## m4_nocue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_nocue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_nocue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_nocue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##               npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)    
## m4_nocue_gaze   21 1450.2 1559.0 -704.10   1408.2                          
## m3_nocue_gaze   23 1493.4 1612.5 -723.70   1447.4  0.0000  2     1.0000    
## m2_nocue_gaze   25 1456.8 1586.3 -703.42   1406.8 40.5637  2  1.555e-09 ***
## m1_nocue_gaze   37 1475.5 1667.1 -700.73   1401.5  5.3641 12     0.9447    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m2_nocue_gaze)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match | item)
##    Data: log_gaze_data
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1456.8   1586.3   -703.4   1406.8     1287 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.94350 -0.69679 -0.01918  0.66121  2.85735 
## 
## Random effects:
##  Groups    Name          Variance  Std.Dev. Corr 
##  subjectid (Intercept)   1.762e-02 0.13274       
##            matchmismatch 4.584e-05 0.00677  1.00 
##  item      (Intercept)   3.364e-03 0.05800       
##            matchmismatch 2.347e-02 0.15320  -0.99
##  Residual                1.556e-01 0.39440       
## Number of obs: 1312, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.484e+00  3.974e-02  9.371e+01 138.009
## matchmismatch                       4.546e-02  4.158e-02  2.079e+02   1.093
## group1                             -2.972e-02  2.720e-02  9.090e+01  -1.093
## group2                              2.484e-02  2.485e-02  9.173e+01   0.999
## group3                             -1.320e-02  3.473e-02  9.268e+01  -0.380
## proficiency_c                      -8.468e-03  7.245e-03  9.238e+01  -1.169
## trial_order_c                       3.731e-05  3.095e-04  1.254e+03   0.121
## adj_length_c                        6.037e-02  1.364e-02  6.420e+01   4.426
## matchmismatch:group1                3.558e-02  2.853e-02  1.151e+03   1.247
## matchmismatch:group2               -4.115e-02  2.594e-02  1.174e+03  -1.586
## matchmismatch:group3                2.090e-03  3.579e-02  1.148e+03   0.058
## matchmismatch:proficiency_c        -2.180e-03  7.540e-03  1.140e+03  -0.289
## group1:proficiency_c                7.871e-05  5.974e-03  9.195e+01   0.013
## group2:proficiency_c                3.605e-03  4.374e-03  9.482e+01   0.824
## group3:proficiency_c                5.459e-03  6.688e-03  9.614e+01   0.816
## matchmismatch:group1:proficiency_c -5.493e-03  6.262e-03  1.155e+03  -0.877
## matchmismatch:group2:proficiency_c -2.608e-03  4.530e-03  1.162e+03  -0.576
## matchmismatch:group3:proficiency_c  3.266e-03  6.949e-03  1.147e+03   0.470
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                         0.275    
## group1                                0.277    
## group2                                0.320    
## group3                                0.705    
## proficiency_c                         0.246    
## trial_order_c                         0.904    
## adj_length_c                        3.8e-05 ***
## matchmismatch:group1                  0.213    
## matchmismatch:group2                  0.113    
## matchmismatch:group3                  0.953    
## matchmismatch:proficiency_c           0.773    
## group1:proficiency_c                  0.990    
## group2:proficiency_c                  0.412    
## group3:proficiency_c                  0.416    
## matchmismatch:group1:proficiency_c    0.381    
## matchmismatch:group2:proficiency_c    0.565    
## matchmismatch:group3:proficiency_c    0.638    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m2_nocue_gaze, parm = "beta_", method = "Wald")
##                                           2.5 %       97.5 %
## (Intercept)                         5.406591738 5.5623695091
## matchmismatch                      -0.036032184 0.1269537717
## group1                             -0.083034654 0.0235956188
## group2                             -0.023876602 0.0735490668
## group3                             -0.081263914 0.0548684338
## proficiency_c                      -0.022668755 0.0057327922
## trial_order_c                      -0.000569211 0.0006438402
## adj_length_c                        0.033633611 0.0870967998
## matchmismatch:group1               -0.020331808 0.0915007661
## matchmismatch:group2               -0.091988586 0.0096970641
## matchmismatch:group3               -0.068060005 0.0722395253
## matchmismatch:proficiency_c        -0.016956893 0.0125977833
## group1:proficiency_c               -0.011629918 0.0117873365
## group2:proficiency_c               -0.004968275 0.0121775207
## group3:proficiency_c               -0.007649605 0.0185670665
## matchmismatch:group1:proficiency_c -0.017765311 0.0067801202
## matchmismatch:group2:proficiency_c -0.011485760 0.0062700877
## matchmismatch:group3:proficiency_c -0.010353162 0.0168856865
#Model building for Total Time (total Dwell Time)

m1_nocue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_total_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 2 negative eigenvalues: -1.4e-01
## -1.0e+01
m2_nocue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_total_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -2.7e-05
#(Best Model)
m3_nocue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_total_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m4_nocue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_total_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


anova(m1_nocue_total, m2_nocue_total, m3_nocue_total, m4_nocue_total)
## Data: log_total_data
## Models:
## m4_nocue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_nocue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_nocue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_nocue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##                npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)  
## m4_nocue_total   21 2138.3 2247.0 -1048.1   2096.3                       
## m3_nocue_total   23 2135.4 2254.6 -1044.7   2089.4 6.8265  2    0.03293 *
## m2_nocue_total   25 2134.9 2264.3 -1042.4   2084.9 4.5792  2    0.10131  
## m1_nocue_total   37 2152.9 2344.5 -1039.4   2078.9 5.9872 12    0.91672  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m3_nocue_total)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 | item)
##    Data: log_total_data
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2135.4   2254.6  -1044.7   2089.4     1289 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.92065 -0.68740  0.02304  0.67581  2.62499 
## 
## Random effects:
##  Groups    Name          Variance Std.Dev. Corr
##  subjectid (Intercept)   0.024578 0.15678      
##            matchmismatch 0.007885 0.08880  1.00
##  item      (Intercept)   0.004044 0.06359      
##  Residual                0.261844 0.51171      
## Number of obs: 1312, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.789e+00  4.849e-02  1.090e+02 119.383
## matchmismatch                       2.110e-01  5.245e-02  1.926e+02   4.024
## group1                             -2.517e-02  3.382e-02  9.984e+01  -0.744
## group2                              8.836e-03  3.088e-02  1.008e+02   0.286
## group3                             -5.674e-02  4.321e-02  1.022e+02  -1.313
## proficiency_c                      -2.361e-02  9.014e-03  1.017e+02  -2.619
## trial_order_c                      -1.060e-03  4.005e-04  1.256e+03  -2.647
## adj_length_c                        7.384e-02  1.559e-02  6.149e+01   4.735
## matchmismatch:group1                1.342e-02  3.888e-02  2.726e+02   0.345
## matchmismatch:group2               -4.226e-02  3.525e-02  2.741e+02  -1.199
## matchmismatch:group3                1.299e-01  4.886e-02  2.691e+02   2.659
## matchmismatch:proficiency_c         2.999e-02  1.029e-02  2.707e+02   2.914
## group1:proficiency_c               -6.011e-04  7.427e-03  1.010e+02  -0.081
## group2:proficiency_c               -4.018e-03  5.444e-03  1.045e+02  -0.738
## group3:proficiency_c               -2.256e-04  8.329e-03  1.062e+02  -0.027
## matchmismatch:group1:proficiency_c -4.958e-03  8.527e-03  2.746e+02  -0.581
## matchmismatch:group2:proficiency_c  1.064e-03  6.167e-03  2.737e+02   0.172
## matchmismatch:group3:proficiency_c  2.304e-02  9.473e-03  2.802e+02   2.432
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                      8.23e-05 ***
## group1                              0.45851    
## group2                              0.77538    
## group3                              0.19208    
## proficiency_c                       0.01017 *  
## trial_order_c                       0.00821 ** 
## adj_length_c                       1.33e-05 ***
## matchmismatch:group1                0.73017    
## matchmismatch:group2                0.23156    
## matchmismatch:group3                0.00832 ** 
## matchmismatch:proficiency_c         0.00387 ** 
## group1:proficiency_c                0.93566    
## group2:proficiency_c                0.46215    
## group3:proficiency_c                0.97844    
## matchmismatch:group1:proficiency_c  0.56143    
## matchmismatch:group2:proficiency_c  0.86318    
## matchmismatch:group3:proficiency_c  0.01564 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m3_nocue_total, parm = "beta_", method = "Wald")
##                                           2.5 %        97.5 %
## (Intercept)                         5.693541076  5.8836080056
## matchmismatch                       0.108228193  0.3138145805
## group1                             -0.091441930  0.0411115136
## group2                             -0.051692706  0.0693640742
## group3                             -0.141419457  0.0279478021
## proficiency_c                      -0.041275315 -0.0059399836
## trial_order_c                      -0.001845404 -0.0002753734
## adj_length_c                        0.043278847  0.1044025763
## matchmismatch:group1               -0.062780712  0.0896282356
## matchmismatch:group2               -0.111352074  0.0268231217
## matchmismatch:group3                0.034135654  0.2256679806
## matchmismatch:proficiency_c         0.009819148  0.0501597528
## group1:proficiency_c               -0.015157611  0.0139554842
## group2:proficiency_c               -0.014686599  0.0066515954
## group3:proficiency_c               -0.016549083  0.0160979581
## matchmismatch:group1:proficiency_c -0.021671347  0.0117552090
## matchmismatch:group2:proficiency_c -0.011022500  0.0131498997
## matchmismatch:group3:proficiency_c  0.004471553  0.0416038134
#Pairwise comparisons for interactions
paiwise_m3_nocue_total_1 <- pairs(emmeans(m3_nocue_total, ~ match * group, adjust = "bonferroni"))
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m3_nocue_total_1)
##  contrast                        estimate     SE    df t.ratio p.value
##  (match 0-3) - (mismatch 0-3)    -0.10943 0.0733  82.4  -1.492  0.8093
##  (match 0-3) - (match 4-6)        0.11345 0.0888  87.0   1.278  0.9047
##  (match 0-3) - (mismatch 4-6)    -0.25351 0.1012 147.4  -2.506  0.2013
##  (match 0-3) - (match 7-9)        0.02962 0.1059  85.2   0.280  1.0000
##  (match 0-3) - (mismatch 7-9)    -0.08162 0.1264 134.7  -0.646  0.9981
##  (match 0-3) - match >10          0.14823 0.1494  85.4   0.992  0.9744
##  (match 0-3) - mismatch >10      -0.10232 0.1859 115.0  -0.550  0.9993
##  (mismatch 0-3) - (match 4-6)     0.22288 0.1041 147.4   2.141  0.3936
##  (mismatch 0-3) - (mismatch 4-6) -0.14409 0.1122  92.1  -1.284  0.9027
##  (mismatch 0-3) - (match 7-9)     0.13905 0.1189 147.6   1.170  0.9393
##  (mismatch 0-3) - (mismatch 7-9)  0.02781 0.1356  93.1   0.205  1.0000
##  (mismatch 0-3) - match >10       0.25766 0.1589 126.2   1.621  0.7367
##  (mismatch 0-3) - mismatch >10    0.00711 0.1922  94.5   0.037  1.0000
##  (match 4-6) - (mismatch 4-6)    -0.36696 0.0699  87.5  -5.252  <.0001
##  (match 4-6) - (match 7-9)       -0.08382 0.1043  88.0  -0.803  0.9925
##  (match 4-6) - (mismatch 7-9)    -0.19507 0.1249 134.6  -1.561  0.7722
##  (match 4-6) - match >10          0.03478 0.1478  85.7   0.235  1.0000
##  (match 4-6) - mismatch >10      -0.21576 0.1850 114.3  -1.166  0.9398
##  (mismatch 4-6) - (match 7-9)     0.28314 0.1148 146.2   2.467  0.2181
##  (mismatch 4-6) - (mismatch 7-9)  0.17189 0.1322  94.0   1.300  0.8967
##  (mismatch 4-6) - match >10       0.40175 0.1560 122.4   2.576  0.1750
##  (mismatch 4-6) - mismatch >10    0.15120 0.1893  94.0   0.799  0.9928
##  (match 7-9) - (mismatch 7-9)    -0.11124 0.0955  83.6  -1.165  0.9395
##  (match 7-9) - match >10          0.11861 0.1595  86.5   0.744  0.9953
##  (match 7-9) - mismatch >10      -0.13194 0.1936 125.5  -0.681  0.9974
##  (mismatch 7-9) - match >10       0.22985 0.1731 140.0   1.328  0.8869
##  (mismatch 7-9) - mismatch >10   -0.02070 0.2049  95.5  -0.101  1.0000
##  match >10 - mismatch >10        -0.25055 0.1529  83.2  -1.639  0.7256
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: tukey method for comparing a family of 8 estimates
confint(paiwise_m3_nocue_total_1)
##  contrast                        estimate     SE    df lower.CL upper.CL
##  (match 0-3) - (mismatch 0-3)    -0.10943 0.0733  82.4  -0.3375   0.1186
##  (match 0-3) - (match 4-6)        0.11345 0.0888  87.0  -0.1623   0.3892
##  (match 0-3) - (mismatch 4-6)    -0.25351 0.1012 147.4  -0.5646   0.0576
##  (match 0-3) - (match 7-9)        0.02962 0.1059  85.2  -0.2994   0.3587
##  (match 0-3) - (mismatch 7-9)    -0.08162 0.1264 134.7  -0.4708   0.3075
##  (match 0-3) - match >10          0.14823 0.1494  85.4  -0.3161   0.6125
##  (match 0-3) - mismatch >10      -0.10232 0.1859 115.0  -0.6764   0.4718
##  (mismatch 0-3) - (match 4-6)     0.22288 0.1041 147.4  -0.0972   0.5429
##  (mismatch 0-3) - (mismatch 4-6) -0.14409 0.1122  92.1  -0.4923   0.2041
##  (mismatch 0-3) - (match 7-9)     0.13905 0.1189 147.6  -0.2265   0.5046
##  (mismatch 0-3) - (mismatch 7-9)  0.02781 0.1356  93.1  -0.3926   0.4482
##  (mismatch 0-3) - match >10       0.25766 0.1589 126.2  -0.2322   0.7475
##  (mismatch 0-3) - mismatch >10    0.00711 0.1922  94.5  -0.5888   0.6030
##  (match 4-6) - (mismatch 4-6)    -0.36696 0.0699  87.5  -0.5840  -0.1500
##  (match 4-6) - (match 7-9)       -0.08382 0.1043  88.0  -0.4078   0.2402
##  (match 4-6) - (mismatch 7-9)    -0.19507 0.1249 134.6  -0.5798   0.1896
##  (match 4-6) - match >10          0.03478 0.1478  85.7  -0.4244   0.4940
##  (match 4-6) - mismatch >10      -0.21576 0.1850 114.3  -0.7871   0.3555
##  (mismatch 4-6) - (match 7-9)     0.28314 0.1148 146.2  -0.0698   0.6361
##  (mismatch 4-6) - (mismatch 7-9)  0.17189 0.1322  94.0  -0.2380   0.5818
##  (mismatch 4-6) - match >10       0.40175 0.1560 122.4  -0.0793   0.8827
##  (mismatch 4-6) - mismatch >10    0.15120 0.1893  94.0  -0.4357   0.7381
##  (match 7-9) - (mismatch 7-9)    -0.11124 0.0955  83.6  -0.4081   0.1856
##  (match 7-9) - match >10          0.11861 0.1595  86.5  -0.3767   0.6140
##  (match 7-9) - mismatch >10      -0.13194 0.1936 125.5  -0.7289   0.4650
##  (mismatch 7-9) - match >10       0.22985 0.1731 140.0  -0.3029   0.7627
##  (mismatch 7-9) - mismatch >10   -0.02070 0.2049  95.5  -0.6557   0.6143
##  match >10 - mismatch >10        -0.25055 0.1529  83.2  -0.7259   0.2248
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 8 estimates
paiwise_m3_nocue_total_2 <-pairs(emmeans(m3_nocue_total, ~ match, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m3_nocue_total_2)
##  contrast         estimate     SE   df t.ratio p.value
##  match - mismatch   -0.211 0.0533 81.9  -3.959  0.0002
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger
confint(paiwise_m3_nocue_total_2)
##  contrast         estimate     SE   df lower.CL upper.CL
##  match - mismatch   -0.211 0.0533 81.9   -0.317   -0.105
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95
paiwise_m3_nocue_total_3 <-pairs(emmeans(m3_nocue_total, ~ match * group, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m3_nocue_total_3)
##  contrast                        estimate     SE    df t.ratio p.value
##  (match 0-3) - (mismatch 0-3)    -0.10996 0.0736  82.4  -1.495  1.0000
##  (match 0-3) - (match 4-6)        0.11347 0.0892  87.0   1.273  1.0000
##  (match 0-3) - (mismatch 4-6)    -0.25629 0.1016 147.3  -2.523  0.3560
##  (match 0-3) - (match 7-9)        0.03023 0.1063  85.2   0.284  1.0000
##  (match 0-3) - (mismatch 7-9)    -0.08284 0.1269 134.7  -0.653  1.0000
##  (match 0-3) - match >10          0.14856 0.1483  85.3   1.002  1.0000
##  (match 0-3) - mismatch >10      -0.10273 0.1844 115.5  -0.557  1.0000
##  (mismatch 0-3) - (match 4-6)     0.22343 0.1045 147.4   2.138  0.9556
##  (mismatch 0-3) - (mismatch 4-6) -0.14633 0.1127  92.1  -1.298  1.0000
##  (mismatch 0-3) - (match 7-9)     0.14019 0.1194 147.5   1.174  1.0000
##  (mismatch 0-3) - (mismatch 7-9)  0.02712 0.1361  93.0   0.199  1.0000
##  (mismatch 0-3) - match >10       0.25852 0.1579 127.0   1.637  1.0000
##  (mismatch 0-3) - mismatch >10    0.00723 0.1908  94.5   0.038  1.0000
##  (match 4-6) - (mismatch 4-6)    -0.36976 0.0702  87.5  -5.266  <.0001
##  (match 4-6) - (match 7-9)       -0.08324 0.1048  88.0  -0.794  1.0000
##  (match 4-6) - (mismatch 7-9)    -0.19631 0.1255 134.6  -1.564  1.0000
##  (match 4-6) - match >10          0.03509 0.1467  85.8   0.239  1.0000
##  (match 4-6) - mismatch >10      -0.21620 0.1835 114.8  -1.179  1.0000
##  (mismatch 4-6) - (match 7-9)     0.28652 0.1153 146.2   2.485  0.3945
##  (mismatch 4-6) - (mismatch 7-9)  0.17345 0.1328  94.0   1.306  1.0000
##  (mismatch 4-6) - match >10       0.40485 0.1550 123.3   2.613  0.2829
##  (mismatch 4-6) - mismatch >10    0.15356 0.1878  94.0   0.818  1.0000
##  (match 7-9) - (mismatch 7-9)    -0.11307 0.0959  83.5  -1.179  1.0000
##  (match 7-9) - match >10          0.11833 0.1585  86.5   0.747  1.0000
##  (match 7-9) - mismatch >10      -0.13296 0.1922 126.1  -0.692  1.0000
##  (mismatch 7-9) - match >10       0.23140 0.1724 140.6   1.342  1.0000
##  (mismatch 7-9) - mismatch >10   -0.01989 0.2036  95.5  -0.098  1.0000
##  match >10 - mismatch >10        -0.25129 0.1513  83.3  -1.660  1.0000
## 
## Results are averaged over the levels of: proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 28 tests
confint(paiwise_m3_nocue_total_3)
##  contrast                        estimate     SE    df lower.CL upper.CL
##  (match 0-3) - (mismatch 0-3)    -0.10996 0.0736  82.4  -0.3474    0.128
##  (match 0-3) - (match 4-6)        0.11347 0.0892  87.0  -0.1739    0.401
##  (match 0-3) - (mismatch 4-6)    -0.25629 0.1016 147.3  -0.5796    0.067
##  (match 0-3) - (match 7-9)        0.03023 0.1063  85.2  -0.3127    0.373
##  (match 0-3) - (mismatch 7-9)    -0.08284 0.1269 134.7  -0.4874    0.322
##  (match 0-3) - match >10          0.14856 0.1483  85.3  -0.3296    0.627
##  (match 0-3) - mismatch >10      -0.10273 0.1844 115.5  -0.6923    0.487
##  (mismatch 0-3) - (match 4-6)     0.22343 0.1045 147.4  -0.1090    0.556
##  (mismatch 0-3) - (mismatch 4-6) -0.14633 0.1127  92.1  -0.5090    0.216
##  (mismatch 0-3) - (match 7-9)     0.14019 0.1194 147.5  -0.2396    0.520
##  (mismatch 0-3) - (mismatch 7-9)  0.02712 0.1361  93.0  -0.4107    0.465
##  (mismatch 0-3) - match >10       0.25852 0.1579 127.0  -0.2454    0.762
##  (mismatch 0-3) - mismatch >10    0.00723 0.1908  94.5  -0.6061    0.621
##  (match 4-6) - (mismatch 4-6)    -0.36976 0.0702  87.5  -0.5960   -0.143
##  (match 4-6) - (match 7-9)       -0.08324 0.1048  88.0  -0.4210    0.255
##  (match 4-6) - (mismatch 7-9)    -0.19631 0.1255 134.6  -0.5964    0.204
##  (match 4-6) - match >10          0.03509 0.1467  85.8  -0.4378    0.508
##  (match 4-6) - mismatch >10      -0.21620 0.1835 114.8  -0.8030    0.371
##  (mismatch 4-6) - (match 7-9)     0.28652 0.1153 146.2  -0.0804    0.653
##  (mismatch 4-6) - (mismatch 7-9)  0.17345 0.1328  94.0  -0.2537    0.601
##  (mismatch 4-6) - match >10       0.40485 0.1550 123.3  -0.0900    0.900
##  (mismatch 4-6) - mismatch >10    0.15356 0.1878  94.0  -0.4504    0.758
##  (match 7-9) - (mismatch 7-9)    -0.11307 0.0959  83.5  -0.4226    0.196
##  (match 7-9) - match >10          0.11833 0.1585  86.5  -0.3926    0.629
##  (match 7-9) - mismatch >10      -0.13296 0.1922 126.1  -0.7464    0.481
##  (mismatch 7-9) - match >10       0.23140 0.1724 140.6  -0.3176    0.780
##  (mismatch 7-9) - mismatch >10   -0.01989 0.2036  95.5  -0.6744    0.635
##  match >10 - mismatch >10        -0.25129 0.1513  83.3  -0.7398    0.237
## 
## Results are averaged over the levels of: proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## Conf-level adjustment: bonferroni method for 28 estimates
#Model building for rereading 

m1_nocue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_rr_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m2_nocue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_rr_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m3_nocue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_rr_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(Best Model)
m4_nocue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_rr_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
anova(m1_nocue_rr, m2_nocue_rr, m3_nocue_rr, m4_nocue_rr)
## Data: log_rr_data
## Models:
## m4_nocue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_nocue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_nocue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_nocue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##             npar    AIC     BIC  logLik deviance  Chisq Df Pr(>Chisq)
## m4_nocue_rr   21 813.21  905.51 -385.60   771.21                     
## m3_nocue_rr   23 816.96  918.05 -385.48   770.96 0.2505  2     0.8823
## m2_nocue_rr   25 820.91  930.79 -385.45   770.91 0.0476  2     0.9765
## m1_nocue_rr   37 841.77 1004.39 -383.88   767.77 3.1421 12     0.9945
summary(m4_nocue_rr)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 | subjectid) + (1 | item)
##    Data: log_rr_data
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    813.2    905.5   -385.6    771.2      578 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.44569 -0.68574 -0.00977  0.71788  2.20777 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectid (Intercept) 0.003272 0.0572  
##  item      (Intercept) 0.000000 0.0000  
##  Residual              0.209066 0.4572  
## Number of obs: 599, groups:  subjectid, 84; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.339e+00  5.724e-02  3.138e+02  93.269
## matchmismatch                       1.380e-01  6.778e-02  5.855e+02   2.035
## group1                              4.551e-03  4.153e-02  2.498e+02   0.110
## group2                             -3.181e-02  3.827e-02  3.636e+02  -0.831
## group3                             -1.308e-02  4.925e-02  2.597e+02  -0.266
## proficiency_c                      -2.652e-02  1.073e-02  2.684e+02  -2.472
## trial_order_c                      -4.251e-04  5.297e-04  5.944e+02  -0.803
## adj_length_c                        2.885e-02  1.711e-02  5.818e+02   1.686
## matchmismatch:group1                1.417e-02  5.349e-02  5.870e+02   0.265
## matchmismatch:group2                6.330e-03  4.660e-02  5.679e+02   0.136
## matchmismatch:group3                9.137e-02  6.214e-02  5.947e+02   1.470
## matchmismatch:proficiency_c         2.883e-02  1.390e-02  5.820e+02   2.074
## group1:proficiency_c               -1.137e-03  9.108e-03  2.659e+02  -0.125
## group2:proficiency_c               -2.253e-03  5.976e-03  2.894e+02  -0.377
## group3:proficiency_c                2.253e-03  9.295e-03  2.682e+02   0.242
## matchmismatch:group1:proficiency_c -7.465e-03  1.181e-02  5.816e+02  -0.632
## matchmismatch:group2:proficiency_c  2.985e-03  7.780e-03  5.773e+02   0.384
## matchmismatch:group3:proficiency_c  1.144e-02  1.206e-02  5.863e+02   0.949
##                                    Pr(>|t|)    
## (Intercept)                          <2e-16 ***
## matchmismatch                        0.0423 *  
## group1                               0.9128    
## group2                               0.4063    
## group3                               0.7907    
## proficiency_c                        0.0140 *  
## trial_order_c                        0.4226    
## adj_length_c                         0.0924 .  
## matchmismatch:group1                 0.7912    
## matchmismatch:group2                 0.8920    
## matchmismatch:group3                 0.1420    
## matchmismatch:proficiency_c          0.0385 *  
## group1:proficiency_c                 0.9008    
## group2:proficiency_c                 0.7064    
## group3:proficiency_c                 0.8086    
## matchmismatch:group1:proficiency_c   0.5276    
## matchmismatch:group2:proficiency_c   0.7013    
## matchmismatch:group3:proficiency_c   0.3430    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m4_nocue_rr, parm = "beta_", method = "Wald")
##                                           2.5 %        97.5 %
## (Intercept)                         5.226612199  5.4509931393
## matchmismatch                       0.005119096  0.2708027042
## group1                             -0.076846959  0.0859499276
## group2                             -0.106811606  0.0431848298
## group3                             -0.109621834  0.0834527899
## proficiency_c                      -0.047553302 -0.0054958245
## trial_order_c                      -0.001463405  0.0006131457
## adj_length_c                       -0.004695909  0.0623872093
## matchmismatch:group1               -0.090669959  0.1190071053
## matchmismatch:group2               -0.085001748  0.0976625694
## matchmismatch:group3               -0.030425616  0.2131713333
## matchmismatch:proficiency_c         0.001590015  0.0560660568
## group1:proficiency_c               -0.018987601  0.0167142837
## group2:proficiency_c               -0.013966904  0.0094600120
## group3:proficiency_c               -0.015963969  0.0204709101
## matchmismatch:group1:proficiency_c -0.030614166  0.0156840309
## matchmismatch:group2:proficiency_c -0.012262993  0.0182331108
## matchmismatch:group3:proficiency_c -0.012189239  0.0350715899
#Pairwise comparisons for interactions
paiwise_m4_nocue_rr_1 <- pairs(emmeans(m4_nocue_rr, ~ match, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m4_nocue_rr_1)
##  contrast         estimate    SE  df t.ratio p.value
##  match - mismatch   -0.138 0.069 322  -2.000  0.0464
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger
confint(paiwise_m4_nocue_rr_1)
##  contrast         estimate    SE  df lower.CL upper.CL
##  match - mismatch   -0.138 0.069 322   -0.274 -0.00224
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95
#Model building for Go-Past Time 

m1_nocue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_gp_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m2_nocue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_gp_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(Best Model)
m3_nocue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_gp_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m4_nocue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_gp_data,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


anova(m1_nocue_gp, m2_nocue_gp, m3_nocue_gp, m4_nocue_gp)
## Data: log_gp_data
## Models:
## m4_nocue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_nocue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_nocue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_nocue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##             npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)   
## m4_nocue_gp   21 2237.8 2346.5 -1097.9   2195.8                        
## m3_nocue_gp   23 2232.0 2351.1 -1093.0   2186.0 9.7679  2   0.007567 **
## m2_nocue_gp   25 2233.7 2363.2 -1091.9   2183.7 2.2607  2   0.322926   
## m1_nocue_gp   37 2253.4 2445.1 -1089.7   2179.4 4.3002 12   0.977391   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m3_nocue_gp)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 | item)
##    Data: log_gp_data
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2232.0   2351.1  -1093.0   2186.0     1289 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8252 -0.6540 -0.0833  0.5570  3.5476 
## 
## Random effects:
##  Groups    Name          Variance Std.Dev. Corr
##  subjectid (Intercept)   0.027401 0.16553      
##            matchmismatch 0.011064 0.10518  1.00
##  item      (Intercept)   0.004001 0.06325      
##  Residual                0.280738 0.52985      
## Number of obs: 1312, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.702e+00  5.038e-02  1.100e+02 113.177
## matchmismatch                       6.772e-02  5.488e-02  1.939e+02   1.234
## group1                             -6.835e-03  3.529e-02  1.037e+02  -0.194
## group2                              2.658e-02  3.222e-02  1.045e+02   0.825
## group3                             -4.465e-02  4.509e-02  1.064e+02  -0.990
## proficiency_c                      -2.603e-02  9.408e-03  1.057e+02  -2.766
## trial_order_c                      -1.027e-04  4.148e-04  1.255e+03  -0.247
## adj_length_c                        4.668e-02  1.604e-02  6.676e+01   2.911
## matchmismatch:group1               -4.689e-03  4.087e-02  2.448e+02  -0.115
## matchmismatch:group2               -5.333e-02  3.705e-02  2.457e+02  -1.439
## matchmismatch:group3                9.291e-02  5.138e-02  2.410e+02   1.808
## matchmismatch:proficiency_c         2.530e-02  1.082e-02  2.430e+02   2.338
## group1:proficiency_c               -1.901e-04  7.751e-03  1.048e+02  -0.025
## group2:proficiency_c               -4.892e-03  5.680e-03  1.084e+02  -0.861
## group3:proficiency_c               -1.860e-03  8.691e-03  1.104e+02  -0.214
## matchmismatch:group1:proficiency_c  2.211e-03  8.963e-03  2.465e+02   0.247
## matchmismatch:group2:proficiency_c -2.044e-03  6.482e-03  2.453e+02  -0.315
## matchmismatch:group3:proficiency_c  2.304e-02  9.956e-03  2.513e+02   2.314
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                       0.21876    
## group1                              0.84681    
## group2                              0.41130    
## group3                              0.32430    
## proficiency_c                       0.00669 ** 
## trial_order_c                       0.80458    
## adj_length_c                        0.00490 ** 
## matchmismatch:group1                0.90876    
## matchmismatch:group2                0.15133    
## matchmismatch:group3                0.07180 .  
## matchmismatch:proficiency_c         0.02019 *  
## group1:proficiency_c                0.98048    
## group2:proficiency_c                0.39099    
## group3:proficiency_c                0.83088    
## matchmismatch:group1:proficiency_c  0.80540    
## matchmismatch:group2:proficiency_c  0.75282    
## matchmismatch:group3:proficiency_c  0.02149 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m3_nocue_gp, parm = "beta_", method = "Wald")
##                                            2.5 %        97.5 %
## (Intercept)                         5.6035351521  5.8010360932
## matchmismatch                      -0.0398542774  0.1752890041
## group1                             -0.0760082500  0.0623375821
## group2                             -0.0365768873  0.0897422727
## group3                             -0.1330300244  0.0437263260
## proficiency_c                      -0.0444664318 -0.0075867809
## trial_order_c                      -0.0009156723  0.0007103598
## adj_length_c                        0.0152488296  0.0781168473
## matchmismatch:group1               -0.0847956836  0.0754184116
## matchmismatch:group2               -0.1259427389  0.0192897593
## matchmismatch:group3               -0.0077882958  0.1936023966
## matchmismatch:proficiency_c         0.0040920427  0.0465041280
## group1:proficiency_c               -0.0153816019  0.0150013306
## group2:proficiency_c               -0.0160255049  0.0062409461
## group3:proficiency_c               -0.0188939878  0.0151729517
## matchmismatch:group1:proficiency_c -0.0153571221  0.0197782851
## matchmismatch:group2:proficiency_c -0.0147483073  0.0106610747
## matchmismatch:group3:proficiency_c  0.0035221703  0.0425495681
#Pairwise comparisons for interactions
paiwise_m3_nocue_gp_1 <- pairs(emmeans(m3_nocue_gp, ~ match, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m3_nocue_gp_1)
##  contrast         estimate     SE   df t.ratio p.value
##  match - mismatch  -0.0677 0.0558 82.3  -1.213  0.2287
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger
confint(paiwise_m3_nocue_gp_1)
##  contrast         estimate     SE   df lower.CL upper.CL
##  match - mismatch  -0.0677 0.0558 82.3   -0.179   0.0434
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95
paiwise_m3_nocue_gp_2 <-pairs(emmeans(m3_nocue_gp, ~ match * group, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m3_nocue_gp_2)
##  contrast                         estimate     SE    df t.ratio p.value
##  (match 0-3) - (mismatch 0-3)    -0.032825 0.0773  82.5  -0.425  1.0000
##  (match 0-3) - (match 4-6)        0.089304 0.0931  87.2   0.959  1.0000
##  (match 0-3) - (mismatch 4-6)    -0.129336 0.1080 144.6  -1.198  1.0000
##  (match 0-3) - (match 7-9)       -0.035096 0.1110  85.3  -0.316  1.0000
##  (match 0-3) - (mismatch 7-9)    -0.000849 0.1356 131.6  -0.006  1.0000
##  (match 0-3) - match >10          0.045410 0.1548  85.5   0.293  1.0000
##  (match 0-3) - mismatch >10      -0.008241 0.1979 113.7  -0.042  1.0000
##  (mismatch 0-3) - (match 4-6)     0.122129 0.1113 144.1   1.098  1.0000
##  (mismatch 0-3) - (mismatch 4-6) -0.096510 0.1216  92.4  -0.793  1.0000
##  (mismatch 0-3) - (match 7-9)    -0.002271 0.1265 145.7  -0.018  1.0000
##  (mismatch 0-3) - (mismatch 7-9)  0.031976 0.1469  93.2   0.218  1.0000
##  (mismatch 0-3) - match >10       0.078236 0.1663 127.4   0.470  1.0000
##  (mismatch 0-3) - mismatch >10    0.024584 0.2057  94.6   0.119  1.0000
##  (match 4-6) - (mismatch 4-6)    -0.218640 0.0737  87.6  -2.968  0.1084
##  (match 4-6) - (match 7-9)       -0.124400 0.1094  88.1  -1.137  1.0000
##  (match 4-6) - (mismatch 7-9)    -0.090153 0.1342 131.5  -0.672  1.0000
##  (match 4-6) - match >10         -0.043893 0.1531  85.9  -0.287  1.0000
##  (match 4-6) - mismatch >10      -0.097545 0.1970 113.1  -0.495  1.0000
##  (mismatch 4-6) - (match 7-9)     0.094240 0.1221 144.8   0.772  1.0000
##  (mismatch 4-6) - (mismatch 7-9)  0.128487 0.1433  94.1   0.897  1.0000
##  (mismatch 4-6) - match >10       0.174746 0.1630 123.8   1.072  1.0000
##  (mismatch 4-6) - mismatch >10    0.121095 0.2026  94.2   0.598  1.0000
##  (match 7-9) - (mismatch 7-9)     0.034247 0.1008  83.7   0.340  1.0000
##  (match 7-9) - match >10          0.080507 0.1654  86.6   0.487  1.0000
##  (match 7-9) - mismatch >10       0.026855 0.2059 123.6   0.130  1.0000
##  (mismatch 7-9) - match >10       0.046260 0.1823 140.1   0.254  1.0000
##  (mismatch 7-9) - mismatch >10   -0.007392 0.2196  95.5  -0.034  1.0000
##  match >10 - mismatch >10        -0.053651 0.1592  83.5  -0.337  1.0000
## 
## Results are averaged over the levels of: proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 28 tests
confint(paiwise_m3_nocue_gp_2)
##  contrast                         estimate     SE    df lower.CL upper.CL
##  (match 0-3) - (mismatch 0-3)    -0.032825 0.0773  82.5   -0.282   0.2167
##  (match 0-3) - (match 4-6)        0.089304 0.0931  87.2   -0.211   0.3893
##  (match 0-3) - (mismatch 4-6)    -0.129336 0.1080 144.6   -0.473   0.2144
##  (match 0-3) - (match 7-9)       -0.035096 0.1110  85.3   -0.393   0.3229
##  (match 0-3) - (mismatch 7-9)    -0.000849 0.1356 131.6   -0.433   0.4316
##  (match 0-3) - match >10          0.045410 0.1548  85.5   -0.454   0.5446
##  (match 0-3) - mismatch >10      -0.008241 0.1979 113.7   -0.641   0.6250
##  (mismatch 0-3) - (match 4-6)     0.122129 0.1113 144.1   -0.232   0.4763
##  (mismatch 0-3) - (mismatch 4-6) -0.096510 0.1216  92.4   -0.488   0.2948
##  (mismatch 0-3) - (match 7-9)    -0.002271 0.1265 145.7   -0.405   0.4004
##  (mismatch 0-3) - (mismatch 7-9)  0.031976 0.1469  93.2   -0.440   0.5043
##  (mismatch 0-3) - match >10       0.078236 0.1663 127.4   -0.452   0.6089
##  (mismatch 0-3) - mismatch >10    0.024584 0.2057  94.6   -0.637   0.6860
##  (match 4-6) - (mismatch 4-6)    -0.218640 0.0737  87.6   -0.456   0.0188
##  (match 4-6) - (match 7-9)       -0.124400 0.1094  88.1   -0.477   0.2281
##  (match 4-6) - (mismatch 7-9)    -0.090153 0.1342 131.5   -0.518   0.3377
##  (match 4-6) - match >10         -0.043893 0.1531  85.9   -0.538   0.4498
##  (match 4-6) - mismatch >10      -0.097545 0.1970 113.1   -0.728   0.5328
##  (mismatch 4-6) - (match 7-9)     0.094240 0.1221 144.8   -0.294   0.4827
##  (mismatch 4-6) - (mismatch 7-9)  0.128487 0.1433  94.1   -0.332   0.5892
##  (mismatch 4-6) - match >10       0.174746 0.1630 123.8   -0.346   0.6953
##  (mismatch 4-6) - mismatch >10    0.121095 0.2026  94.2   -0.530   0.7726
##  (match 7-9) - (mismatch 7-9)     0.034247 0.1008  83.7   -0.291   0.3595
##  (match 7-9) - match >10          0.080507 0.1654  86.6   -0.453   0.6137
##  (match 7-9) - mismatch >10       0.026855 0.2059 123.6   -0.631   0.6843
##  (mismatch 7-9) - match >10       0.046260 0.1823 140.1   -0.534   0.6267
##  (mismatch 7-9) - mismatch >10   -0.007392 0.2196  95.5   -0.713   0.6983
##  match >10 - mismatch >10        -0.053651 0.1592  83.5   -0.567   0.4601
## 
## Results are averaged over the levels of: proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## Conf-level adjustment: bonferroni method for 28 estimates

RQ2: To what extent does the presence of a gender-marked cue (e.g., a determiner) affect the time course of grammaticality processing in heritage and nonheritage speakers of Spanish when reading distant gender agreement violations, as in “unos árboles muy altos/*altas”?

RQ2 extends Keating’s design by adding a condition where a gender-marked de-terminer cue precedes the noun, the intervening word and the adjective (e.g., unos árboles muy altos/*altas). We examined the time course of agreement processing at the adjective region by analyzing reading measures associated with early and late stages of mor-phosyntactic processing. If a gender-marked determiner cue boosts activation and maintenance of the gender feature in memory, we expect the effect of grammaticality to emerge in early reading measures (First Fixation and/or Gaze Duration), with persistence in later measures (Go-Past, Rereading, Total Time). This outcome would suggest that determiners—acquired early in L1 acquisition—serve as strong cue for gender agreement processing while reading distant dependencies. However, AOB may modulate this in-tegration. If so, HSs with a later AOB may show both early and late effects, while HSs with an earlier AOB may show no effects or only late effects. Alternatively, if the gen-der-marked determiner cue does not enhance agreement processing at a distance, the results may resemble those in the no-cue condition or show no significant effects across reading measures. This would suggest that linear distance itself, rather than feature ac-tivation or cue presence, determines the memory demands in the time course of agreement processing in linear distant contexts.

# Base filtering by condition and IA_ID
cue_data <- hsg_winsorized_cleaned %>%
  filter(condition == "cue", IA_ID == 7)

# First Fixation Duration (FFD)
log_ffd_cue <- cue_data %>%
  filter(IA_FIRST_FIXATION_DURATION > 0) %>%
  mutate(log_ffd = as.numeric(log(IA_FIRST_FIXATION_DURATION)))

# Gaze Duration (First Run Dwell Time)
log_gaze_cue <- cue_data %>%
  filter(IA_FIRST_RUN_DWELL_TIME > 0) %>%
  mutate(log_gaze = as.numeric(log(IA_FIRST_RUN_DWELL_TIME)))

# Total Dwell Time
log_total_cue <- cue_data %>%
  filter(IA_DWELL_TIME > 0) %>%
  mutate(log_total = as.numeric(log(IA_DWELL_TIME)))

# Go-Past Time (Regression Path Duration)
log_gp_cue <- cue_data %>%
  filter(IA_REGRESSION_PATH_DURATION > 0) %>%
  mutate(log_gp = as.numeric(log(IA_REGRESSION_PATH_DURATION)))

# Rereading Time (Second Run Dwell Time)
log_rr_cue <- cue_data %>%
  filter(IA_SECOND_RUN_DWELL_TIME > 0) %>%
  mutate(log_rr = as.numeric(log(IA_SECOND_RUN_DWELL_TIME)))


# Check group × match distribution
table(cue_data$group, cue_data$match)
##      
##       match mismatch
##   0-3   148      150
##   4-6   165      169
##   7-9   102      103
##   >10   255      256
#Model building for FFD
m1_cue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_ffd_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(BEST MODEL)
m2_cue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_ffd_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m3_cue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_ffd_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -4.5e+02
m4_cue_ffd <- lmer(log_ffd ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_ffd_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
anova(m1_cue_ffd, m2_cue_ffd, m3_cue_ffd, m4_cue_ffd)
## Data: log_ffd_cue
## Models:
## m4_cue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_cue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_cue_ffd: log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##            npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)    
## m4_cue_ffd   21 767.82 876.67 -362.91   725.82                          
## m3_cue_ffd   23 791.50 910.71 -372.75   745.50  0.0000  2     1.0000    
## m2_cue_ffd   25 771.66 901.23 -360.83   721.66 23.8400  2  6.656e-06 ***
## m1_cue_ffd   37 793.31 985.09 -359.66   719.31  2.3446 12     0.9987    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m2_cue_ffd)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_ffd ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match | item)
##    Data: log_ffd_cue
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    771.7    901.2   -360.8    721.7     1292 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.12124 -0.61525 -0.03715  0.59671  2.94998 
## 
## Random effects:
##  Groups    Name          Variance  Std.Dev. Corr 
##  subjectid (Intercept)   0.0093680 0.09679       
##            matchmismatch 0.0078686 0.08870  -0.23
##  item      (Intercept)   0.0003189 0.01786       
##            matchmismatch 0.0003386 0.01840  -1.00
##  Residual                0.0935103 0.30579       
## Number of obs: 1317, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.349e+00  2.854e-02  8.998e+01 187.416
## matchmismatch                       4.649e-02  3.243e-02  8.198e+01   1.434
## group1                             -7.481e-03  2.036e-02  8.446e+01  -0.367
## group2                             -1.302e-02  1.862e-02  8.591e+01  -0.699
## group3                              4.531e-03  2.592e-02  8.590e+01   0.175
## proficiency_c                      -8.581e-03  5.420e-03  8.565e+01  -1.583
## trial_order_c                      -6.049e-05  2.396e-04  1.275e+03  -0.252
## adj_length_c                       -4.094e-03  8.463e-03  1.422e+02  -0.484
## matchmismatch:group1                3.839e-03  2.490e-02  8.640e+01   0.154
## matchmismatch:group2                3.687e-02  2.273e-02  8.724e+01   1.622
## matchmismatch:group3                9.593e-03  3.169e-02  8.757e+01   0.303
## matchmismatch:proficiency_c         1.114e-03  6.622e-03  8.739e+01   0.168
## group1:proficiency_c                2.663e-03  4.459e-03  8.439e+01   0.597
## group2:proficiency_c                4.998e-03  3.262e-03  8.675e+01   1.532
## group3:proficiency_c                2.702e-03  5.035e-03  9.140e+01   0.537
## matchmismatch:group1:proficiency_c -2.864e-03  5.446e-03  8.607e+01  -0.526
## matchmismatch:group2:proficiency_c -7.844e-04  3.973e-03  8.752e+01  -0.197
## matchmismatch:group3:proficiency_c -4.395e-03  6.196e-03  9.549e+01  -0.709
##                                    Pr(>|t|)    
## (Intercept)                          <2e-16 ***
## matchmismatch                         0.155    
## group1                                0.714    
## group2                                0.486    
## group3                                0.862    
## proficiency_c                         0.117    
## trial_order_c                         0.801    
## adj_length_c                          0.629    
## matchmismatch:group1                  0.878    
## matchmismatch:group2                  0.109    
## matchmismatch:group3                  0.763    
## matchmismatch:proficiency_c           0.867    
## group1:proficiency_c                  0.552    
## group2:proficiency_c                  0.129    
## group3:proficiency_c                  0.593    
## matchmismatch:group1:proficiency_c    0.600    
## matchmismatch:group2:proficiency_c    0.844    
## matchmismatch:group3:proficiency_c    0.480    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m2_cue_ffd, parm = "beta_", method = "Wald")
##                                            2.5 %       97.5 %
## (Intercept)                         5.2928609788 5.4047345439
## matchmismatch                      -0.0170691707 0.1100497795
## group1                             -0.0473952964 0.0324329696
## group2                             -0.0495235000 0.0234829884
## group3                             -0.0462740252 0.0553367704
## proficiency_c                      -0.0192046957 0.0020420152
## trial_order_c                      -0.0005300384 0.0004090575
## adj_length_c                       -0.0206814054 0.0124942920
## matchmismatch:group1               -0.0449580324 0.0526362539
## matchmismatch:group2               -0.0076927975 0.0814251142
## matchmismatch:group3               -0.0525114407 0.0716974090
## matchmismatch:proficiency_c        -0.0118653966 0.0140941800
## group1:proficiency_c               -0.0060762008 0.0114013240
## group2:proficiency_c               -0.0013956347 0.0113915367
## group3:proficiency_c               -0.0071655402 0.0125701341
## matchmismatch:group1:proficiency_c -0.0135381632 0.0078099914
## matchmismatch:group2:proficiency_c -0.0085722264 0.0070033643
## matchmismatch:group3:proficiency_c -0.0165394635 0.0077491594
#Model building for Gaze Duration
m1_cue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_gaze_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(BEST MODEL)
m2_cue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_gaze_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m3_cue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_gaze_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -7.9e+02
m4_cue_gaze <- lmer(log_gaze ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_gaze_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
anova(m1_cue_gaze, m2_cue_gaze, m3_cue_gaze, m4_cue_gaze)
## Data: log_gaze_cue
## Models:
## m4_cue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_cue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_cue_gaze: log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##             npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)    
## m4_cue_gaze   21 1365.1 1474.0 -661.55   1323.1                          
## m3_cue_gaze   23 1398.1 1517.3 -676.04   1352.1  0.0000  2          1    
## m2_cue_gaze   25 1370.1 1499.7 -660.05   1320.1 31.9768  2  1.138e-07 ***
## m1_cue_gaze   37 1393.8 1585.6 -659.92   1319.8  0.2736 12          1    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m2_cue_gaze)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_gaze ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match | item)
##    Data: log_gaze_cue
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   1370.1   1499.7   -660.1   1320.1     1292 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2949 -0.6714 -0.0314  0.6819  3.0860 
## 
## Random effects:
##  Groups    Name          Variance  Std.Dev.  Corr
##  subjectid (Intercept)   1.516e-02 1.231e-01     
##            matchmismatch 7.756e-03 8.807e-02 0.08
##  item      (Intercept)   0.000e+00 0.000e+00     
##            matchmismatch 1.587e-15 3.984e-08  NaN
##  Residual                1.473e-01 3.838e-01     
## Number of obs: 1317, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.488e+00  3.567e-02  1.086e+02 153.872
## matchmismatch                       1.046e-01  3.859e-02  8.397e+01   2.709
## group1                             -9.966e-03  2.569e-02  8.565e+01  -0.388
## group2                             -3.660e-02  2.348e-02  8.718e+01  -1.558
## group3                              1.576e-02  3.271e-02  8.712e+01   0.482
## proficiency_c                      -1.542e-02  6.839e-03  8.684e+01  -2.255
## trial_order_c                       1.667e-04  2.999e-04  1.272e+03   0.556
## adj_length_c                        2.491e-02  1.039e-02  9.418e+02   2.398
## matchmismatch:group1                1.589e-02  2.976e-02  8.395e+01   0.534
## matchmismatch:group2                2.878e-02  2.718e-02  8.490e+01   1.059
## matchmismatch:group3               -4.800e-02  3.791e-02  8.516e+01  -1.266
## matchmismatch:proficiency_c         2.389e-03  7.921e-03  8.501e+01   0.302
## group1:proficiency_c                1.486e-03  5.623e-03  8.560e+01   0.264
## group2:proficiency_c               -2.440e-03  4.115e-03  8.797e+01  -0.593
## group3:proficiency_c                3.838e-03  6.351e-03  9.257e+01   0.604
## matchmismatch:group1:proficiency_c -7.729e-03  6.509e-03  8.361e+01  -1.187
## matchmismatch:group2:proficiency_c  3.328e-03  4.752e-03  8.514e+01   0.700
## matchmismatch:group3:proficiency_c -6.583e-03  7.427e-03  9.351e+01  -0.886
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                       0.00817 ** 
## group1                              0.69897    
## group2                              0.12274    
## group3                              0.63114    
## proficiency_c                       0.02666 *  
## trial_order_c                       0.57840    
## adj_length_c                        0.01667 *  
## matchmismatch:group1                0.59469    
## matchmismatch:group2                0.29258    
## matchmismatch:group3                0.20883    
## matchmismatch:proficiency_c         0.76367    
## group1:proficiency_c                0.79217    
## group2:proficiency_c                0.55475    
## group3:proficiency_c                0.54709    
## matchmismatch:group1:proficiency_c  0.23840    
## matchmismatch:group2:proficiency_c  0.48558    
## matchmismatch:group3:proficiency_c  0.37769    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m2_cue_gaze, parm = "beta_", method = "Wald")
##                                            2.5 %        97.5 %
## (Intercept)                         5.4182803377  5.5580929813
## matchmismatch                       0.0289142998  0.1802024918
## group1                             -0.0603082472  0.0403761682
## group2                             -0.0826175681  0.0094268809
## group3                             -0.0483484520  0.0798682610
## proficiency_c                      -0.0288237515 -0.0020167970
## trial_order_c                      -0.0004210718  0.0007544618
## adj_length_c                        0.0045520490  0.0452693592
## matchmismatch:group1               -0.0424336453  0.0742225699
## matchmismatch:group2               -0.0244852985  0.0820514014
## matchmismatch:group3               -0.1222984384  0.0262906605
## matchmismatch:proficiency_c        -0.0131349006  0.0179129670
## group1:proficiency_c               -0.0095344623  0.0125069659
## group2:proficiency_c               -0.0105051353  0.0056253378
## group3:proficiency_c               -0.0086090778  0.0162851564
## matchmismatch:group1:proficiency_c -0.0204855725  0.0050278326
## matchmismatch:group2:proficiency_c -0.0059854806  0.0126423728
## matchmismatch:group3:proficiency_c -0.0211404226  0.0079738064
#Model building for Total Time (total Dwell Time)

#(BEST MODEL)
m1_cue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_total_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m2_cue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_total_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -1.7e-02
m3_cue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_total_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


m4_cue_total <- lmer(log_total ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_total_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


anova(m1_cue_total, m2_cue_total, m3_cue_total, m4_cue_total)
## Data: log_total_cue
## Models:
## m4_cue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_cue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_cue_total: log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##              npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)    
## m4_cue_total   21 2126.5 2235.4 -1042.3   2084.5                          
## m3_cue_total   23 2124.9 2244.1 -1039.5   2078.9  5.6146  2    0.06037 .  
## m2_cue_total   25 2174.3 2303.9 -1062.2   2124.3  0.0000  2    1.00000    
## m1_cue_total   37 2146.0 2337.8 -1036.0   2072.0 52.2807 12  5.529e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m1_cue_total)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_total ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match + group | item)
##    Data: log_total_cue
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2146.0   2337.8  -1036.0   2072.0     1280 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.9822 -0.6990  0.0206  0.7309  2.6517 
## 
## Random effects:
##  Groups    Name          Variance  Std.Dev. Corr                   
##  subjectid (Intercept)   3.062e-02 0.174998                        
##            matchmismatch 1.022e-02 0.101073 0.62                   
##  item      (Intercept)   1.668e-02 0.129153                        
##            matchmismatch 2.676e-02 0.163577 -0.99                  
##            group1        9.505e-05 0.009749 -0.68  0.79            
##            group2        1.145e-03 0.033835  0.97 -0.97 -0.71      
##            group3        2.019e-03 0.044937 -0.83  0.88  0.79 -0.93
##  Residual                2.504e-01 0.500413                        
## Number of obs: 1317, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.753e+00  5.469e-02  9.451e+01 105.194
## matchmismatch                       3.838e-01  5.522e-02  8.866e+01   6.951
## group1                              3.184e-02  3.521e-02  8.256e+01   0.904
## group2                             -4.357e-02  3.321e-02  8.336e+01  -1.312
## group3                             -4.791e-03  4.518e-02  7.278e+01  -0.106
## proficiency_c                      -3.164e-02  9.323e-03  8.250e+01  -3.394
## trial_order_c                      -6.950e-04  3.959e-04  1.252e+03  -1.755
## adj_length_c                        6.078e-02  1.647e-02  7.548e+01   3.691
## matchmismatch:group1               -4.664e-03  3.851e-02  8.267e+01  -0.121
## matchmismatch:group2                4.590e-02  3.646e-02  7.730e+01   1.259
## matchmismatch:group3                1.420e-02  4.993e-02  6.129e+01   0.284
## matchmismatch:proficiency_c         2.751e-02  1.019e-02  8.414e+01   2.699
## group1:proficiency_c               -2.432e-03  7.689e-03  8.183e+01  -0.316
## group2:proficiency_c               -1.152e-02  5.655e-03  8.415e+01  -2.037
## group3:proficiency_c                5.203e-03  8.625e-03  8.560e+01   0.603
## matchmismatch:group1:proficiency_c -1.309e-02  8.411e-03  8.331e+01  -1.557
## matchmismatch:group2:proficiency_c  7.681e-03  6.152e-03  8.643e+01   1.249
## matchmismatch:group3:proficiency_c  4.614e-03  9.551e-03  9.232e+01   0.483
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                      5.89e-10 ***
## group1                              0.36848    
## group2                              0.19317    
## group3                              0.91584    
## proficiency_c                       0.00106 ** 
## trial_order_c                       0.07942 .  
## adj_length_c                        0.00042 ***
## matchmismatch:group1                0.90389    
## matchmismatch:group2                0.21190    
## matchmismatch:group3                0.77704    
## matchmismatch:proficiency_c         0.00841 ** 
## group1:proficiency_c                0.75256    
## group2:proficiency_c                0.04479 *  
## group3:proficiency_c                0.54797    
## matchmismatch:group1:proficiency_c  0.12333    
## matchmismatch:group2:proficiency_c  0.21519    
## matchmismatch:group3:proficiency_c  0.63014    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m1_cue_total, parm = "beta_", method = "Wald")
##                                           2.5 %        97.5 %
## (Intercept)                         5.645496938  5.859864e+00
## matchmismatch                       0.275581507  4.920326e-01
## group1                             -0.037176021  1.008633e-01
## group2                             -0.108663995  2.152512e-02
## group3                             -0.093341438  8.376001e-02
## proficiency_c                      -0.049917187 -1.337258e-02
## trial_order_c                      -0.001471033  8.095361e-05
## adj_length_c                        0.028502702  9.304751e-02
## matchmismatch:group1               -0.080137097  7.080909e-02
## matchmismatch:group2               -0.025566531  1.173583e-01
## matchmismatch:group3               -0.083653808  1.120553e-01
## matchmismatch:proficiency_c         0.007532482  4.748899e-02
## group1:proficiency_c               -0.017502284  1.263776e-02
## group2:proficiency_c               -0.022604998 -4.357474e-04
## group3:proficiency_c               -0.011702675  2.210846e-02
## matchmismatch:group1:proficiency_c -0.029579933  3.392029e-03
## matchmismatch:group2:proficiency_c -0.004376283  1.973823e-02
## matchmismatch:group3:proficiency_c -0.014104681  2.333322e-02
#Pairwise comparisons for interactions
paiwise_m1_cue_total_1 <- pairs(emmeans(m1_cue_total, ~ match, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m1_cue_total_1)
##  contrast         estimate     SE   df t.ratio p.value
##  match - mismatch   -0.384 0.0589 98.1  -6.521  <.0001
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger
confint(paiwise_m1_cue_total_1)
##  contrast         estimate     SE   df lower.CL upper.CL
##  match - mismatch   -0.384 0.0589 98.1   -0.501   -0.267
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95
paiwise_m1_cue_total_2 <-pairs(emmeans(m1_cue_total, ~ group, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m1_cue_total_2)
##  contrast      estimate     SE   df t.ratio p.value
##  (0-3) - (4-6) -0.00462 0.0921 92.7  -0.050  1.0000
##  (0-3) - (7-9)  0.05955 0.1107 91.3   0.538  1.0000
##  (0-3) - >10   -0.09973 0.1533 94.2  -0.650  1.0000
##  (4-6) - (7-9)  0.06417 0.1093 95.8   0.587  1.0000
##  (4-6) - >10   -0.09512 0.1512 94.1  -0.629  1.0000
##  (7-9) - >10   -0.15929 0.1643 95.8  -0.970  1.0000
## 
## Results are averaged over the levels of: match, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
confint(paiwise_m1_cue_total_2)
##  contrast      estimate     SE   df lower.CL upper.CL
##  (0-3) - (4-6) -0.00462 0.0921 92.7   -0.253    0.244
##  (0-3) - (7-9)  0.05955 0.1107 91.3   -0.239    0.358
##  (0-3) - >10   -0.09973 0.1533 94.2   -0.513    0.314
##  (4-6) - (7-9)  0.06417 0.1093 95.8   -0.230    0.359
##  (4-6) - >10   -0.09512 0.1512 94.1   -0.503    0.312
##  (7-9) - >10   -0.15929 0.1643 95.8   -0.602    0.283
## 
## Results are averaged over the levels of: match, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## Conf-level adjustment: bonferroni method for 6 estimates
#Model building for rereading 

m1_cue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_rr_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m2_cue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_rr_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m3_cue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_rr_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
#(BEST MODEL, though not significantly better than others. Just lower AIC)
m4_cue_rr <- lmer(log_rr ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_rr_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
anova(m1_cue_rr, m2_cue_rr, m3_cue_rr, m4_cue_rr)
## Data: log_rr_cue
## Models:
## m4_cue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_cue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_cue_rr: log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##           npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## m4_cue_rr   21 699.67 793.29 -328.83   657.67                     
## m3_cue_rr   23 703.20 805.75 -328.60   657.20 0.4619  2     0.7938
## m2_cue_rr   25 707.20 818.66 -328.60   657.20 0.0000  2     1.0000
## m1_cue_rr   37 727.98 892.94 -326.99   653.98 3.2225 12     0.9938
summary(m4_cue_rr)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_rr ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 | subjectid) + (1 | item)
##    Data: log_rr_cue
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##    699.7    793.3   -328.8    657.7      617 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.87035 -0.64496 -0.00931  0.67544  2.33069 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectid (Intercept) 0.02389  0.1546  
##  item      (Intercept) 0.00000  0.0000  
##  Residual              0.14820  0.3850  
## Number of obs: 638, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.403e+00  5.678e-02  2.734e+02  95.169
## matchmismatch                       8.186e-02  5.606e-02  5.922e+02   1.460
## group1                              1.124e-01  4.180e-02  2.495e+02   2.690
## group2                             -6.856e-03  3.731e-02  2.389e+02  -0.184
## group3                             -7.704e-02  5.055e-02  2.091e+02  -1.524
## proficiency_c                      -3.607e-02  1.104e-02  2.413e+02  -3.269
## trial_order_c                      -5.530e-05  4.468e-04  6.068e+02  -0.124
## adj_length_c                        3.492e-02  1.505e-02  6.352e+02   2.319
## matchmismatch:group1               -1.239e-01  4.352e-02  5.856e+02  -2.848
## matchmismatch:group2                6.575e-02  3.996e-02  6.008e+02   1.645
## matchmismatch:group3                9.054e-02  5.312e-02  6.078e+02   1.705
## matchmismatch:proficiency_c         3.550e-02  1.173e-02  5.915e+02   3.027
## group1:proficiency_c               -1.847e-02  9.445e-03  2.626e+02  -1.956
## group2:proficiency_c               -4.390e-03  6.006e-03  1.902e+02  -0.731
## group3:proficiency_c                9.614e-03  9.383e-03  1.963e+02   1.025
## matchmismatch:group1:proficiency_c  1.446e-02  9.917e-03  5.935e+02   1.458
## matchmismatch:group2:proficiency_c  3.243e-03  6.568e-03  5.875e+02   0.494
## matchmismatch:group3:proficiency_c  1.341e-02  1.030e-02  5.839e+02   1.302
##                                    Pr(>|t|)    
## (Intercept)                         < 2e-16 ***
## matchmismatch                       0.14481    
## group1                              0.00763 ** 
## group2                              0.85433    
## group3                              0.12902    
## proficiency_c                       0.00124 ** 
## trial_order_c                       0.90154    
## adj_length_c                        0.02069 *  
## matchmismatch:group1                0.00455 ** 
## matchmismatch:group2                0.10046    
## matchmismatch:group3                0.08878 .  
## matchmismatch:proficiency_c         0.00258 ** 
## group1:proficiency_c                0.05156 .  
## group2:proficiency_c                0.46565    
## group3:proficiency_c                0.30679    
## matchmismatch:group1:proficiency_c  0.14544    
## matchmismatch:group2:proficiency_c  0.62166    
## matchmismatch:group3:proficiency_c  0.19336    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m4_cue_rr, parm = "beta_", method = "Wald")
##                                            2.5 %        97.5 %
## (Intercept)                         5.2919436696  5.514498e+00
## matchmismatch                      -0.0280278672  1.917406e-01
## group1                              0.0305156953  1.943663e-01
## group2                             -0.0799748810  6.626193e-02
## group3                             -0.1761090387  2.203671e-02
## proficiency_c                      -0.0577045621 -1.444430e-02
## trial_order_c                      -0.0009309752  8.203798e-04
## adj_length_c                        0.0054120085  6.442240e-02
## matchmismatch:group1               -0.2092273393 -3.865160e-02
## matchmismatch:group2               -0.0125815438  1.440733e-01
## matchmismatch:group3               -0.0135639927  1.946443e-01
## matchmismatch:proficiency_c         0.0125164650  5.848553e-02
## group1:proficiency_c               -0.0369824417  4.047012e-05
## group2:proficiency_c               -0.0161610758  7.380317e-03
## group3:proficiency_c               -0.0087760219  2.800412e-02
## matchmismatch:group1:proficiency_c -0.0049806259  3.389285e-02
## matchmismatch:group2:proficiency_c -0.0096296067  1.611526e-02
## matchmismatch:group3:proficiency_c -0.0067739014  3.359506e-02
#Pairwise comparisons for interactions
paiwise_m4_cue_rr_1 <- pairs(emmeans(m4_cue_rr, ~ match * group, adjust = "bonferroni"))
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_m4_cue_rr_1)
##  contrast                         estimate     SE  df t.ratio p.value
##  (match 0-3) - (mismatch 0-3)    -0.049401 0.0789 558  -0.626  0.9985
##  (match 0-3) - (match 4-6)        0.154549 0.1049 240   1.474  0.8208
##  (match 0-3) - (mismatch 4-6)    -0.075267 0.0969 186  -0.777  0.9941
##  (match 0-3) - (match 7-9)        0.097517 0.1283 262   0.760  0.9949
##  (match 0-3) - (mismatch 7-9)    -0.239088 0.1151 183  -2.077  0.4336
##  (match 0-3) - match >10         -0.367574 0.1837 276  -2.001  0.4832
##  (match 0-3) - mismatch >10      -0.075656 0.1557 163  -0.486  0.9997
##  (mismatch 0-3) - (match 4-6)     0.203950 0.0987 188   2.066  0.4407
##  (mismatch 0-3) - (mismatch 4-6) -0.025866 0.0902 143  -0.287  1.0000
##  (mismatch 0-3) - (match 7-9)     0.146918 0.1234 222   1.191  0.9339
##  (mismatch 0-3) - (mismatch 7-9) -0.189687 0.1095 153  -1.733  0.6659
##  (mismatch 0-3) - match >10      -0.318173 0.1803 258  -1.765  0.6442
##  (mismatch 0-3) - mismatch >10   -0.026255 0.1517 146  -0.173  1.0000
##  (match 4-6) - (mismatch 4-6)    -0.229816 0.0729 492  -3.151  0.0365
##  (match 4-6) - (match 7-9)       -0.057032 0.1262 267  -0.452  0.9998
##  (match 4-6) - (mismatch 7-9)    -0.393637 0.1125 186  -3.499  0.0133
##  (match 4-6) - match >10         -0.522123 0.1822 280  -2.866  0.0837
##  (match 4-6) - mismatch >10      -0.230205 0.1539 163  -1.496  0.8088
##  (mismatch 4-6) - (match 7-9)     0.172785 0.1192 225   1.450  0.8329
##  (mismatch 4-6) - (mismatch 7-9) -0.163820 0.1053 152  -1.555  0.7758
##  (mismatch 4-6) - match >10      -0.292307 0.1778 260  -1.644  0.7228
##  (mismatch 4-6) - mismatch >10   -0.000389 0.1483 145  -0.003  1.0000
##  (match 7-9) - (mismatch 7-9)    -0.336605 0.1085 577  -3.101  0.0420
##  (match 7-9) - match >10         -0.465091 0.1967 283  -2.365  0.2629
##  (match 7-9) - mismatch >10      -0.173174 0.1704 182  -1.016  0.9715
##  (mismatch 7-9) - match >10      -0.128486 0.1882 250  -0.683  0.9974
##  (mismatch 7-9) - mismatch >10    0.163431 0.1612 150   1.014  0.9717
##  match >10 - mismatch >10         0.291917 0.1698 588   1.720  0.6744
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: tukey method for comparing a family of 8 estimates
confint(paiwise_m4_cue_rr_1)
##  contrast                         estimate     SE  df lower.CL upper.CL
##  (match 0-3) - (mismatch 0-3)    -0.049401 0.0789 558  -0.2895  0.19075
##  (match 0-3) - (match 4-6)        0.154549 0.1049 240  -0.1662  0.47527
##  (match 0-3) - (mismatch 4-6)    -0.075267 0.0969 186  -0.3722  0.22169
##  (match 0-3) - (match 7-9)        0.097517 0.1283 262  -0.2946  0.48963
##  (match 0-3) - (mismatch 7-9)    -0.239088 0.1151 183  -0.5920  0.11384
##  (match 0-3) - match >10         -0.367574 0.1837 276  -0.9287  0.19355
##  (match 0-3) - mismatch >10      -0.075656 0.1557 163  -0.5538  0.40252
##  (mismatch 0-3) - (match 4-6)     0.203950 0.0987 188  -0.0986  0.50653
##  (mismatch 0-3) - (mismatch 4-6) -0.025866 0.0902 143  -0.3033  0.25157
##  (mismatch 0-3) - (match 7-9)     0.146918 0.1234 222  -0.2306  0.52445
##  (mismatch 0-3) - (mismatch 7-9) -0.189687 0.1095 153  -0.5261  0.14676
##  (mismatch 0-3) - match >10      -0.318173 0.1803 258  -0.8690  0.23268
##  (mismatch 0-3) - mismatch >10   -0.026255 0.1517 146  -0.4927  0.44017
##  (match 4-6) - (mismatch 4-6)    -0.229816 0.0729 492  -0.4518 -0.00781
##  (match 4-6) - (match 7-9)       -0.057032 0.1262 267  -0.4425  0.32847
##  (match 4-6) - (mismatch 7-9)    -0.393637 0.1125 186  -0.7385 -0.04875
##  (match 4-6) - match >10         -0.522123 0.1822 280  -1.0785  0.03428
##  (match 4-6) - mismatch >10      -0.230205 0.1539 163  -0.7028  0.24244
##  (mismatch 4-6) - (match 7-9)     0.172785 0.1192 225  -0.1919  0.53749
##  (mismatch 4-6) - (mismatch 7-9) -0.163820 0.1053 152  -0.4876  0.15991
##  (mismatch 4-6) - match >10      -0.292307 0.1778 260  -0.8355  0.25088
##  (mismatch 4-6) - mismatch >10   -0.000389 0.1483 145  -0.4567  0.45587
##  (match 7-9) - (mismatch 7-9)    -0.336605 0.1085 577  -0.6668 -0.00645
##  (match 7-9) - match >10         -0.465091 0.1967 283  -1.0657  0.13548
##  (match 7-9) - mismatch >10      -0.173174 0.1704 182  -0.6958  0.34945
##  (mismatch 7-9) - match >10      -0.128486 0.1882 250  -0.7039  0.44693
##  (mismatch 7-9) - mismatch >10    0.163431 0.1612 150  -0.3321  0.65896
##  match >10 - mismatch >10         0.291917 0.1698 588  -0.2245  0.80829
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 8 estimates
paiwise_paiwise_m4_cue_rr_2 <-pairs(emmeans(m4_cue_rr, ~ match, at = list(proficiency_c = c(-1, 0, 1))), adjust = "bonferroni")
## boundary (singular) fit: see help('isSingular')
## NOTE: Results may be misleading due to involvement in interactions
print(paiwise_paiwise_m4_cue_rr_2)
##  contrast         estimate     SE  df t.ratio p.value
##  match - mismatch  -0.0819 0.0568 327  -1.440  0.1508
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger
confint(paiwise_paiwise_m4_cue_rr_2)
##  contrast         estimate     SE  df lower.CL upper.CL
##  match - mismatch  -0.0819 0.0568 327   -0.194     0.03
## 
## Results are averaged over the levels of: group, proficiency_c 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95
#Model building for Go-Past Time 

#(BEST MODEL)
m1_cue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match + group | item),
               data = log_gp_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m2_cue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 + match | item),
               data = log_gp_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
## Warning: Model failed to converge with 1 negative eigenvalue: -6.7e+02
m3_cue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 + match | subjectid) +
               (1 | item),
               data = log_gp_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))
## boundary (singular) fit: see help('isSingular')
m4_cue_gp <- lmer(log_gp ~ match * group * proficiency_c +
               trial_order_c + adj_length_c +
               (1 | subjectid) +
               (1 | item),
               data = log_gp_cue,
               REML = FALSE,
               control = lmerControl(optimizer = "bobyqa"))


anova(m1_cue_gp, m2_cue_gp, m3_cue_gp, m4_cue_gp)
## Data: log_gp_cue
## Models:
## m4_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m2_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match | item)
## m1_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##           npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)    
## m4_cue_gp   21 2287.3 2396.1 -1122.6   2245.3                         
## m3_cue_gp   23 2278.9 2398.1 -1116.5   2232.9 12.332  2     0.0021 ** 
## m2_cue_gp   25 2331.5 2461.1 -1140.7   2281.5  0.000  2     1.0000    
## m1_cue_gp   37 2304.0 2495.8 -1115.0   2230.0 51.460 12  7.727e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(m1_cue_gp, m3_cue_gp, m4_cue_gp)
## Data: log_gp_cue
## Models:
## m4_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 | subjectid) + (1 | item)
## m3_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 | item)
## m1_cue_gp: log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c + (1 + match | subjectid) + (1 + match + group | item)
##           npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)   
## m4_cue_gp   21 2287.3 2396.1 -1122.6   2245.3                         
## m3_cue_gp   23 2278.9 2398.1 -1116.5   2232.9 12.3321  2     0.0021 **
## m1_cue_gp   37 2304.0 2495.8 -1115.0   2230.0  2.8936 14     0.9992   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(m1_cue_gp)
## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's
##   method [lmerModLmerTest]
## Formula: 
## log_gp ~ match * group * proficiency_c + trial_order_c + adj_length_c +  
##     (1 + match | subjectid) + (1 + match + group | item)
##    Data: log_gp_cue
## Control: lmerControl(optimizer = "bobyqa")
## 
##      AIC      BIC   logLik deviance df.resid 
##   2304.0   2495.8  -1115.0   2230.0     1280 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.3267 -0.6367 -0.1232  0.5034  3.7499 
## 
## Random effects:
##  Groups    Name          Variance  Std.Dev. Corr                   
##  subjectid (Intercept)   0.0303121 0.17410                         
##            matchmismatch 0.0148045 0.12167  1.00                   
##  item      (Intercept)   0.0056334 0.07506                         
##            matchmismatch 0.0104667 0.10231  -0.70                  
##            group1        0.0002487 0.01577  -0.41 -0.37            
##            group2        0.0010919 0.03304   0.98 -0.83 -0.22      
##            group3        0.0008253 0.02873   0.67 -1.00  0.41  0.80
##  Residual                0.2844660 0.53335                         
## Number of obs: 1317, groups:  subjectid, 86; item, 64
## 
## Fixed effects:
##                                      Estimate Std. Error         df t value
## (Intercept)                         5.634e+00  5.255e-02  9.545e+01 107.214
## matchmismatch                       1.937e-01  5.689e-02  8.725e+01   3.405
## group1                              1.074e-02  3.625e-02  8.570e+01   0.296
## group2                             -5.233e-02  3.394e-02  8.384e+01  -1.542
## group3                             -1.168e-02  4.612e-02  8.271e+01  -0.253
## proficiency_c                      -2.246e-02  9.599e-03  8.617e+01  -2.340
## trial_order_c                      -6.566e-04  4.197e-04  1.253e+03  -1.564
## adj_length_c                        5.143e-02  1.607e-02  9.037e+01   3.200
## matchmismatch:group1               -2.807e-02  4.168e-02  8.675e+01  -0.673
## matchmismatch:group2                7.301e-02  3.931e-02  7.553e+01   1.857
## matchmismatch:group3                2.765e-02  5.326e-02  7.836e+01   0.519
## matchmismatch:proficiency_c         1.795e-02  1.103e-02  8.728e+01   1.628
## group1:proficiency_c                2.346e-03  7.913e-03  8.552e+01   0.297
## group2:proficiency_c               -6.458e-03  5.808e-03  8.805e+01  -1.112
## group3:proficiency_c                6.316e-03  8.899e-03  9.115e+01   0.710
## matchmismatch:group1:proficiency_c -2.456e-03  9.076e-03  8.660e+01  -0.271
## matchmismatch:group2:proficiency_c  2.084e-03  6.662e-03  8.806e+01   0.313
## matchmismatch:group3:proficiency_c  5.501e-03  1.034e-02  9.581e+01   0.532
##                                    Pr(>|t|)    
## (Intercept)                          <2e-16 ***
## matchmismatch                        0.0010 ** 
## group1                               0.7679    
## group2                               0.1269    
## group3                               0.8007    
## proficiency_c                        0.0216 *  
## trial_order_c                        0.1180    
## adj_length_c                         0.0019 ** 
## matchmismatch:group1                 0.5025    
## matchmismatch:group2                 0.0672 .  
## matchmismatch:group3                 0.6051    
## matchmismatch:proficiency_c          0.1071    
## group1:proficiency_c                 0.7675    
## group2:proficiency_c                 0.2692    
## group3:proficiency_c                 0.4796    
## matchmismatch:group1:proficiency_c   0.7874    
## matchmismatch:group2:proficiency_c   0.7551    
## matchmismatch:group3:proficiency_c   0.5960    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation matrix not shown by default, as p = 18 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
confint(m1_cue_gp, parm = "beta_", method = "Wald")
##                                           2.5 %       97.5 %
## (Intercept)                         5.530670444  5.736646146
## matchmismatch                       0.082179759  0.305168156
## group1                             -0.060319241  0.081789452
## group2                             -0.118857655  0.014194335
## group3                             -0.102074839  0.078717672
## proficiency_c                      -0.041270400 -0.003643582
## trial_order_c                      -0.001479187  0.000166072
## adj_length_c                        0.019924453  0.082931259
## matchmismatch:group1               -0.109757549  0.053626405
## matchmismatch:group2               -0.004044660  0.150063381
## matchmismatch:group3               -0.076733179  0.132031529
## matchmismatch:proficiency_c        -0.003660088  0.039566034
## group1:proficiency_c               -0.013162738  0.017855483
## group2:proficiency_c               -0.017840986  0.004924878
## group3:proficiency_c               -0.011125211  0.023758054
## matchmismatch:group1:proficiency_c -0.020244182  0.015332794
## matchmismatch:group2:proficiency_c -0.010973631  0.015142621
## matchmismatch:group3:proficiency_c -0.014767633  0.025768616

The end!