-
Notifications
You must be signed in to change notification settings - Fork 0
/
exp2_analysis_supplementary.Rmd
463 lines (369 loc) · 13.1 KB
/
exp2_analysis_supplementary.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
---
title: 'Experiment 2: Supplementary Analyses'
date: "`r Sys.Date()`"
output:
github_document:
toc: true
toc_depth: 3
pdf_document:
toc: true
toc_depth: 3
editor_options:
markdown:
wrap: 72
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
options(dplyr.summarise.inform = FALSE)
library(magrittr)
library(lme4)
library(lmerTest)
library(buildmer)
library(broom.mixed)
library(insight)
library(kableExtra)
```
# Setup
Variable names:
- Experiment: exp2\_
- Data (\_d\_)
- d = main df
- FF = First + Full Name conditions only
- noOther = just *he* and *she* responses
- subjGender = participant gender
- Models (\_m\_)
- cond = effect of Condition (Last vs First+Full)
- nameGender = effects of Condition (First vs Full) and Name
Gender Rating
- FF = dummy coded with First + Full Name conditions as 0, Last
Name condition as 1
- L = dummy coded with Last Name condition as 0, First + Full Name
conditions as 1
- quad = quadratic effect of Gender Rating
- subjGender = participant gender
- recentered = center name gender rating by scale (at 4)
Load data and select columns used in model. See data/exp2_data_about.txt
for more details.
```{r load-data}
exp2_d <- read.csv("../data/exp2_data.csv",
stringsAsFactors = TRUE) %>%
rename("Participant" = "SubjID", "Item" = "NameShown") %>%
select(
Participant, SubjGenderMale, Condition, GenderRating,
Item, Male, Female, Other
)
str(exp2_d)
```
Center gender rating for names: Original scale from 1 to 7, with 1 as
most masculine and 7 as most feminine. Mean-centered with higher still
as more feminine.
```{r center-gender-rating}
exp2_d %<>% mutate(GenderRatingCentered = scale(GenderRating, scale = FALSE))
```
Set contrasts for name conditions.
```{r contrast-coding}
contrasts(exp2_d$Condition) <- cbind(
"last vs first/full" = c(.33, .33, -0.66),
"first vs full" = c(-.5, .5, 0)
)
contrasts(exp2_d$Condition)
```
Subset for gender rating effects (First and Full conditions only).
```{r subset-FF}
exp2_d_FF <- exp2_d %>% filter(Condition != "last")
exp2_d_FF$Condition %<>% droplevels()
contrasts(exp2_d_FF$Condition) <- cbind(
"first vs full" = c(-.5, .5)
) # add contrast back
contrasts(exp2_d_FF$Condition)
```
# Without *Other* Responses
The first supplementary analysis tests if excluding OTHER responses
(3.72% of total responses) affects the pattern of results.
```{r count-other}
sum(exp2_d$Other)
sum(exp2_d$Other) / length(exp2_d$Other)
```
Exclude *other* responses.
```{r subset-other}
exp2_d_noOther <- exp2_d %>% filter(Other == 0)
exp2_d_FF_noOther <- exp2_d_FF %>% filter(Other == 0)
```
## Model 1: Condition w/o *Other* Responses
Effect of Name Condition (first name, last name, full name) on
likelihood of a *female* response, as opposed to a *male* response, with
*other* responses excluded. Participant and Item are again included as
random intercepts, with items defined as the unique first, last and
first + last name combinations.
```{r model-condition-other}
exp2_m_cond_noOther <- glmer(
Female ~ Condition + (1 | Participant) + (1 | Item),
data = exp2_d_noOther, family = binomial
)
summary(exp2_m_cond_noOther)
```
No differences.
### Odds Ratios: Intercept
```{r OR-condiiton-other}
exp(get_intercept(exp2_m_cond_noOther))
exp(-get_intercept(exp2_m_cond_noOther))
```
0.45x less likely to recall as female overall (or: 2.19x more likely to
recall as male/other overall), p\<.001
### Odds Ratios: Last vs First+Full
```{r OR-LFF-other}
exp2_m_cond_noOther %>%
tidy() %>%
filter(term == "Conditionlast vs first/full") %>%
pull(estimate) %>%
exp()
```
6.84x more likely to use *she* in First + Full compared to Last (or:
6.84x times more likely to use *he* and *other* in Last than in First +
Full), p\<.001
### Odds Ratios: Last Only
Dummy code with Last Name as 0, so that intercept is the Last Name
condition only.
```{r dummy-code-L-other}
exp2_d_noOther %<>% mutate(Condition_Last = case_when(
Condition == "first" ~ 1,
Condition == "full" ~ 1,
Condition == "last" ~ 0
))
exp2_d_noOther$Condition_Last %<>% as.factor()
```
```{r model-L-other}
exp2_m_L_noOther <- glmer(
Female ~ Condition_Last + (1 | Participant) + (1 | Item),
data = exp2_d_noOther, family = binomial
)
summary(exp2_m_L_noOther)
```
```{r OR-L-other}
exp(get_intercept(exp2_m_L_noOther))
exp(-get_intercept(exp2_m_L_noOther))
```
0.13x times less likely to recall as female in the Last Name condition
(or: 7.80x more likely to recall as male in the Last Name condition),
p\<.001
### Odds Ratios: First and Full Only
Dummy code with First and Full Name as 0, so that intercept is average
for these two conditions.
```{r dummy-code-FF-other}
exp2_d_noOther %<>% mutate(Condition_FF = case_when(
Condition == "first" ~ 0,
Condition == "full" ~ 0,
Condition == "last" ~ 1
))
exp2_d_noOther$Condition_FF %<>% as.factor()
```
```{r model-FF-other}
exp2_m_FF_noOther <- glmer(
Female ~ Condition_FF + (1 | Participant) + (1 | Item),
data = exp2_d_noOther, family = binomial
)
summary(exp2_m_FF_noOther)
```
```{r OR-FF-other}
exp(get_intercept(exp2_m_FF_noOther))
exp(-get_intercept(exp2_m_FF_noOther))
```
0.82x times less likely o recall as female in the First and Full Name
conditions (or: 1.22x more likely to use *he* in the n the First and
Full Name conditions), p=.17
## Model 2: Condition \* Name Gender w/o *Other* Responses
Effects of Name Condition (first name, full name) and the first name's
Gender Rating (centered, positive=more feminine) on the likelihood of a
*female* response as opposed to a *male* response, with *other*
responses excluded. In Experiment 2, the Last Name condition does not
include any instances of the gendered first name, so it is not included
here. Participant and Item are again included as random intercepts.
```{r model-gender-rating-other}
exp2_m_nameGender_noOther <- glmer(
Female ~ Condition * GenderRatingCentered + (1 | Participant) + (1 | Item),
data = exp2_d_FF_noOther, family = binomial
)
summary(exp2_m_nameGender_noOther)
```
Compared to the main analysis including *other* responses, the intercept
has a larger p-value, the difference between the First and Full Name
conditions is no longer trending, and the Name Gender Rating is the
same.
# Quadratic Name Gender Rating
The second supplementary analysis tested the effect of squared name
gender rating, such that larger values meant names with stronger gender
associations (masc or fem), and smaller values meant names with weaker
gender associations.
```{r squared-gender-rating}
exp2_d_FF %<>% mutate(GenderRatingSquared = GenderRatingCentered^2)
```
## Model 3: Quadratic
No quadratic effects.
```{r model-quad}
exp2_m_nameGender_quad <- glmer(
Female ~ Condition * GenderRatingCentered + Condition * GenderRatingSquared +
(1 | Participant) + (1 | Item),
data = exp2_d_FF, family = binomial
)
summary(exp2_m_nameGender_quad)
```
# Participant Gender
## Setup/Data Summary
The third supplementary analysis looks at participant gender: if male
participants show a larger bias to recall the character as male than
non-male participants.
Participants entered their gender in a free-response box.
```{r count-subjGender}
exp2_d %>%
group_by(SubjGenderMale) %>%
summarise(total = n_distinct(Participant)) %>%
kable()
```
For this analysis, we exclude participants who did not respond (N=88).
Because there are not enough participants to create 3 groups, we compare
male to non-male participants. Male participants (N=694) are coded as 1,
and female (N=566), nonbinary (N=2), and genderqueer (N=1) participants
are coded as 0.
Summary of responses by condition and participant gender:
```{r means-subj-gender}
exp2_d_subjGender <- exp2_d %>%
filter(!is.na(SubjGenderMale)) %>%
mutate(ResponseAll = case_when(
Male == 1 ~ "Male",
Female == 1 ~ "Female",
Other == 1 ~ "Other"
))
exp2_d_subjGender %>%
group_by(Condition, ResponseAll, SubjGenderMale) %>%
summarise(n = n()) %>%
pivot_wider(
names_from = ResponseAll,
values_from = n
) %>%
rename("ParticipantGender" = "SubjGenderMale") %>%
mutate(ParticipantGender = case_when(
ParticipantGender == "0" ~ "Non-male",
ParticipantGender == "1" ~ "Male"
)) %>%
mutate(
Female_MaleOther = Female / (Male + Other),
Female_Male = Female / Male
) %>%
kable(digits = 3)
```
Participant gender is mean centered effects coded, comparing non-male
participants to male participants.
```{r contrast-coding-subj-gender}
exp2_d_subjGender$SubjGenderMale %<>% as.factor()
contrasts(exp2_d_subjGender$SubjGenderMale) <- cbind("NM_M" = c(-.5, .5))
contrasts(exp2_d_subjGender$SubjGenderMale)
```
Subset First and Full conditions.
```{r subset-FF-subj-gender}
exp2_d_FF_subjGender <- exp2_d_subjGender %>% filter(Condition != "last")
exp2_d_FF_subjGender$Condition %<>% droplevels()
contrasts(exp2_d_FF_subjGender$Condition) <-
cbind("first vs full" = c(-.5, .5)) # add contrast back
contrasts(exp2_d_FF_subjGender$Condition)
```
## Model 4: Condition \* Participant Gender
Effect of Name Condition (first name, last name, full name) and
Participant Gender (non-male vs male) on likelihood of a *female*
response, as opposed to a *male* response or *other* response.
Participant and Item are again included as random intercepts.
```{r model-condition-subj-gender}
exp2_m_cond_subjGender <- glmer(
Female ~ Condition * SubjGenderMale + (1 | Participant) + (1 | Item),
data = exp2_d_subjGender, family = binomial
)
summary(exp2_m_cond_subjGender)
```
- Male participants are less likely to recall the character as female
overall, but this is not significant after correction for multiple
comparisons.
- The interaction between Condition (Last vs. First + Full) and
Participant Gender is significant.
### Interaction
Dummy code to get the Participant Gender effect just for First and Full
Name conditions.
```{r model-FF-subj-gender}
exp2_d_subjGender %<>% mutate(Condition_FF = case_when(
Condition == "first" ~ 0,
Condition == "full" ~ 0,
Condition == "last" ~ 1
))
exp2_d_subjGender$Condition_FF %<>% as.factor()
exp2_m_cond_FF_subjGender <- glmer(
Female ~ Condition_FF * SubjGenderMale + (1 | Participant) + (1 | Item),
data = exp2_d_subjGender, family = binomial
)
summary(exp2_m_cond_FF_subjGender)
```
Then dummy code to get the participant gender effect just for Last Name
condition.
```{r model-L-subj-gender}
exp2_d_subjGender %<>% mutate(Condition_L = case_when(
Condition == "first" ~ 1,
Condition == "full" ~ 1,
Condition == "last" ~ 0
))
exp2_d_subjGender$Condition_L %<>% as.factor()
exp2_m_cond_L_subjGender <- glmer(
Female ~ Condition_L * SubjGenderMale + (1 | Participant) + (1 | Item),
data = exp2_d_subjGender, family = binomial
)
summary(exp2_m_cond_L_subjGender)
```
- Beta for subj gender in First + Full: -0.26325
- Beta for subj gender in Last: 0.1505 NS
--\> Male participants were less likely to recall the referent as female
than non-male participants in the First and Full Name conditions. No
participant gender difference in the Last Name condition.
## Model 5: Condition \* Name Gender \* Participant Gender
Effects of Name Condition (first name, full name), the first name's
Gender Rating (centered, positive=more feminine), and Participant Gender
(non-male vs. male) on the likelihood of a *female* response as opposed
to *male* or *other* responses. In Experiment 2, the Last Name condition
does not include any instances of the gendered first name, so it is not
included here.
```{r model-gender-rating-subj-gender}
exp2_m_nameGender_subjgender <- buildmer(
formula = Female ~ Condition * GenderRatingCentered * SubjGenderMale +
(1 | Participant) + (1 | Item),
data = exp2_d_FF_subjGender, family = binomial,
buildmerControl(direction = "order", quiet = TRUE)
)
summary(exp2_m_nameGender_subjgender)
```
- Male participants are less likely to recall the character as female
overall. This matches the results of the interaction in the
condition-only model.
- The interaction between participant gender and first name gender
rating is significant. Smaller effect of name gender rating in male
participants.
- Interaction with Condition, three-way interaction with Name Gender
and Condition n.s.
# Gender Rating Centering
The first name gender ratings aren't perfectly centered, partially
because mostly-feminine/somewhat-masculine names are much less common
than mostly-masculine/somewhat-feminine names.
```{r gender-rating-mean-center}
mean(exp2_d$GenderRating, na.rm = TRUE)
```
Does it make a difference if we center it on 4, the mean of the scale,
instead of 4.22, the mean of the items?
```{r gender-rating-abs-center}
exp2_d_FF %<>% mutate(GenderRating4 = GenderRating - 4)
```
## Model 6: Gender Rating Recentered
```{r model-gender-rating-recenter}
exp2_m_recenter <- glmer(
Female ~ Condition * GenderRating4 + (1 | Participant) + (1 | Item),
data = exp2_d_FF, family = binomial
)
summary(exp2_m_recenter)
```
Here, the absolute value of the beta estimate for the intercept is again
larger for the intercept (-0.35 vs -0.18) but the same for the condition
effect (-0.21 vs -0.22).