This document contains the supplementary materials submitted for the thesis:

Examining Media Effects on Implicit Sociolinguistic Cognition (Jackson, 2026 - University of Glasgow).

It contains the supplementary materials for the Occupation Category:

  • Phase 1: Baseline Variation (Pre-Exposure) towards Accent Paradigm (GV, LV, SSE, SSBE).
    • Behavioural Analysis
    • Gaze Analysis
  • Phase 2: Media Priming Effects (Pre and Post Exposure) towards the GV Accent.
    • Behavioural Analysis
    • Gaze Analysis

Phase 1

Behavioural Data

Accuracy

Across all Occupation Trials (Phase 1 and Phase 2), participant performance was at ceiling (100% correct: i.e., all participants correctly clicked on the heard lexical target). With no variability in the data, no models were fitted for accuracy. Therefore, the behavioural analyses shall concern the reaction time data: from target onset to mouse click.

Reaction Time (RT)

Model Output

Click to Expand: Phase 1 Reaction Time (RT) LME Model Output
Fixed Effects Table: Phase 1 Reaction Time (RT) Mixed Model
Fixed Effect Term Estimate (β) Std. Error t-value p-value
(Intercept) 7.546 0.073 103.266 0.000
Conditionincongruent 0.034 0.029 1.178 0.246
Accentsse 0.016 0.006 2.663 0.008
Accentssbe 0.027 0.006 4.479 0.000
Accentlv -0.023 0.006 -3.744 0.000
Mediastereo -0.038 0.066 -0.567 0.572
Mediacounters -0.125 0.066 -1.904 0.061
Trial Centered 0.003 0.000 11.109 0.000
Conditionincongruent Accentsse -0.056 0.009 -6.495 0.000
Conditionincongruent Accentssbe -0.007 0.009 -0.765 0.444
Conditionincongruent Accentlv 0.040 0.009 4.567 0.000
Conditionincongruent Mediastereo -0.061 0.033 -1.856 0.067
Conditionincongruent Mediacounters 0.134 0.032 4.157 0.000
Accentsse Mediastereo 0.007 0.008 0.831 0.406
Accentssbe Mediastereo -0.077 0.009 -9.082 0.000
Accentlv Mediastereo -0.004 0.009 -0.457 0.648
Accentsse Mediacounters 0.068 0.009 8.011 0.000
Accentssbe Mediacounters 0.070 0.008 8.240 0.000
Accentlv Mediacounters 0.074 0.009 8.710 0.000
Conditionincongruent Accentsse Mediastereo 0.001 0.012 0.079 0.937
Conditionincongruent Accentssbe Mediastereo 0.060 0.012 4.954 0.000
Conditionincongruent Accentlv Mediastereo -0.045 0.012 -3.709 0.000
Conditionincongruent Accentsse Mediacounters -0.075 0.012 -6.187 0.000
Conditionincongruent Accentssbe Mediacounters -0.130 0.012 -10.792 0.000
Conditionincongruent Accentlv Mediacounters -0.161 0.012 -13.266 0.000
Model Specification:
Reference Levels (Baseline): Accent [GV], Condition [Congruent], Media [Control].

ANOVA Testing

Click to Expand: Phase 1: RT Type III Analysis of Variance Table

Type III Analysis of Variance Table with Satterthwaite’s method

## Type III Analysis of Variance Table with Satterthwaite's method
##                        Sum Sq Mean Sq NumDF   DenDF  F value    Pr(>F)    
## condition              0.0259 0.02586     1    16.2   1.1979  0.289774    
## accent                 2.0312 0.67707     3 28640.3  31.3676 < 2.2e-16 ***
## media                  0.0376 0.01882     2    70.0   0.8721  0.422557    
## Trial_centered         2.6636 2.66360     1 21331.4 123.4001 < 2.2e-16 ***
## condition:accent       6.0852 2.02841     3 28638.2  93.9729 < 2.2e-16 ***
## condition:media        0.2163 0.10817     2    69.5   5.0116  0.009267 ** 
## accent:media           3.2089 0.53482     6 28638.8  24.7771 < 2.2e-16 ***
## condition:accent:media 7.9126 1.31877     6 28639.0  61.0964 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Estimated Marginal Means Interaction: Condition and Accent

Estimated Marginal Means and Pairwise Comparisons for Condition x Accent Interaction.

Click to View Interaction Emmeans and Pairwise Results
# 1. Get the means for the interaction
joint_means <- emmeans(P1_RT_OCC, ~ condition | accent)

# 2. Run pairwise comparisons (Congruent vs Incongruent) for each accent
 
condition_within_accent <- contrast(joint_means, "pairwise", adjust = "tukey")

# 3. View the results
summary(condition_within_accent, infer = TRUE)
## accent = GV:
##  contrast                estimate     SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0585 0.0217 Inf   -0.1010   -0.0159  -2.695
##  p.value
##   0.0070
## 
## accent = SSE:
##  contrast                estimate     SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent   0.0224 0.0217 Inf   -0.0201    0.0649   1.032
##  p.value
##   0.3022
## 
## accent = SSBE:
##  contrast                estimate     SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0283 0.0217 Inf   -0.0708    0.0142  -1.304
##  p.value
##   0.1922
## 
## accent = LV:
##  contrast                estimate     SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0297 0.0217 Inf   -0.0722    0.0128  -1.369
##  p.value
##   0.1710
## 
## Results are averaged over the levels of: media 
## Degrees-of-freedom method: asymptotic 
## Confidence level used: 0.95
##################################################

"Rendering for in-text table"
## [1] "Rendering for in-text table"
# 1. Convert to dataframe
interaction_results_df <- as.data.frame(condition_within_accent) %>%
  mutate(
    across(c(estimate, SE, z.ratio, p.value), ~round(., 4))
  )

# 2. Render with kable
interaction_results_df %>%
  select(accent, contrast, estimate, SE, df, z.ratio, p.value) %>%
  kable(caption = "Pairwise comparisons of Condition (congruent vs incongruent) for each Accent",
        col.names = c("Accent", "Contrast", "Estimate", "SE", "df", "z-ratio", "p-value"),
        align = "llccccc") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, 
                position = "center") %>%
  row_spec(which(interaction_results_df$p.value < 0.05), bold = TRUE)
Pairwise comparisons of Condition (congruent vs incongruent) for each Accent
Accent Contrast Estimate SE df z-ratio p-value
GV congruent - incongruent -0.0585 0.0217 Inf -2.6946 0.0070
SSE congruent - incongruent 0.0224 0.0217 Inf 1.0318 0.3022
SSBE congruent - incongruent -0.0283 0.0217 Inf -1.3042 0.1922
LV congruent - incongruent -0.0297 0.0217 Inf -1.3690 0.1710

Estimated Marginal Means: Main Effect of Accent

Click to View Accent Emmeans and pairwise results
# 1. Get the means for each accent
accent_means <- emmeans(P1_RT_OCC, ~ accent)

# 2. Run all possible pairwise comparisons (6 total: GV-SSE, GV-LV, GV-SSBE, etc.)
accent_pairwise <- contrast(accent_means, "pairwise", adjust = "tukey")

# 3. View the results
summary(accent_pairwise, infer = TRUE)
##  contrast    estimate      SE  df asymp.LCL asymp.UCL z.ratio p.value
##  GV - SSE   -0.000768 0.00247 Inf  -0.00712   0.00559  -0.311  0.9896
##  GV - SSBE  -0.009697 0.00247 Inf  -0.01603  -0.00336  -3.932  0.0005
##  GV - LV     0.013882 0.00248 Inf   0.00752   0.02024   5.608  <.0001
##  SSE - SSBE -0.008929 0.00245 Inf  -0.01523  -0.00263  -3.642  0.0015
##  SSE - LV    0.014651 0.00246 Inf   0.00834   0.02096   5.964  <.0001
##  SSBE - LV   0.023580 0.00246 Inf   0.01727   0.02989   9.595  <.0001
## 
## Results are averaged over the levels of: condition, media 
## Degrees-of-freedom method: asymptotic 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 4 estimates 
## P value adjustment: tukey method for comparing a family of 4 estimates
##################################################

"Rendering for in-text table"
## [1] "Rendering for in-text table"
# 1. Convert to dataframe
accent_pairwise_df <- as.data.frame(accent_pairwise) %>%
  mutate(
    # Format p-value to show "< 0.0001" or the rounded number
    p_formatted = ifelse(p.value < 0.0001, "< 0.0001", as.character(round(p.value, 4))),
    # Rounding numeric columns
    across(c(estimate, SE, z.ratio), ~round(., 4))
  )

# 2. Render the table
accent_pairwise_df %>%
  select(contrast, estimate, SE, df, z.ratio, p_formatted) %>%
  kable(caption = "Pairwise comparisons of Accent (Marginal Means averaged across Condition)",
        col.names = c("Comparison", "Estimate", "SE", "df", "z-ratio", "p-value"),
        align = "lccccc") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, 
                position = "center") %>%
  row_spec(0, bold = TRUE) %>%
  # Bold the rows where p < 0.05
  row_spec(which(accent_pairwise_df$p.value < 0.05), bold = TRUE) %>%
  # Use 'footnote_as_chunk' to keep it tight and prevent blank rows
  footnote(general = " Results are averaged over the levels of Condition. P-values are Tukey-adjusted.",
           general_title = "Note: ",
           footnote_as_chunk = TRUE)
Pairwise comparisons of Accent (Marginal Means averaged across Condition)
Comparison Estimate SE df z-ratio p-value
GV - SSE -0.0008 0.0025 Inf -0.3106 0.9896
GV - SSBE -0.0097 0.0025 Inf -3.9319 5e-04
GV - LV 0.0139 0.0025 Inf 5.6077 < 0.0001
SSE - SSBE -0.0089 0.0025 Inf -3.6421 0.0015
SSE - LV 0.0147 0.0025 Inf 5.9636 < 0.0001
SSBE - LV 0.0236 0.0025 Inf 9.5954 < 0.0001
Note: Results are averaged over the levels of Condition. P-values are Tukey-adjusted.

Gaze Data

Model Comparisons

Click to View Phase 1: Hierarchical GAMM Model Comparisons Full Output
Phase 1 Occupation Gaze Data: Hierarchical Model Comparison Results
Predictor Type Result
Main Effects
Accent Parametric Non-significant (χ² = 8.59, df = 18, p > .05)
Accent Smooth Non-significant (ML Difference = -18.87, df = 14, p > .05)
Condition Parametric Significant (χ² = 31.54, df = 12, p < .001)
Condition Smooth Significant (χ² = 319.29, df = 10, p < .001)
Media Parametric Non-significant (χ² = 5.18, df = 16, p > .05)
Media Smooth Non-significant (AIC Comparison favored Reduced Model, p > .05)
Two-Way Interactions
Accent × Condition Parametric Non-significant (χ² = 9.64, df = 45, p > .05)
Accent × Condition Smooth Significant (χ² = 310.37, df = 41, p < .001)
Media × Accent Parametric Non-significant (χ² = 4.83, df = 12, p > .05)
Media × Accent Smooth Non-significant (AIC Comparison favoured Full Model, p > .05)
Media × Condition Parametric Non-significant (χ² = 1.42, df = 8, p > .05)
Media × Condition Smooth Non-significant (AIC Comparison favoured Reduced Model, p > .05)
Three-Way Interaction
Media × Accent × Condition Parametric Non-significant (χ² = 15.81, df = 12, p > .05)
Media × Accent × Condition Smooth Non-significant (χ² = 3.44, df = 18, p > .05)
Note:
Model comparisons performed via Likelihood Ratio Tests (LRT) and AIC differences.

GAMM Model Output

Click to View Phase 1: GAMM Model Output
Parametric Coefficients for Phase 1 GAMM Model (Occupation Gaze Data)
Term Estimate Std. Error t-value p-value
(Intercept) 1.210 0.539 2.244 0.025
Accent: SSE -0.205 0.751 -0.273 0.785
Accent: SSBE 1.729 0.759 2.278 0.023
Accent: LV -1.471 0.768 -1.916 0.055
Condition: Incongruent -2.076 0.761 -2.728 0.006
Media: Stereo -1.144 0.753 -1.519 0.129
Media: CounterS 0.263 0.750 0.351 0.726
Accent SSE × Incongruent -0.328 1.078 -0.304 0.761
Accent SSBE × Incongruent -2.233 1.084 -2.060 0.039
Accent LV × Incongruent 2.081 1.090 1.909 0.056
Accent SSE × Media Stereo 1.892 1.055 1.792 0.073
Accent SSBE × Media Stereo -0.561 1.055 -0.532 0.595
Accent LV × Media Stereo 1.306 1.061 1.231 0.218
Accent SSE × Media CounterS 0.001 1.051 0.001 0.999
Accent SSBE × Media CounterS -2.208 1.051 -2.101 0.036
Accent LV × Media CounterS 1.097 1.057 1.038 0.299
Incongruent × Media Stereo 1.399 1.055 1.326 0.185
Incongruent × Media CounterS 0.253 1.052 0.241 0.810
SSE × Incongruent × Stereo -1.461 1.496 -0.976 0.329
SSBE × Incongruent × Stereo 0.566 1.496 0.378 0.705
LV × Incongruent × Stereo -3.152 1.501 -2.101 0.036
SSE × Incongruent × CounterS 0.464 1.491 0.311 0.756
SSBE × Incongruent × CounterS 1.682 1.491 1.128 0.259
LV × Incongruent × CounterS -1.915 1.496 -1.280 0.200
Approximate Significance of Smooth Terms
Smooth Term edf F-value p-value
s(Time) 3.8500 2.639 0.0001
s(TRIAL_INDEX) 0.0007 0.000 0.4738
s(Time):GV.congruent 0.9700 2.365 0.0001
s(Time):SSE.congruent 0.9600 2.841 0.0001
s(Time):SSBE.congruent 3.0400 3.135 0.0001
s(Time):LV.congruent 3.3000 3.441 0.0001
s(Time):GV.incongruent 7.3600 9.952 0.0001
s(Time):SSE.incongruent 6.7200 8.010 0.0001
s(Time):SSBE.incongruent 7.6600 7.012 0.0001
s(Time):LV.incongruent 7.5000 9.070 0.0001
s(Time):mediaStereo 0.0004 0.000 0.0990
s(Time):mediaCounterS 0.0010 0.000 0.0712
s(TRIAL_INDEX):GV.congruent 0.8640 0.143 0.1486
s(TRIAL_INDEX):SSE.congruent 0.0005 0.000 0.5684
s(TRIAL_INDEX):SSBE.congruent 0.0003 0.000 0.8665
s(TRIAL_INDEX):LV.congruent 0.0006 0.000 0.5046
s(TRIAL_INDEX):GV.incongruent 0.8420 0.482 0.0115
s(TRIAL_INDEX):SSE.incongruent 0.0008 0.000 0.5090
s(TRIAL_INDEX):SSBE.incongruent 0.0005 0.000 0.7620
s(TRIAL_INDEX):LV.incongruent 0.4730 0.066 0.2002
s(Time,Item) 35.3000 0.986 0.0001
s(Time,Subject) 346.0000 0.997 0.0001

Phase 2

Behavioural Analysis (Reaction Time)

Model Output

Click to Expand: Phase 2 Reaction Time (RT) LME Model Output
Fixed Effects Table: Phase 2 Reaction Time (RT) Mixed Model
Fixed Effect Term Estimate (β) Std. Error t-value p-value
(Intercept) 7.642 0.060 128.084 0.000
Conditionincongruent 0.034 0.006 5.577 0.000
Pre Postpost -0.256 0.032 -8.099 0.000
Mediastereo -0.038 0.058 -0.657 0.513
Mediacounters -0.121 0.057 -2.123 0.037
Trial Centered 0.003 0.000 6.364 0.000
Conditionincongruent Pre Postpost 0.045 0.009 5.196 0.000
Conditionincongruent Mediastereo -0.061 0.008 -7.221 0.000
Conditionincongruent Mediacounters 0.130 0.009 15.241 0.000
Pre Postpost Mediastereo -0.018 0.009 -2.106 0.035
Pre Postpost Mediacounters 0.104 0.009 12.152 0.000
Conditionincongruent Pre Postpost Mediastereo 0.078 0.012 6.464 0.000
Conditionincongruent Pre Postpost Mediacounters -0.168 0.012 -13.952 0.000
Model Specification:
Reference Levels (Baseline): Condition [Congruent], Pre/Post [Pre], Media [Control].

ANOVA Testing

Click to Expand: Phase 2: RT Type III Analysis of Variance Table

Type III Analysis of Variance Table with Satterthwaite’s method

## Type III Analysis of Variance Table with Satterthwaite's method
##                           Sum Sq Mean Sq NumDF   DenDF  F value    Pr(>F)    
## condition                14.6743 14.6743     1 14420.7 677.9975 < 2.2e-16 ***
## pre_post                  1.0827  1.0827     1  4231.5  50.0231 1.770e-12 ***
## media                     0.0249  0.0124     2    70.0   0.5747 0.5654864    
## Trial_centered            0.8765  0.8765     1  4193.7  40.4991 2.178e-10 ***
## condition:pre_post        0.1956  0.1956     1 14414.1   9.0377 0.0026492 ** 
## condition:media           2.9306  1.4653     2 14417.6  67.7025 < 2.2e-16 ***
## pre_post:media            0.3287  0.1644     2 14416.2   7.5939 0.0005056 ***
## condition:pre_post:media  9.6179  4.8089     2 14417.0 222.1871 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Estimated Marginal Means Interaction: Condition x Pre-Post x Media

Estimated Marginal Means and Pairwise Comparisons for Condition x Pre-Post x Media.

Click to View Interaction Emmeans and Pairwise Results
# Format: Condition | (Time point and Media Group)
p2_joint_means <- emmeans(P2_RT_OCC, ~ condition | pre_post * media)

# 2. Run pairwise comparisons (Congruent vs Incongruent) 
# This tells us if the bias is significant in each specific "cell"
p2_condition_results <- contrast(p2_joint_means, "pairwise", adjust = "tukey")

# 3. View the results
summary(p2_condition_results, infer = TRUE)
## pre_post = pre, media = Control:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0338 0.00607 Inf   -0.0457   -0.0219  -5.577
##  p.value
##   <.0001
## 
## pre_post = post, media = Control:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0785 0.00608 Inf   -0.0904   -0.0665 -12.898
##  p.value
##   <.0001
## 
## pre_post = pre, media = Stereo:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent   0.0275 0.00595 Inf    0.0159    0.0392   4.626
##  p.value
##   <.0001
## 
## pre_post = post, media = Stereo:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0950 0.00596 Inf   -0.1067   -0.0833 -15.946
##  p.value
##   <.0001
## 
## pre_post = pre, media = CounterS:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.1636 0.00597 Inf   -0.1753   -0.1519 -27.380
##  p.value
##   <.0001
## 
## pre_post = post, media = CounterS:
##  contrast                estimate      SE  df asymp.LCL asymp.UCL z.ratio
##  congruent - incongruent  -0.0405 0.00597 Inf   -0.0522   -0.0288  -6.775
##  p.value
##   <.0001
## 
## Degrees-of-freedom method: asymptotic 
## Confidence level used: 0.95
##################################################

"Rendering for in-text table"
## [1] "Rendering for in-text table"
# 1. Prepare the data
p2_tab_data <- as.data.frame(p2_condition_results) %>%
  mutate(
    p_formatted = ifelse(p.value < 0.001, "< .001", as.character(round(p.value, 3))),
    across(c(estimate, SE, z.ratio), ~round(., 3))
  ) %>%
  select(media, pre_post, contrast, estimate, SE, df, z.ratio, p_formatted, p.value)

# 2. Render the Table
# We use the 'media' column to tell kable where to start/stop the headers
p2_tab_data %>%
  select(-p.value, -media) %>% 
  kable(caption = "Phase 2 Occupation RT: Congruency Effects by Media Condition",
        col.names = c("Time", "Contrast", "Estimate", "SE", "df", "z-ratio", "p-value"),
        align = "llccccc") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, 
                position = "center") %>%
  # Manual packing based on standard alphabetical order (Control, CounterS, Stereo)
  # Each has 2 rows (Pre/Post)
  pack_rows("Control Media", 1, 2) %>% 
  pack_rows("Counter-Stereotypical (CounterS)", 3, 4) %>%
  pack_rows("Stereotypical (Stereo)", 5, 6) %>%
  row_spec(which(p2_tab_data$p.value < 0.05), bold = TRUE)
Phase 2 Occupation RT: Congruency Effects by Media Condition
Time Contrast Estimate SE df z-ratio p-value
Control Media
pre congruent - incongruent -0.034 0.006 Inf -5.577 < .001
post congruent - incongruent -0.078 0.006 Inf -12.898 < .001
Counter-Stereotypical (CounterS)
pre congruent - incongruent 0.028 0.006 Inf 4.626 < .001
post congruent - incongruent -0.095 0.006 Inf -15.946 < .001
Stereotypical (Stereo)
pre congruent - incongruent -0.164 0.006 Inf -27.380 < .001
post congruent - incongruent -0.040 0.006 Inf -6.775 < .001

Phase 2 Reaction Time: Visualisation of Condition x Pre-Post x Media Interaction

This visualisation does not isolate the media priming effect relative to Control.

Click to View Three-way Interaction Plot

Phase 2 Reaction Time: Isolating Media Priming Effect

Estimated marginal means were used to compute a difference-in-difference approach: first calculating Post–Pre change scores within each Media and trial Condition.

To isolate the effect of Stereotypical/Counter-stereotypical media from the neutral baseline, the Post-Pre change observed in the Control group is then subtracted from both the experimental media conditions.

Click to View Three-way Interaction Plot
#######################################
# ISOLATING MEDIA - REACTION TIME
#######################################

# Check EMMs first (sanity check & manual verification)
emmeans(P2_RT_OCC, ~ pre_post * media * condition)
##  pre_post media    condition   emmean     SE  df asymp.LCL asymp.UCL
##  pre      Control  congruent     7.64 0.0597 Inf      7.53      7.76
##  post     Control  congruent     7.39 0.0598 Inf      7.27      7.50
##  pre      Stereo   congruent     7.60 0.0596 Inf      7.49      7.72
##  post     Stereo   congruent     7.33 0.0596 Inf      7.21      7.45
##  pre      CounterS congruent     7.52 0.0592 Inf      7.40      7.64
##  post     CounterS congruent     7.37 0.0593 Inf      7.25      7.48
##  pre      Control  incongruent   7.68 0.0597 Inf      7.56      7.79
##  post     Control  incongruent   7.46 0.0597 Inf      7.35      7.58
##  pre      Stereo   incongruent   7.58 0.0597 Inf      7.46      7.69
##  post     Stereo   incongruent   7.43 0.0597 Inf      7.31      7.54
##  pre      CounterS incongruent   7.68 0.0594 Inf      7.57      7.80
##  post     CounterS incongruent   7.41 0.0591 Inf      7.29      7.52
## 
## Degrees-of-freedom method: asymptotic 
## Confidence level used: 0.95
# Estimated marginal means
p2_means <- emmeans(P2_RT_OCC, ~ media * pre_post * condition)

# Compute Post - Pre change within each media x condition
change_over_time <- contrast(
  p2_means,
  method = list("Post - Pre" = c(-1, 1)),
  by = c("media", "condition")
)

# Compare each media group to Control (Media - Control direction)
media_vs_control_change <- contrast(
  change_over_time,
  method = list(
    "Stereo - Control"   = c(-1, 1, 0),
    "CounterS - Control" = c(-1, 0, 1)
  ),
  by = "condition"
)

# Prepare table
final_table_df <- as.data.frame(media_vs_control_change) %>%
  mutate(
    Media_Group = case_when(
      grepl("Stereo", contrast)   ~ "Stereotypical Media",
      grepl("CounterS", contrast) ~ "Counter-Stereotypical Media"
    ),
    Media_Group = factor(
      Media_Group,
      levels = c("Stereotypical Media", "Counter-Stereotypical Media")
    ),
    p_formatted = ifelse(
      p.value < 0.001,
      "< 0.001",
      as.character(round(p.value, 3))
    ),
    across(c(estimate, SE, z.ratio), ~ round(., 3))
  ) %>%
  arrange(Media_Group, condition)

# Rendering table with comparisons
final_table_df %>%
  # We are selecting 6 columns here
  select(condition, estimate, SE, df, z_ratio = z.ratio, p_formatted) %>%
  kable(caption = "Isolated Media Effects: Difference-in-Differences Analysis (Media Δ - Control Δ)",
        # We must provide exactly 6 names here
        col.names = c("Trial Type", "Estimate", "SE", "df", "z-ratio", "p-value"),
        align = "lccccc",
        booktabs = TRUE) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, 
                position = "center") %>%
  # Use the original p.value from the data frame for the bolding logic
  row_spec(which(final_table_df$p.value < 0.05)) %>%
  pack_rows("Stereotypical Media vs. Control Media", 1, 2) %>%
  pack_rows("Counter-Stereotypical Media vs. Control Media", 3, 4) %>%
  footnote(general = "Note: Estimates represent the Media group's change (Post-Pre) relative to the Control group; negative values indicate the Media group became faster than the Control baseline.",
           general_title = "")
Isolated Media Effects: Difference-in-Differences Analysis (Media Δ - Control Δ)
Trial Type Estimate SE df z-ratio p-value
Stereotypical Media vs. Control Media
congruent -0.018 0.009 Inf -2.106 0.035
incongruent 0.060 0.009 Inf 7.055 < 0.001
Counter-Stereotypical Media vs. Control Media
congruent 0.104 0.009 Inf 12.152 < 0.001
incongruent -0.064 0.009 Inf -7.504 < 0.001
Note: Estimates represent the Media group’s change (Post-Pre) relative to the Control group; negative values indicate the Media group became faster than the Control baseline.
###########################################################

# Visualisation of the isolated media priming effect relative to Control

plot_data <- final_table_df


ggplot(plot_data, aes(x = condition, y = estimate, fill = condition)) +
  geom_bar(stat = "identity", color = "black", width = 0.6, alpha = 0.85) +
  
  geom_errorbar(aes(ymin = estimate - SE, ymax = estimate + SE), 
                width = 0.15, linewidth = 0.7, color = "grey20") +
### Adding significance for clarity
  geom_text(aes(y = ifelse(estimate >= 0, estimate + SE + 0.01, estimate - SE - 0.02), 
                label = ifelse(p.value < 0.001, "***", 
                               ifelse(p.value < 0.05, "*", ""))),
            vjust = 0.5, size = 7, fontface = "bold") +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", linewidth = 0.8) +
  facet_wrap(~ Media_Group) +
  scale_fill_manual(values = c("congruent" = "darkblue", "incongruent" = "darkred")) +
  scale_x_discrete(labels = c("congruent" = "Congruent", "incongruent" = "Incongruent")) +
  
  theme_minimal(base_size = 15) +
  labs(
    title = "Occupation: Isolated Media Effect on Reaction Time",
    subtitle = "Isolated Media (Post-Pre Change) - Control (Post-Pre Change)",
    x = "Trial Condition",
    y = "Relative Change in Log RT",
    caption = "Baseline 0 = Control Change:\n Negative values = FASTER than Control; Positive values = SLOWER than Control\n*** p < .001, * p < .05"
  ) +
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold", size = 16),
    plot.subtitle = element_text(hjust = 0.5, size = 12, color = "grey30"),
    strip.text = element_text(face = "bold", size = 13),
    panel.grid.major.x = element_blank(),
    panel.grid.minor.y = element_blank(),
    legend.position = "none",
    axis.title.y = element_text(margin = margin(r = 10))
  )

Gaze Data

Model Comparisons

Click to View Phase 2: Hierarchical GAMM Model Comparisons Full Output
Occupation Phase 2 Gaze Data: Hierarchical Model Comparison Results
Predictor Type Result
Main Effects
Pre/Post Parametric Non-significant (χ² = 25.17, df = 6, p = n.s.)
Pre/Post Smooth Significant (χ² = 26.61, df = 18, p < .001)
Condition Parametric Non-significant (χ² = 23.29, df = 6, p = n.s.)
Condition Smooth Significant (χ² = 564.14, df = 18, p < .001)
Media Parametric Non-significant (AIC favored Reduced Model; ΔAIC = 19.38)
Media Smooth Significant (χ² = 26.56, df = 16, p < .001; ΔAIC = -114.24)
Two-Way Interactions
Pre/Post × Condition Parametric Significant (χ² = 124.46, df = 29, p < .001)
Pre/Post × Condition Smooth Significant (χ² = 612.53, df = 31, p < .001)
Media × Pre/Post Parametric Non-significant (χ² = 1.18, df = 4, p = .671; ΔAIC = 3.99)
Media × Pre/Post Smooth Significant (AIC favored Full Model; ΔAIC = -8.82)
Media × Condition Parametric Non-significant (AIC favored Reduced Model; ΔAIC = 19.11)
Media × Condition Smooth Significant (AIC favored Full Model; ΔAIC = -8.82)
Three-Way Interaction
Media × Pre/Post × Condition Parametric Significant (χ² = 51.83, df = 20, p < .001)
Media × Pre/Post × Condition Smooth Significant (χ² = 52.23, df = 22, p < .001)
Note:
Model comparisons performed via Likelihood Ratio Tests (LRT) and AIC differences.

GAMM Model Output

Click to View Phase 2: GAMM Model Output
Parametric Coefficients for Phase 2 GAMM Model (Occupation Gaze Data)
Term Estimate Std. Error t-value p-value
(Intercept) 1.250 0.570 2.192 0.0280
Condition: Incongruent -3.382 0.928 -3.644 0.0001
Pre/Post: Post -0.996 0.724 -1.376 0.1690
Media: Stereo -1.160 0.744 -1.560 0.1190
Media: CounterS 0.365 0.742 0.492 0.6230
Incongruent × Post 2.899 1.325 2.187 0.0290
Incongruent × Stereo 1.595 1.011 1.578 0.1150
Incongruent × CounterS 0.278 1.010 0.276 0.7830
Post × Stereo 2.408 0.992 2.428 0.0150
Post × CounterS 0.734 0.997 0.737 0.4610
Incongruent × Post × Stereo -2.127 1.423 -1.495 0.1350
Incongruent × Post × CounterS -0.552 1.425 -0.387 0.6990
Approximate Significance of Phase 2 Smooth Terms
Smooth Term edf F-value p-value
s(Time) 2.1700 0.680 0.0001
s(TRIAL_INDEX) 0.0003 0.000 0.4600
s(Time):Congruent.Pre.Control 5.5800 1.163 0.0001
s(Time):Incongruent.Pre.Control 6.0800 2.376 0.0001
s(Time):Congruent.Post.Control 2.9700 0.781 0.0001
s(Time):Incongruent.Post.Control 5.0600 1.653 0.0001
s(Time):Congruent.Pre.Stereo 0.8570 0.426 0.0001
s(Time):Incongruent.Pre.Stereo 7.0400 4.513 0.0001
s(Time):Congruent.Post.Stereo 0.6860 0.156 0.0060
s(Time):Incongruent.Post.Stereo 7.4400 3.970 0.0001
s(Time):Congruent.Pre.CounterS 0.9480 1.310 0.0001
s(Time):Incongruent.Pre.CounterS 9.3600 3.712 0.0001
s(Time):Congruent.Post.CounterS 1.6500 0.982 0.0001
s(Time):Incongruent.Post.CounterS 7.5600 3.662 0.0001
s(TRIAL_INDEX):Congruent.Pre 0.0001 0.000 0.6370
s(TRIAL_INDEX):Incongruent.Pre 0.8010 0.575 0.0140
s(TRIAL_INDEX):Congruent.Post 0.0002 0.000 0.8390
s(TRIAL_INDEX):Incongruent.Post 0.7360 0.349 0.0340
s(Time,Item) 31.5000 0.736 0.0001
s(Time,Subject) 408.0000 1.382 0.0001

Non-Linear Visualisations: (Condition x Pre-Post x Media)

Model-predicted trajectories from GAMM output. Not in-text as not significant, but showing overall interaction.

Click to View Phase 2: Non-linear visualisations
## [1] "Overall view"
## [1] "Three Way Interaction"

Isolating Media Priming Effect on Gaze Data

Difference-in-differences approach: Post-pre change in model-predicted trajectories of elogit Bias Advantage calculated for each Media Condition.

To isolate the effect of stereotypical/counter-stereotypical portrayals from the neutral baseline over time, Post-Pre Change observed in Control group is subtracted from the two experimental media conditions.

Pointwise significance over time for a difference-in-differences (DiD) contrast.

Click to View Phase 2: Isolated Media Effect
#######################################
# GAZE DATA – Difference-in-Differences
########################################
# --- Set up conditions ---
conditions <- c("congruent", "incongruent")
pre_posts  <- c("pre", "post")
medias     <- c("Control", "Stereo", "CounterS")

# Model predicted trajectories
new_data_p2 <- expand.grid(
  Time = seq(-400, 600, length.out = 400),
  condition = conditions,
  pre_post = pre_posts,
  media = medias,
  Subject = "51_a_nc",
  Item = "19",
  TRIAL_INDEX = 55
) %>%
  mutate(
    condition_prepost_media = paste(condition, pre_post, media, sep = "."),
    condition_prepost = paste(condition, pre_post, sep = ".")
  )

predicted_data_p2 <- predict(
  P2.nd,
  newdata = new_data_p2,
  type = "link",
  se.fit = TRUE,
  exclude = c("s(Time,Item)", "s(Time,Subject)")
)

plot_data_p2 <- new_data_p2 %>%
  mutate(
    fit = predicted_data_p2$fit,
    se  = predicted_data_p2$se.fit
  )


# Compute Post–Pre Change across Media x Condition


delta_cond_media <- plot_data_p2 %>%
  select(Time, media, condition, pre_post, fit, se) %>%
  pivot_wider(
    names_from = pre_post,
    values_from = c(fit, se)
  ) %>%
  mutate(
    delta = fit_post - fit_pre,
    delta_se = sqrt(se_post^2 + se_pre^2)
  )


# Difference-in-Differences (Media – Control) -- Pre-Post Change Baseline Subtraction 


did_cond_media <- delta_cond_media %>%
  select(Time, media, condition, delta, delta_se) %>%
  pivot_wider(
    names_from = media,
    values_from = c(delta, delta_se)
  ) %>%
  mutate(
    did_Stereo = delta_Stereo - delta_Control,
    did_se_Stereo = sqrt(delta_se_Stereo^2 + delta_se_Control^2),
    lower_Stereo = did_Stereo - 1.96 * did_se_Stereo,
    upper_Stereo = did_Stereo + 1.96 * did_se_Stereo,
  
    did_CounterS = delta_CounterS - delta_Control,
    did_se_CounterS = sqrt(delta_se_CounterS^2 + delta_se_Control^2),
    lower_CounterS = did_CounterS - 1.96 * did_se_CounterS,
    upper_CounterS = did_CounterS + 1.96 * did_se_CounterS
  ) %>%
  # Pivot back to long for plotting
  pivot_longer(
    cols = starts_with("did_") | starts_with("lower_") | starts_with("upper_"),
    names_to = c(".value", "media"),
    names_pattern = "(.*)_(Stereo|CounterS)"
  ) %>%
  mutate(
    is_sig = (lower > 0 | upper < 0)
  )



# Pointwise Significance


did_cond_media <- did_cond_media %>%
  mutate(
    is_sig = (lower > 0 | upper < 0),
    sig_y = -7.5
  )

########################################
# Visualisation of Isolated Media Effect
########################################

# Forcing Stereotypical First
did_cond_media <- did_cond_media %>%
  mutate(media = factor(media, levels = c("Stereo", "CounterS")))

# Define the labels for the facets
media_labels <- c(
  Stereo = "Stereotypical Media",
  CounterS = "Counter-Stereotypical Media"
)

ggplot(did_cond_media,
       aes(x = Time, y = did, colour = condition, fill = condition)) +

  geom_tile(data = subset(did_cond_media, is_sig),aes(y = sig_y, height = 0.6),
    alpha = 0.9, colour = NA  ) +
  geom_ribbon(  aes(ymin = lower, ymax = upper), alpha = 0.15, colour = NA ) +
  geom_line(aes(linetype = condition), linewidth = 1.2) +
  geom_hline( yintercept = 0, linetype = "solid", linewidth = 0.8,
    colour = "black") +
  #annotate(  "text", x = 580, y = 0.5, label = "Control Baseline", size = 3.5, fontface = "italic", hjust = 1) +
  
  geom_vline(  xintercept = 0,  linetype = "dotted",  colour = "grey40" ) +
  facet_wrap(~media, labeller = as_labeller(media_labels)) +
  coord_cartesian(ylim = c(-8, 8)) +
  scale_y_continuous(breaks = seq(-8, 8, by = 2)) +
  scale_x_continuous(
    limits = c(-400, 600),
    breaks = seq(-400, 600, 200) ) +
  
  scale_colour_manual( name = "Trial Type", values = c(congruent = "darkred", incongruent = "#0072B2") ) +
  scale_fill_manual( name = "Trial Type",  values = c(congruent = "darkred", incongruent = "#0072B2") ) +
  scale_linetype_manual( values = c(congruent = "solid", incongruent = "longdash")) +
  
  labs(
    y = "Post-Pre Change in Bias Advantage (elogit)",
    x = "Time (ms) relative to Target Onset",
    title = "Occupation: Isolated Media Effect",
    subtitle = "Difference-in-Differences relative to Control baseline",
    caption = str_wrap("Coloured horizontal indicators denote time windows of significant pointwise deviation from the Control baseline (p < .05). Positive values indicate an increase in Bias Advantage relative to Control.", width = 95)) +
  
  theme_bw(base_size = 18) +
  theme(
    plot.title = element_text(face = "bold", hjust = 0.5, size = 22),
    plot.subtitle = element_text(hjust = 0.5, size = 16),
    plot.caption = element_text(size = 16, hjust = 0, margin = margin(t = 20), lineheight = 1.1),
    legend.position = "bottom",
    legend.text = element_text(size = 16),
    legend.title = element_text(size = 18, face = "bold"),
    strip.background = element_rect(fill = "grey95"),
    strip.text = element_text(face = "bold", size = 18),
    axis.title = element_text(size = 18),
    axis.text = element_text(size = 14)
  ) +
  guides(
    colour = guide_legend(override.aes = list(alpha = 1, linewidth = 2.5, fill = NA)),
    fill = "none",
    linetype = "none"
  )