Study 2.1: Semantic priming

Table 9 presents the results of the informative prior model, Table 10 those of the weakly-informative prior model, and Table 11 those of the diffuse prior model.

Code

# Rename effects in plain language and specify the random slopes
# (if any) for each effect, in the footnote. For this purpose, 
# superscripts are added to the names of the appropriate effects.
# 
# In the interactions below, word-level variables are presented 
# first for the sake of consistency (the order does not affect 
# the results in any way). Also in the interactions, double 
# colons are used to inform the 'bayesian_model_table' function 
# that the two terms in the interaction must be split into two 
# lines.

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_attentional_control'] = 'Attentional control'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_vocabulary_size'] = 'Vocabulary size <sup>a</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender'] = 'Gender <sup>a</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_target_word_frequency'] = 'Word frequency'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_target_number_syllables'] = 'Number of syllables'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff'] = 'Word-concreteness difference'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_cosine_similarity'] = 'Language-based similarity <sup>b</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_visual_rating_diff'] = 'Visual-strength difference <sup>b</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_recoded_interstimulus_interval'] = 'Stimulus onset asynchrony (SOA) <sup>b</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_vocabulary_size'] = 
  'Word-concreteness difference :: Vocabulary size'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_interstimulus_interval'] = 
  'Word-concreteness difference : SOA'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_participant_gender'] = 
  'Word-concreteness difference : Gender'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_attentional_control:z_cosine_similarity'] = 
  'Language-based similarity :: Attentional control'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_attentional_control:z_visual_rating_diff'] = 
  'Visual-strength difference :: Attentional control'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_cosine_similarity'] = 
  'Language-based similarity :: Vocabulary size'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_visual_rating_diff'] = 
  'Visual-strength difference :: Vocabulary size'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_cosine_similarity'] = 
  'Language-based similarity : Gender'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_visual_rating_diff'] = 
  'Visual-strength difference : Gender'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_cosine_similarity:z_recoded_interstimulus_interval'] = 
  'Language-based similarity : SOA <sup>b</sup>'

rownames(semanticpriming_summary_informativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_informativepriors_exgaussian$fixed) == 
    'z_visual_rating_diff:z_recoded_interstimulus_interval'] = 
  'Visual-strength difference : SOA <sup>b</sup>'


# Create table (using custom function from the 'R_functions' folder)
bayesian_model_table(
  semanticpriming_summary_informativepriors_exgaussian, 
  order_effects = c('(Intercept)',
                    'Attentional control',
                    'Vocabulary size <sup>a</sup>',
                    'Gender <sup>a</sup>',
                    'Word frequency',
                    'Number of syllables',
                    'Word-concreteness difference',
                    'Language-based similarity <sup>b</sup>',
                    'Visual-strength difference <sup>b</sup>',
                    'Stimulus onset asynchrony (SOA) <sup>b</sup>',
                    'Word-concreteness difference :: Vocabulary size',
                    'Word-concreteness difference : SOA',
                    'Word-concreteness difference : Gender',
                    'Language-based similarity :: Attentional control',
                    'Visual-strength difference :: Attentional control',
                    'Language-based similarity :: Vocabulary size',
                    'Visual-strength difference :: Vocabulary size',
                    'Language-based similarity : Gender',
                    'Visual-strength difference : Gender',
                    'Language-based similarity : SOA <sup>b</sup>',
                    'Visual-strength difference : SOA <sup>b</sup>'),
  interaction_symbol_x = TRUE,
  caption = 'Informative prior model for the semantic priming study.') %>%
  
  # Group predictors under headings
  pack_rows('Individual differences', 2, 4) %>% 
  pack_rows('Target-word lexical covariates', 5, 6) %>% 
  pack_rows('Prime--target relationship', 7, 9) %>% 
  pack_rows('Task condition', 10, 10) %>% 
  pack_rows('Interactions', 11, 21) %>% 
  
  # Apply white background to override default shading in HTML output
  row_spec(1:21, background = 'white') %>%
  
  # Highlight covariates
  row_spec(c(2, 5:7, 11:15), background = '#FFFFF1') %>%
  
  # Format
  kable_classic(full_width = FALSE, html_font = 'Cambria') %>%
  
  # Footnote describing abbreviations, random slopes, etc. 
  footnote(escape = FALSE, threeparttable = TRUE, 
           # The <p> below is used to enter a margin above the footnote 
           general_title = '<p style="margin-top: 10px;"></p>', 
           general = paste('*Note*. &beta; = Estimate based on $z$-scored predictors; *SE* = standard error;',
                           'CrI = credible interval. Yellow rows contain covariates. Some interactions are ',
                           'split over two lines, with the second line indented. <br>', 
                           '<sup>a</sup> By-word random slopes were included for this effect.',
                           '<sup>b</sup> By-participant random slopes were included for this effect.'))
Table 9: Informative prior model for the semantic priming study.
β SE 95% CrI \(\widehat{R}\)
(Intercept) 0.00 0.00 [0.00, 0.01] 1.00
Individual differences
Attentional control 0.00 0.00 [0.00, 0.01] 1.00
Vocabulary size a -0.01 0.00 [-0.01, 0.00] 1.00
Gender a 0.00 0.00 [0.00, 0.01] 1.00
Target-word lexical covariates
Word frequency -0.11 0.00 [-0.12, -0.11] 1.00
Number of syllables 0.07 0.00 [0.06, 0.07] 1.00
Prime–target relationship
Word-concreteness difference 0.01 0.00 [0.00, 0.01] 1.00
Language-based similarity b -0.06 0.00 [-0.07, -0.06] 1.00
Visual-strength difference b 0.01 0.00 [0.01, 0.02] 1.00
Task condition
Stimulus onset asynchrony (SOA) b 0.03 0.01 [0.02, 0.04] 1.00
Interactions
Word-concreteness difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × SOA 0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Attentional control
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Attentional control
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Vocabulary size
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × Gender 0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × SOA b 0.00 0.00 [0.00, 0.00] 1.00
Visual-strength difference × SOA b 0.00 0.00 [0.00, 0.00] 1.00

Note. β = Estimate based on \(z\)-scored predictors; SE = standard error; CrI = credible interval. Yellow rows contain covariates. Some interactions are split over two lines, with the second line indented.
a By-word random slopes were included for this effect. b By-participant random slopes were included for this effect.
Code

# Rename effects in plain language and specify the random slopes
# (if any) for each effect, in the footnote. For this purpose, 
# superscripts are added to the names of the appropriate effects.
# 
# In the interactions below, word-level variables are presented 
# first for the sake of consistency (the order does not affect 
# the results in any way). Also in the interactions, double 
# colons are used to inform the 'bayesian_model_table' function 
# that the two terms in the interaction must be split into two 
# lines.

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_attentional_control'] = 'Attentional control'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_vocabulary_size'] = 'Vocabulary size <sup>a</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender'] = 'Gender <sup>a</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_target_word_frequency'] = 'Word frequency'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_target_number_syllables'] = 'Number of syllables'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff'] = 'Word-concreteness difference'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_cosine_similarity'] = 'Language-based similarity <sup>b</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_visual_rating_diff'] = 'Visual-strength difference <sup>b</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_recoded_interstimulus_interval'] = 'Stimulus onset asynchrony (SOA) <sup>b</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_vocabulary_size'] = 
  'Word-concreteness difference :: Vocabulary size'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_interstimulus_interval'] = 
  'Word-concreteness difference : SOA'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_participant_gender'] = 
  'Word-concreteness difference : Gender'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_attentional_control:z_cosine_similarity'] = 
  'Language-based similarity :: Attentional control'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_attentional_control:z_visual_rating_diff'] = 
  'Visual-strength difference :: Attentional control'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_cosine_similarity'] = 
  'Language-based similarity :: Vocabulary size'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_visual_rating_diff'] = 
  'Visual-strength difference :: Vocabulary size'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_cosine_similarity'] = 
  'Language-based similarity : Gender'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_visual_rating_diff'] = 
  'Visual-strength difference : Gender'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_cosine_similarity:z_recoded_interstimulus_interval'] = 
  'Language-based similarity : SOA <sup>b</sup>'

rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_weaklyinformativepriors_exgaussian$fixed) == 
    'z_visual_rating_diff:z_recoded_interstimulus_interval'] = 
  'Visual-strength difference : SOA <sup>b</sup>'


# Create table (using custom function from the 'R_functions' folder)
bayesian_model_table(
  semanticpriming_summary_weaklyinformativepriors_exgaussian, 
  order_effects = c('(Intercept)',
                    'Attentional control',
                    'Vocabulary size <sup>a</sup>',
                    'Gender <sup>a</sup>',
                    'Word frequency',
                    'Number of syllables',
                    'Word-concreteness difference',
                    'Language-based similarity <sup>b</sup>',
                    'Visual-strength difference <sup>b</sup>',
                    'Stimulus onset asynchrony (SOA) <sup>b</sup>',
                    'Word-concreteness difference :: Vocabulary size',
                    'Word-concreteness difference : SOA',
                    'Word-concreteness difference : Gender',
                    'Language-based similarity :: Attentional control',
                    'Visual-strength difference :: Attentional control',
                    'Language-based similarity :: Vocabulary size',
                    'Visual-strength difference :: Vocabulary size',
                    'Language-based similarity : Gender',
                    'Visual-strength difference : Gender',
                    'Language-based similarity : SOA <sup>b</sup>',
                    'Visual-strength difference : SOA <sup>b</sup>'),
  interaction_symbol_x = TRUE,
  caption = 'Weakly-informative prior model for the semantic priming study.') %>%
  
  # Group predictors under headings
  pack_rows('Individual differences', 2, 4) %>% 
  pack_rows('Target-word lexical covariates', 5, 6) %>% 
  pack_rows('Prime--target relationship', 7, 9) %>% 
  pack_rows('Task condition', 10, 10) %>% 
  pack_rows('Interactions', 11, 21) %>% 
  
  # Apply white background to override default shading in HTML output
  row_spec(1:21, background = 'white') %>%
  
  # Highlight covariates
  row_spec(c(2, 5:7, 11:15), background = '#FFFFF1') %>%
  
  # Format
  kable_classic(full_width = FALSE, html_font = 'Cambria') %>%
  
  # Footnote describing abbreviations, random slopes, etc. 
  footnote(escape = FALSE, threeparttable = TRUE, 
           # The <p> below is used to enter a margin above the footnote 
           general_title = '<p style="margin-top: 10px;"></p>', 
           general = paste('*Note*. &beta; = Estimate based on $z$-scored predictors; *SE* = standard error;',
                           'CrI = credible interval. Yellow rows contain covariates. Some interactions are ',
                           'split over two lines, with the second line indented. <br>', 
                           '<sup>a</sup> By-word random slopes were included for this effect.',
                           '<sup>b</sup> By-participant random slopes were included for this effect.'))
Table 10: Weakly-informative prior model for the semantic priming study.
β SE 95% CrI \(\widehat{R}\)
(Intercept) 0.00 0.00 [0.00, 0.01] 1.00
Individual differences
Attentional control 0.00 0.00 [0.00, 0.01] 1.00
Vocabulary size a -0.01 0.00 [-0.01, 0.00] 1.00
Gender a 0.00 0.00 [0.00, 0.01] 1.00
Target-word lexical covariates
Word frequency -0.11 0.00 [-0.12, -0.11] 1.00
Number of syllables 0.07 0.00 [0.06, 0.07] 1.00
Prime–target relationship
Word-concreteness difference 0.01 0.00 [0.00, 0.01] 1.00
Language-based similarity b -0.06 0.00 [-0.07, -0.06] 1.00
Visual-strength difference b 0.01 0.00 [0.01, 0.01] 1.00
Task condition
Stimulus onset asynchrony (SOA) b 0.03 0.01 [0.02, 0.04] 1.00
Interactions
Word-concreteness difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × SOA 0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Attentional control
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Attentional control
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Vocabulary size
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × Gender 0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × SOA b 0.00 0.00 [0.00, 0.00] 1.00
Visual-strength difference × SOA b 0.00 0.00 [0.00, 0.00] 1.00

Note. β = Estimate based on \(z\)-scored predictors; SE = standard error; CrI = credible interval. Yellow rows contain covariates. Some interactions are split over two lines, with the second line indented.
a By-word random slopes were included for this effect. b By-participant random slopes were included for this effect.
Code

# Rename effects in plain language and specify the random slopes
# (if any) for each effect, in the footnote. For this purpose, 
# superscripts are added to the names of the appropriate effects.
# 
# In the interactions below, word-level variables are presented 
# first for the sake of consistency (the order does not affect 
# the results in any way). Also in the interactions, double 
# colons are used to inform the 'bayesian_model_table' function 
# that the two terms in the interaction must be split into two 
# lines.

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_attentional_control'] = 'Attentional control'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_vocabulary_size'] = 'Vocabulary size <sup>a</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender'] = 'Gender <sup>a</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_target_word_frequency'] = 'Word frequency'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_target_number_syllables'] = 'Number of syllables'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff'] = 'Word-concreteness difference'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_cosine_similarity'] = 'Language-based similarity <sup>b</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_visual_rating_diff'] = 'Visual-strength difference <sup>b</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_recoded_interstimulus_interval'] = 'Stimulus onset asynchrony (SOA) <sup>b</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_vocabulary_size'] = 
  'Word-concreteness difference :: Vocabulary size'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_interstimulus_interval'] = 
  'Word-concreteness difference : SOA'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_word_concreteness_diff:z_recoded_participant_gender'] = 
  'Word-concreteness difference : Gender'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_attentional_control:z_cosine_similarity'] = 
  'Language-based similarity :: Attentional control'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_attentional_control:z_visual_rating_diff'] = 
  'Visual-strength difference :: Attentional control'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_cosine_similarity'] = 
  'Language-based similarity :: Vocabulary size'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_vocabulary_size:z_visual_rating_diff'] = 
  'Visual-strength difference :: Vocabulary size'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_cosine_similarity'] = 
  'Language-based similarity : Gender'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_recoded_participant_gender:z_visual_rating_diff'] = 
  'Visual-strength difference : Gender'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_cosine_similarity:z_recoded_interstimulus_interval'] = 
  'Language-based similarity : SOA <sup>b</sup>'

rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed)[
  rownames(semanticpriming_summary_diffusepriors_exgaussian$fixed) == 
    'z_visual_rating_diff:z_recoded_interstimulus_interval'] = 
  'Visual-strength difference : SOA <sup>b</sup>'


# Create table (using custom function from the 'R_functions' folder)
bayesian_model_table(
  semanticpriming_summary_diffusepriors_exgaussian, 
  order_effects = c('(Intercept)',
                    'Attentional control',
                    'Vocabulary size <sup>a</sup>',
                    'Gender <sup>a</sup>',
                    'Word frequency',
                    'Number of syllables',
                    'Word-concreteness difference',
                    'Language-based similarity <sup>b</sup>',
                    'Visual-strength difference <sup>b</sup>',
                    'Stimulus onset asynchrony (SOA) <sup>b</sup>',
                    'Word-concreteness difference :: Vocabulary size',
                    'Word-concreteness difference : SOA',
                    'Word-concreteness difference : Gender',
                    'Language-based similarity :: Attentional control',
                    'Visual-strength difference :: Attentional control',
                    'Language-based similarity :: Vocabulary size',
                    'Visual-strength difference :: Vocabulary size',
                    'Language-based similarity : Gender',
                    'Visual-strength difference : Gender',
                    'Language-based similarity : SOA <sup>b</sup>',
                    'Visual-strength difference : SOA <sup>b</sup>'),
  interaction_symbol_x = TRUE,
  caption = 'Diffuse prior model for the semantic priming study.') %>%
  
  # Group predictors under headings
  pack_rows('Individual differences', 2, 4) %>% 
  pack_rows('Target-word lexical covariates', 5, 6) %>% 
  pack_rows('Prime--target relationship', 7, 9) %>% 
  pack_rows('Task condition', 10, 10) %>% 
  pack_rows('Interactions', 11, 21) %>% 
  
  # Apply white background to override default shading in HTML output
  row_spec(1:21, background = 'white') %>%
  
  # Highlight covariates
  row_spec(c(2, 5:7, 11:15), background = '#FFFFF1') %>%
  
  # Format
  kable_classic(full_width = FALSE, html_font = 'Cambria') %>%
  
  # Footnote describing abbreviations, random slopes, etc. 
  footnote(escape = FALSE, threeparttable = TRUE, 
           # The <p> below is used to enter a margin above the footnote 
           general_title = '<p style="margin-top: 10px;"></p>', 
           general = paste('*Note*. &beta; = Estimate based on $z$-scored predictors; *SE* = standard error;',
                           'CrI = credible interval. Yellow rows contain covariates. Some interactions are ',
                           'split over two lines, with the second line indented. <br>', 
                           '<sup>a</sup> By-word random slopes were included for this effect.',
                           '<sup>b</sup> By-participant random slopes were included for this effect.'))
Table 11: Diffuse prior model for the semantic priming study.
β SE 95% CrI \(\widehat{R}\)
(Intercept) 0.00 0.00 [0.00, 0.01] 1.00
Individual differences
Attentional control 0.00 0.00 [0.00, 0.01] 1.00
Vocabulary size a -0.01 0.00 [-0.01, 0.00] 1.00
Gender a 0.00 0.00 [0.00, 0.01] 1.00
Target-word lexical covariates
Word frequency -0.11 0.00 [-0.12, -0.11] 1.00
Number of syllables 0.07 0.00 [0.06, 0.07] 1.00
Prime–target relationship
Word-concreteness difference 0.01 0.00 [0.00, 0.01] 1.00
Language-based similarity b -0.06 0.00 [-0.07, -0.06] 1.00
Visual-strength difference b 0.01 0.00 [0.01, 0.01] 1.00
Task condition
Stimulus onset asynchrony (SOA) b 0.03 0.01 [0.02, 0.04] 1.00
Interactions
Word-concreteness difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × SOA 0.00 0.00 [0.00, 0.00] 1.00
Word-concreteness difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Attentional control
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Attentional control
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity ×
   Vocabulary size
0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference ×
   Vocabulary size
0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × Gender 0.00 0.00 [-0.01, 0.00] 1.00
Visual-strength difference × Gender 0.00 0.00 [0.00, 0.00] 1.00
Language-based similarity × SOA b 0.00 0.00 [0.00, 0.00] 1.00
Visual-strength difference × SOA b 0.00 0.00 [0.00, 0.00] 1.00

Note. β = Estimate based on \(z\)-scored predictors; SE = standard error; CrI = credible interval. Yellow rows contain covariates. Some interactions are split over two lines, with the second line indented.
a By-word random slopes were included for this effect. b By-participant random slopes were included for this effect.

Figure 67 presents the posterior distribution of each effect in each model. The frequentist estimates are also shown to facilitate the comparison.

Code

# Run plot through source() rather than directly in this R Markdown document
# to preserve the format.

source('semanticpriming/frequentist_bayesian_plots/semanticpriming_frequentist_bayesian_plots.R',
       local = TRUE)

include_graphics(
  paste0(
    getwd(),  # Circumvent illegal characters in file path
    '/semanticpriming/frequentist_bayesian_plots/plots/semanticpriming_frequentist_bayesian_plot_allpriors_exgaussian.pdf'
  ))

Figure 67: Estimates from the frequentist analysis (in red) and from the Bayesian analysis (in blue) for the semantic priming study, in each model. The frequentist means (represented by points) are flanked by 95% confidence intervals. The Bayesian means (represented by vertical lines) are flanked by 95% credible intervals in light blue (in some cases, the interval is occluded by the bar of the mean).




Pablo Bernabeu, 2022. Licence: CC BY 4.0.
Thesis: https://doi.org/10.17635/lancaster/thesis/1795.

Online book created using the R package bookdown.