Analyses
Interaction
Selected Black candidate
##
## Call:
## glm(formula = selectedblackcand ~ cond_end * cond_selection,
## family = "binomial", data = noselection_clean)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.119 0.288 -3.89 0.0001 ***
## cond_endStrongEndorsement 1.030 0.378 2.73 0.0064 **
## cond_selectionSawSelectionOption 0.426 0.389 1.10 0.2730
## cond_endStrongEndorsement:cond_selectionSawSelectionOption -0.883 0.532 -1.66 0.0968 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 336.14 on 257 degrees of freedom
## Residual deviance: 328.18 on 254 degrees of freedom
## (59 observations deleted due to missingness)
## AIC: 336.2
##
## Number of Fisher Scoring iterations: 4
Selected Black candidate
##
## Call:
## glm(formula = didnotselectanyone ~ cond_end * cond_selection,
## family = "binomial", data = noselection_clean)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.776 0.326 -5.45 0.000000051 ***
## cond_endStrongEndorsement 0.211 0.439 0.48 0.63
## cond_selectionSawSelectionOption -0.111 0.471 -0.23 0.81
## cond_endStrongEndorsement:cond_selectionSawSelectionOption 0.578 0.612 0.94 0.35
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 290.99 on 312 degrees of freedom
## Residual deviance: 286.58 on 309 degrees of freedom
## (4 observations deleted due to missingness)
## AIC: 294.6
##
## Number of Fisher Scoring iterations: 4
Controls
Selected Black Candidate
##
## Call:
## glm(formula = selectedblackcand ~ cond_end + cond_selection,
## family = "binomial", data = noselection_clean)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.8723 0.2330 -3.74 0.00018 ***
## cond_endStrongEndorsement 0.5922 0.2633 2.25 0.02453 *
## cond_selectionSawSelectionOption -0.0454 0.2628 -0.17 0.86296
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 336.14 on 257 degrees of freedom
## Residual deviance: 330.96 on 255 degrees of freedom
## (59 observations deleted due to missingness)
## AIC: 337
##
## Number of Fisher Scoring iterations: 4
Did not select anyone
##
## Call:
## glm(formula = didnotselectanyone ~ cond_end + cond_selection,
## family = "binomial", data = noselection_clean)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.952 0.286 -6.83 0.0000000000085 ***
## cond_endStrongEndorsement 0.515 0.305 1.69 0.091 .
## cond_selectionSawSelectionOption 0.233 0.299 0.78 0.437
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 290.99 on 312 degrees of freedom
## Residual deviance: 287.48 on 310 degrees of freedom
## (4 observations deleted due to missingness)
## AIC: 293.5
##
## Number of Fisher Scoring iterations: 4
Within participants who saw a selection option
Selected Black candidate
summary(glm(selectedblackcand~cond_end, noselection_clean %>% filter(cond_selection == "SawSelectionOption"), family = "binomial"))##
## Call:
## glm(formula = selectedblackcand ~ cond_end, family = "binomial",
## data = noselection_clean %>% filter(cond_selection == "SawSelectionOption"))
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.693 0.261 -2.65 0.0079 **
## cond_endStrongEndorsement 0.147 0.374 0.39 0.6951
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 163.03 on 125 degrees of freedom
## Residual deviance: 162.88 on 124 degrees of freedom
## (32 observations deleted due to missingness)
## AIC: 166.9
##
## Number of Fisher Scoring iterations: 4
Did not select anyone
summary(glm(didnotselectanyone~cond_end, noselection_clean %>% filter(cond_selection == "SawSelectionOption"), family = "binomial"))##
## Call:
## glm(formula = didnotselectanyone ~ cond_end, family = "binomial",
## data = noselection_clean %>% filter(cond_selection == "SawSelectionOption"))
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.887 0.339 -5.56 0.000000027 ***
## cond_endStrongEndorsement 0.788 0.426 1.85 0.064 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.74 on 155 degrees of freedom
## Residual deviance: 149.16 on 154 degrees of freedom
## (2 observations deleted due to missingness)
## AIC: 153.2
##
## Number of Fisher Scoring iterations: 4
Within participants who did not see a selection option
Selected Black candidate
summary(glm(selectedblackcand~cond_end, noselection_clean %>% filter(cond_selection == "DidNotSeeSelectionOption"), family = "binomial"))##
## Call:
## glm(formula = selectedblackcand ~ cond_end, family = "binomial",
## data = noselection_clean %>% filter(cond_selection == "DidNotSeeSelectionOption"))
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.119 0.288 -3.89 0.0001 ***
## cond_endStrongEndorsement 1.030 0.378 2.73 0.0064 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 173.05 on 131 degrees of freedom
## Residual deviance: 165.30 on 130 degrees of freedom
## (27 observations deleted due to missingness)
## AIC: 169.3
##
## Number of Fisher Scoring iterations: 4
Did not select anyone
summary(glm(didnotselectanyone~cond_end, noselection_clean %>% filter(cond_selection == "DidNotSeeSelectionOption"), family = "binomial"))##
## Call:
## glm(formula = didnotselectanyone ~ cond_end, family = "binomial",
## data = noselection_clean %>% filter(cond_selection == "DidNotSeeSelectionOption"))
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.776 0.326 -5.45 0.000000051 ***
## cond_endStrongEndorsement 0.211 0.439 0.48 0.63
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 137.66 on 156 degrees of freedom
## Residual deviance: 137.43 on 155 degrees of freedom
## (2 observations deleted due to missingness)
## AIC: 141.4
##
## Number of Fisher Scoring iterations: 4
Considerations
dvs <- c("considerations_1", "considerations_2", "considerations_3", "considerations_4", "considerations_5", "considerations_6")
dvsname <- c("Qualifications", "Skills", "Fit", "Diversity", "Race", "Wrkld")
considerationslist <- vector("list")
considerationsmeans <- vector("list")
library(emmeans)## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
for(variable in 1:length(dvs)){
index <- match(dvs[variable], colnames(noselection_clean))
colnames(noselection_clean)[index] <- "y"
considerationsregression <- lm(y~cond_end*cond_selection, noselection_clean)
considerations_emm <- emmeans::emmeans(considerationsregression, pairwise~cond_end*cond_selection)
considerationsmeans[[variable]] <- considerations_emm$emmeans %>% data.frame() %>% mutate(value = paste0(round(emmean, 2), " (", round(SE, 2), ")"),
variablename = dvsname[variable]) %>% select(cond_end, cond_selection, variablename, value)
considerationslist[[variable]] <- considerations_emm$contrasts %>%
as.data.frame() %>%
separate(contrast, into = c("G1", "G2"), sep = " - ") %>%
separate(G1, into = c("End1", "See1")) %>% separate(G2, into = c("End2", "See2")) %>%
mutate(asterix = case_when(p.value > .05 ~ "", p.value < .05 & p.value > .01 ~ "*", p.value < .01 & p.value > .001 ~ "**", p.value < .001 ~ "***")) %>% select(End1:See2, asterix) %>% mutate(variablename = dvsname[variable])
colnames(noselection_clean)[index] <- dvs[variable]
}