Chapter 12 Effects on losers

This chapter explores the first hypothesis in the pre-registration of the experiment: Individuals that receive an unfavorable outcome express lower fairness perception than individuals that receive a favorable outcome. The estimation of the Average Marginal Component Effects is based on the function developed by Mikael P. Johannesson, and available on Github.

if(!require("broom")){install.packages("broom");  library(broom)}
if(!require("haven")){install.packages("haven");  library(haven)}
if(!require("here")){install.packages("here");  library(here)}
if(!require("knitr")){install.packages("knitr");  library(knitr)}
if(!require("kableExtra")){install.packages("kableExtra");  library(kableExtra)}
if(!require("naniar")){install.packages("naniar");  library(naniar)}
if(!require("tidyverse")){install.packages("tidyverse");  library(tidyverse)}
# The analysis uses custom functions included in the compendium. Install the included pkg with `devtools::install()` or just install from github with:
if (!require(wiggle)) {  devtools::install_github("mikajoh/wiggle")}

set.seed(2016)
## Utils. 
source("goodloser-utils.R")

d <- read_sav("Data/Goodloser-exp2.sav")

knitr::opts_chunk$set(echo = TRUE, knitr.kable.NA = "", cache = FALSE, warning = FALSE)

12.1 Prepare data

d <- d %>%
  filter(favorability == "Unfavorable") %>% 
  mutate(treatment = lvls_reorder(treatment, c(3, 2, 1, 4)) 
  )

12.2 Fairness

res_main <-  lm(fairness ~ treatment, data = d) 
res_main <- broom::tidy(res_main)

labels <- data.frame(
  term = c(
    "treatmentLamenting politician",
    "treatmentGeneral Prime",
    "treatmentSpecific prime"
    
  ),
  label = c( "Lamenting politician",
             "General prime",
             "Specific prime")
)
#Figure
fig <-   res_main %>%
  filter(term != "(Intercept)") %>% 
  left_join(labels, by = "term") %>% 
  
  ggplot(aes(x = estimate, y = label,
             xmin = estimate - (2 * std.error),
             xmax = estimate + (2 * std.error))) +
   geom_errorbarh(height = 0) +
  geom_point() +
  geom_vline(aes(xintercept = 0), linetype = "dotted") +
  scale_x_continuous(limits = c(-1, 1),
                     breaks = round(seq(-1, 1, .25), 2),
                     expand = c(0, 0)) +
  labs(x = "Change in fairness perception among losers",
       y = "Decision process attributes") +
  theme_bw() +
  theme(plot.margin = unit(c(2, 2, 2, 2), "mm"), axis.text.x=element_text(size=rel(0.7))) +
  theme(panel.spacing = unit(0.5, "lines"))
fig

ggsave(
  here("output", "novig", "figs", "pngs", "exp2-fairness-losers.png"),
  plot = fig,
  width = 5.5, height = 2.75
)

ggsave(
  here("output", "novig", "figs", "pdfs", "exp2-fairness-losers.pdf"),
  plot = fig,
  width = 5.5, height = 2.75
)


#Table
table <- res_main %>% 
  select(term, estimate, std.error, statistic, p.value) %>% 
  mutate(term = case_when( term == "(Intercept)" ~ "Not shown",
                    term == "treatmentLamenting politician" ~ "Lamenting politician",
                   term == "treatmentGeneral Prime" ~ "General prime", 
                   term == "treatmentSpecific prime" ~ "Specific prime"))

kable(table, booktabs = TRUE, caption = "Treatment effects among losers on fairness perceptions of decision, Study 2 -- Norwegian vignette", col.names = linebreak(c("Treatment value", "Estimate", "Std. Error", "t-statistic", "p value"))) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "responsive")) 
(#tab:205_post_fairness)Treatment effects among losers on fairness perceptions of decision, Study 2 – Norwegian vignette
Treatment value Estimate Std. Error t-statistic p value
Not shown 3.7433155 0.0562226 66.5803051 0.0000000
Lamenting politician 0.0623988 0.0808623 0.7716674 0.4405396
General prime 0.3455734 0.0760796 4.5422630 0.0000064
Specific prime 0.2520549 0.0767956 3.2821527 0.0010749

12.3 Willingnes to accept

res_main <-  lm(accept ~ treatment, data = d) 
res_main <- broom::tidy(res_main)

labels <- data.frame(
  term = c(
    "treatmentLamenting politician",
    "treatmentGeneral Prime",
    "treatmentSpecific prime"
  ),
  label = c( "Lamenting politician",
             "General prime",
             "Specific prime")
)
#Figure
fig <-   res_main %>%
  filter(term != "(Intercept)") %>% 
  left_join(labels, by = "term") %>% 
  
  ggplot(aes(x = estimate, y = label,
             xmin = estimate - (2 * std.error),
             xmax = estimate + (2 * std.error))) +
   geom_errorbarh(height = 0) +
  geom_point() +
  geom_vline(aes(xintercept = 0), linetype = "dotted") +
  scale_x_continuous(limits = c(-1, 1),
                     breaks = round(seq(-1, 1, .25), 2),
                     expand = c(0, 0)) +
  labs(x = "Change in willingness to accept outcome among losers",
       y = "Decision process attributes") +
  theme_bw() +
  theme(plot.margin = unit(c(2, 2, 2, 2), "mm"), axis.text.x=element_text(size=rel(0.7))) +
  theme(panel.spacing = unit(0.5, "lines"))
fig

ggsave(
  here("output", "novig", "figs", "pngs", "exp2-accept-losers.png"),
  plot = fig,
  width = 5.5, height = 2.75
)

ggsave(
  here("output", "novig", "figs", "pdfs", "exp2-accept-losers.pdf"),
  plot = fig,
  width = 5.5, height = 2.75
)


#Table
table <- res_main %>% 
  select(term, estimate, std.error, statistic, p.value) %>% 
  mutate(term = case_when( term == "(Intercept)" ~ "Not shown",
                    term == "treatmentLamenting politician" ~ "Lamenting politician",
                   term == "treatmentGeneral Prime" ~ "General prime", 
                   term == "treatmentSpecific prime" ~ "Specific prime"))

kable(table, booktabs = TRUE, caption = "Treatment effects among losers on willingness to accept decision, Study 2 -- Norwegian vignette", col.names = linebreak(c("Treatment value", "Estimate", "Std. Error", "t-statistic", "p value"))) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "responsive")) 
(#tab:205_post_accept)Treatment effects among losers on willingness to accept decision, Study 2 – Norwegian vignette
Treatment value Estimate Std. Error t-statistic p value
Not shown 3.5240964 0.0739779 47.6371709 0.0000000
Lamenting politician 0.0668127 0.1066391 0.6265311 0.5311653
General prime 0.2945311 0.0996294 2.9562660 0.0032157
Specific prime 0.1859036 0.1000754 1.8576354 0.0636289

12.4 Trust in politician

res_main <-  lm(trust ~ treatment, data = d) 
res_main <- broom::tidy(res_main)

labels <- data.frame(
  term = c(
    "treatmentLamenting politician",
    "treatmentGeneral Prime",
    "treatmentSpecific prime"
  ),
  label = c( "Lamenting politician",
             "General prime",
             "Specific prime")
)
#Figure
fig <-   res_main %>%
  filter(term != "(Intercept)") %>% 
  left_join(labels, by = "term") %>% 
  
  ggplot(aes(x = estimate, y = label,
             xmin = estimate - (2 * std.error),
             xmax = estimate + (2 * std.error))) +
   geom_errorbarh(height = 0) +
  geom_point() +
  geom_vline(aes(xintercept = 0), linetype = "dotted") +
  scale_x_continuous(limits = c(-1, 1),
                     breaks = round(seq(-1, 1, .25), 2),
                     expand = c(0, 0)) +
  labs(x = "Change in willingness to accept outcome among losers",
       y = "Decision process attributes") +
  theme_bw() +
  theme(plot.margin = unit(c(2, 2, 2, 2), "mm"), axis.text.x=element_text(size=rel(0.7))) +
  theme(panel.spacing = unit(0.5, "lines"))
fig

ggsave(
  here("output", "novig", "figs", "pngs", "exp2-trust-losers.png"),
  plot = fig,
  width = 5.5, height = 2.75
)

ggsave(
  here("output", "novig", "figs", "pdfs", "exp2-trust-losers.pdf"),
  plot = fig,
  width = 5.5, height = 2.75
)


#Table
table <- res_main %>% 
  select(term, estimate, std.error, statistic, p.value) %>% 
  mutate(term = case_when( term == "(Intercept)" ~ "Not shown",
                    term == "treatmentLamenting politician" ~ "Lamenting politician",
                   term == "treatmentGeneral Prime" ~ "General prime", 
                   term == "treatmentSpecific prime" ~ "Specific prime"))

kable(table, booktabs = TRUE, caption = "Treatment effects among losers on trust in politician, Study 2 -- Norwegian vignette", col.names = linebreak(c("Treatment value", "Estimate", "Std. Error", "t-statistic", "p value"))) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "responsive")) 
(#tab:205_post_trust)Treatment effects among losers on trust in politician, Study 2 – Norwegian vignette
Treatment value Estimate Std. Error t-statistic p value
Not shown 3.2303371 0.0607108 53.2085809 0.0000000
Lamenting politician -0.0210348 0.0866036 -0.2428854 0.8081588
General prime 0.1138490 0.0820811 1.3870301 0.1658334
Specific prime 0.1458534 0.0825225 1.7674379 0.0775504