Summary: Consistent with our previous studies, police violence significantly decreases trust in the police. This effect persists even in the presence of protester violence, although the effect is smaller. This indicates that protester violence diminishes the negative impact of police violence on trust in the police. Similar to our previous findings, we do not observe any moderation by ideology. We find similar albeit weaker patterns for trust in the government and policy support.

#means

S5 %>%
  group_by(condition) %>%
  summarise_at(.vars = c("ViolentPolice_sc", "ViolentProtester_sc"), .funs = mean)
## # A tibble: 4 × 3
##   condition          ViolentPolice_sc ViolentProtester_sc
##   <fct>                         <dbl>               <dbl>
## 1 control                        8.01                8.44
## 2 police_violence               84.4                18.3 
## 3 protester_violence            13.5                89.2 
## 4 mutual_violence               64.8                73.9
S5 %>%
  group_by(condition) %>%
  summarise_at(.vars = c("MoralPolice_sc", "MoralProtester_sc"), .funs = mean)
## # A tibble: 4 × 3
##   condition          MoralPolice_sc MoralProtester_sc
##   <fct>                       <dbl>             <dbl>
## 1 control                      88.8              83.0
## 2 police_violence              15.4              71.3
## 3 protester_violence           75.2              10.9
## 4 mutual_violence              34.7              24.4
S5 %>%
  group_by(condition) %>%
  summarise_at(.vars = c("HarmfulPolice_sc", "HarmfulProtester_sc"), .funs = mean)
## # A tibble: 4 × 3
##   condition          HarmfulPolice_sc HarmfulProtester_sc
##   <fct>                         <dbl>               <dbl>
## 1 control                        8.06                9.97
## 2 police_violence               84.5                20.8 
## 3 protester_violence            15.0                89.5 
## 4 mutual_violence               67.5                75.9
S5 %>%
  group_by(condition) %>%
  summarise_at(.vars = c("TrustPolice_sc", "TrustGov_sc"), .funs = mean)
## # A tibble: 4 × 3
##   condition          TrustPolice_sc TrustGov_sc
##   <fct>                       <dbl>       <dbl>
## 1 control                      71.4        58.3
## 2 police_violence              24.4        40.1
## 3 protester_violence           67.6        49.9
## 4 mutual_violence              43.4        45.8

#effects on trust Consistent with our previous studies, police violence significantly decreases trust in the police. This effect persists even in the presence of protester violence, although the effect is reduced. This indicates that protester violence diminishes the negative impact of police violence on trust in the police. Similar to our previous findings, we do not observe any moderation by ideology. We find similar albeit weaker patterns for trust in the government and policy support. For trust in the local government, we find that also protester violence decreases trust.

summary(model <- lm(TrustPolice_sc ~ condD1*condD2*condD3*ideology + incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustPolice_sc ~ condD1 * condD2 * condD3 * ideology + 
##     incomeN + Race4 + age + educationN + gender_dum, data = S5, 
##     na.action = na.omit)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -82.72 -16.96   1.56  15.46  75.89 
## 
## Coefficients: (8 not defined because of singularities)
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    32.1905    10.2276   3.147 0.001801 ** 
## condD1                        -49.2927     8.8576  -5.565 5.51e-08 ***
## condD2                         -9.4385     9.6500  -0.978 0.328763    
## condD3                        -28.8767     8.5299  -3.385 0.000799 ***
## ideology                        5.4482     1.4719   3.702 0.000252 ***
## incomeN                         0.3718     0.4217   0.882 0.378603    
## Race4Black                      2.5504     4.7221   0.540 0.589504    
## Race4Hispanic                   1.9845     5.3041   0.374 0.708545    
## Race4Asian                      1.4908     7.0717   0.211 0.833168    
## Race4Other                     26.7328    13.3142   2.008 0.045493 *  
## age                             0.3566     0.1044   3.417 0.000715 ***
## educationN                     -1.0787     1.6932  -0.637 0.524534    
## gender_dum                      4.6284     2.8865   1.603 0.109812    
## condD1:condD2                       NA         NA      NA       NA    
## condD1:condD3                       NA         NA      NA       NA    
## condD2:condD3                       NA         NA      NA       NA    
## condD1:ideology                 0.6683     2.1177   0.316 0.752530    
## condD2:ideology                 1.1465     2.2289   0.514 0.607347    
## condD3:ideology                 0.1901     2.0064   0.095 0.924582    
## condD1:condD2:condD3                NA         NA      NA       NA    
## condD1:condD2:ideology              NA         NA      NA       NA    
## condD1:condD3:ideology              NA         NA      NA       NA    
## condD2:condD3:ideology              NA         NA      NA       NA    
## condD1:condD2:condD3:ideology       NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25.79 on 323 degrees of freedom
## Multiple R-squared:  0.4575, Adjusted R-squared:  0.4323 
## F-statistic: 18.16 on 15 and 323 DF,  p-value: < 2.2e-16
summary(model <- lm(TrustPolice_sc ~ PoliceViolence.dum*ProtesterViolence.dum+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustPolice_sc ~ PoliceViolence.dum * ProtesterViolence.dum + 
##     incomeN + Race4 + age + educationN + gender_dum, data = S5, 
##     na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -73.220 -18.757  -0.933  19.719  60.952 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               55.6780     9.2791   6.000 5.22e-09
## PoliceViolence.dum                       -46.4196     4.3619 -10.642  < 2e-16
## ProtesterViolence.dum                     -2.4882     4.4644  -0.557 0.577677
## incomeN                                    1.0708     0.4432   2.416 0.016234
## Race4Black                                 0.5662     5.0407   0.112 0.910637
## Race4Hispanic                             -2.4244     5.6774  -0.427 0.669636
## Race4Asian                                -3.6087     7.5723  -0.477 0.633984
## Race4Other                                18.9388    14.2897   1.325 0.185979
## age                                        0.3630     0.1124   3.230 0.001361
## educationN                                -3.2862     1.7969  -1.829 0.068340
## gender_dum                                 3.9132     3.1084   1.259 0.208959
## PoliceViolence.dum:ProtesterViolence.dum  21.4903     6.1741   3.481 0.000568
##                                             
## (Intercept)                              ***
## PoliceViolence.dum                       ***
## ProtesterViolence.dum                       
## incomeN                                  *  
## Race4Black                                  
## Race4Hispanic                               
## Race4Asian                                  
## Race4Other                                  
## age                                      ** 
## educationN                               .  
## gender_dum                                  
## PoliceViolence.dum:ProtesterViolence.dum ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 27.83 on 327 degrees of freedom
## Multiple R-squared:  0.3608, Adjusted R-squared:  0.3393 
## F-statistic: 16.78 on 11 and 327 DF,  p-value: < 2.2e-16
sim_slopes(model, pred = PoliceViolence.dum, modx = ProtesterViolence.dum)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ProtesterViolence.dum is OUTSIDE the interval [1.52, 4.36], the slope
## of PoliceViolence.dum is p < .05.
## 
## Note: The range of observed values of ProtesterViolence.dum is [0.00, 1.00]
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 0.00 (0): 
## 
##     Est.   S.E.   t val.      p
## -------- ------ -------- ------
##   -46.42   4.36   -10.64   0.00
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 1.00 (1): 
## 
##     Est.   S.E.   t val.      p
## -------- ------ -------- ------
##   -24.93   4.34    -5.74   0.00
summary(model <- lm(TrustPolice_sc ~ PoliceViolence.dum*ProtesterViolence.dum*MutualViolence.dum+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit)) #the mutual violence var is the interaction between police violence and protester violence
## 
## Call:
## lm(formula = TrustPolice_sc ~ PoliceViolence.dum * ProtesterViolence.dum * 
##     MutualViolence.dum + incomeN + Race4 + age + educationN + 
##     gender_dum, data = S5, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -73.220 -18.757  -0.933  19.719  60.952 
## 
## Coefficients: (4 not defined because of singularities)
##                                                             Estimate Std. Error
## (Intercept)                                                  55.6780     9.2791
## PoliceViolence.dum                                          -46.4196     4.3619
## ProtesterViolence.dum                                        -2.4882     4.4644
## MutualViolence.dum                                           21.4903     6.1741
## incomeN                                                       1.0708     0.4432
## Race4Black                                                    0.5662     5.0407
## Race4Hispanic                                                -2.4244     5.6774
## Race4Asian                                                   -3.6087     7.5723
## Race4Other                                                   18.9388    14.2897
## age                                                           0.3630     0.1124
## educationN                                                   -3.2862     1.7969
## gender_dum                                                    3.9132     3.1084
## PoliceViolence.dum:ProtesterViolence.dum                          NA         NA
## PoliceViolence.dum:MutualViolence.dum                             NA         NA
## ProtesterViolence.dum:MutualViolence.dum                          NA         NA
## PoliceViolence.dum:ProtesterViolence.dum:MutualViolence.dum       NA         NA
##                                                             t value Pr(>|t|)
## (Intercept)                                                   6.000 5.22e-09
## PoliceViolence.dum                                          -10.642  < 2e-16
## ProtesterViolence.dum                                        -0.557 0.577677
## MutualViolence.dum                                            3.481 0.000568
## incomeN                                                       2.416 0.016234
## Race4Black                                                    0.112 0.910637
## Race4Hispanic                                                -0.427 0.669636
## Race4Asian                                                   -0.477 0.633984
## Race4Other                                                    1.325 0.185979
## age                                                           3.230 0.001361
## educationN                                                   -1.829 0.068340
## gender_dum                                                    1.259 0.208959
## PoliceViolence.dum:ProtesterViolence.dum                         NA       NA
## PoliceViolence.dum:MutualViolence.dum                            NA       NA
## ProtesterViolence.dum:MutualViolence.dum                         NA       NA
## PoliceViolence.dum:ProtesterViolence.dum:MutualViolence.dum      NA       NA
##                                                                
## (Intercept)                                                 ***
## PoliceViolence.dum                                          ***
## ProtesterViolence.dum                                          
## MutualViolence.dum                                          ***
## incomeN                                                     *  
## Race4Black                                                     
## Race4Hispanic                                                  
## Race4Asian                                                     
## Race4Other                                                     
## age                                                         ** 
## educationN                                                  .  
## gender_dum                                                     
## PoliceViolence.dum:ProtesterViolence.dum                       
## PoliceViolence.dum:MutualViolence.dum                          
## ProtesterViolence.dum:MutualViolence.dum                       
## PoliceViolence.dum:ProtesterViolence.dum:MutualViolence.dum    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 27.83 on 327 degrees of freedom
## Multiple R-squared:  0.3608, Adjusted R-squared:  0.3393 
## F-statistic: 16.78 on 11 and 327 DF,  p-value: < 2.2e-16
summary(model <- lm(TrustPolice_sc ~ PoliceViolence.dum*ProtesterViolence.dum*ideology+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustPolice_sc ~ PoliceViolence.dum * ProtesterViolence.dum * 
##     ideology + incomeN + Race4 + age + educationN + gender_dum, 
##     data = S5, na.action = na.omit)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -82.72 -16.96   1.56  15.46  75.89 
## 
## Coefficients:
##                                                   Estimate Std. Error t value
## (Intercept)                                        32.1905    10.2276   3.147
## PoliceViolence.dum                                -49.2927     8.8576  -5.565
## ProtesterViolence.dum                              -9.4385     9.6500  -0.978
## ideology                                            5.4482     1.4719   3.702
## incomeN                                             0.3718     0.4217   0.882
## Race4Black                                          2.5504     4.7221   0.540
## Race4Hispanic                                       1.9845     5.3041   0.374
## Race4Asian                                          1.4908     7.0717   0.211
## Race4Other                                         26.7328    13.3142   2.008
## age                                                 0.3566     0.1044   3.417
## educationN                                         -1.0787     1.6932  -0.637
## gender_dum                                          4.6284     2.8865   1.603
## PoliceViolence.dum:ProtesterViolence.dum           29.8546    12.9094   2.313
## PoliceViolence.dum:ideology                         0.6683     2.1177   0.316
## ProtesterViolence.dum:ideology                      1.1465     2.2289   0.514
## PoliceViolence.dum:ProtesterViolence.dum:ideology  -1.6247     3.0301  -0.536
##                                                   Pr(>|t|)    
## (Intercept)                                       0.001801 ** 
## PoliceViolence.dum                                5.51e-08 ***
## ProtesterViolence.dum                             0.328763    
## ideology                                          0.000252 ***
## incomeN                                           0.378603    
## Race4Black                                        0.589504    
## Race4Hispanic                                     0.708545    
## Race4Asian                                        0.833168    
## Race4Other                                        0.045493 *  
## age                                               0.000715 ***
## educationN                                        0.524534    
## gender_dum                                        0.109812    
## PoliceViolence.dum:ProtesterViolence.dum          0.021372 *  
## PoliceViolence.dum:ideology                       0.752530    
## ProtesterViolence.dum:ideology                    0.607347    
## PoliceViolence.dum:ProtesterViolence.dum:ideology 0.592200    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25.79 on 323 degrees of freedom
## Multiple R-squared:  0.4575, Adjusted R-squared:  0.4323 
## F-statistic: 18.16 on 15 and 323 DF,  p-value: < 2.2e-16
ggplot(S5, aes(x = ProtesterViolence, y = TrustPolice_sc, fill = PoliceViolence, group = PoliceViolence)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(width = 0.8), width = 0.75) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", colour = "grey", 
               position = position_dodge(width = 0.8), width = 0.2) +
  scale_y_continuous(limits = c(0, 100)) +
  theme_bw() +
  scale_fill_manual(values = c("grey","#80b1d3")) +
  labs(x = "", 
       y = "Score", 
       title = "Effects on trust in the police") +
  theme(
    plot.title = element_text(hjust = 0.5, size = 14), 
    plot.subtitle = element_text(hjust = 0.5),
    plot.caption = element_text(hjust = 0.5, face = "italic")
  ) 

summary(model <- lm(TrustGov_sc ~ condD1*condD2*condD3*ideology, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustGov_sc ~ condD1 * condD2 * condD3 * ideology, 
##     data = S5, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -54.419 -19.725   3.185  17.579  54.578 
## 
## Coefficients: (8 not defined because of singularities)
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    47.4533     6.0362   7.861  5.4e-14 ***
## condD1                        -14.7323     8.6589  -1.701   0.0898 .  
## condD2                          6.5975     9.4759   0.696   0.4868    
## condD3                         -2.8467     8.3614  -0.340   0.7337    
## ideology                        2.9110     1.4425   2.018   0.0444 *  
## condD1:condD2                       NA         NA      NA       NA    
## condD1:condD3                       NA         NA      NA       NA    
## condD2:condD3                       NA         NA      NA       NA    
## condD1:ideology                -0.8991     2.0901  -0.430   0.6674    
## condD2:ideology                -3.9503     2.2048  -1.792   0.0741 .  
## condD3:ideology                -2.5960     1.9807  -1.311   0.1909    
## condD1:condD2:condD3                NA         NA      NA       NA    
## condD1:condD2:ideology              NA         NA      NA       NA    
## condD1:condD3:ideology              NA         NA      NA       NA    
## condD2:condD3:ideology              NA         NA      NA       NA    
## condD1:condD2:condD3:ideology       NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25.61 on 331 degrees of freedom
## Multiple R-squared:  0.08103,    Adjusted R-squared:  0.06159 
## F-statistic: 4.169 on 7 and 331 DF,  p-value: 0.0002042
summary(model <- lm(TrustGov_sc ~ PoliceViolence.dum*ProtesterViolence.dum+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustGov_sc ~ PoliceViolence.dum * ProtesterViolence.dum + 
##     incomeN + Race4 + age + educationN + gender_dum, data = S5, 
##     na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -60.365 -17.528   1.437  18.307  61.163 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               38.7398     8.4915   4.562 7.17e-06
## PoliceViolence.dum                       -18.5136     3.9917  -4.638 5.09e-06
## ProtesterViolence.dum                     -8.6119     4.0855  -2.108  0.03580
## incomeN                                    0.7017     0.4056   1.730  0.08456
## Race4Black                                 3.7636     4.6128   0.816  0.41515
## Race4Hispanic                              0.3456     5.1955   0.067  0.94700
## Race4Asian                                -1.2193     6.9296  -0.176  0.86043
## Race4Other                                 4.6494    13.0768   0.356  0.72241
## age                                        0.3166     0.1028   3.078  0.00226
## educationN                                -0.3031     1.6444  -0.184  0.85386
## gender_dum                                 0.2069     2.8445   0.073  0.94205
## PoliceViolence.dum:ProtesterViolence.dum  14.6345     5.6501   2.590  0.01002
##                                             
## (Intercept)                              ***
## PoliceViolence.dum                       ***
## ProtesterViolence.dum                    *  
## incomeN                                  .  
## Race4Black                                  
## Race4Hispanic                               
## Race4Asian                                  
## Race4Other                                  
## age                                      ** 
## educationN                                  
## gender_dum                                  
## PoliceViolence.dum:ProtesterViolence.dum *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25.46 on 327 degrees of freedom
## Multiple R-squared:  0.1027, Adjusted R-squared:  0.07249 
## F-statistic: 3.401 on 11 and 327 DF,  p-value: 0.0001754
sim_slopes(model, pred = PoliceViolence.dum, modx = ProtesterViolence.dum)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ProtesterViolence.dum is OUTSIDE the interval [0.82, 3.79], the slope
## of PoliceViolence.dum is p < .05.
## 
## Note: The range of observed values of ProtesterViolence.dum is [0.00, 1.00]
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 0.00 (0): 
## 
##     Est.   S.E.   t val.      p
## -------- ------ -------- ------
##   -18.51   3.99    -4.64   0.00
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 1.00 (1): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -3.88   3.97    -0.98   0.33
summary(model <- lm(TrustGov_sc ~ PoliceViolence.dum*ProtesterViolence.dum*ideology + incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = TrustGov_sc ~ PoliceViolence.dum * ProtesterViolence.dum * 
##     ideology + incomeN + Race4 + age + educationN + gender_dum, 
##     data = S5, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -57.508 -18.567   2.239  18.290  56.133 
## 
## Coefficients:
##                                                   Estimate Std. Error t value
## (Intercept)                                        29.3946    10.0866   2.914
## PoliceViolence.dum                                -15.3293     8.7355  -1.755
## ProtesterViolence.dum                               5.3301     9.5169   0.560
## ideology                                            2.5430     1.4516   1.752
## incomeN                                             0.5746     0.4159   1.382
## Race4Black                                          3.3916     4.6569   0.728
## Race4Hispanic                                       1.1056     5.2310   0.211
## Race4Asian                                         -1.2980     6.9742  -0.186
## Race4Other                                          7.0558    13.1306   0.537
## age                                                 0.3062     0.1029   2.975
## educationN                                          0.0769     1.6698   0.046
## gender_dum                                          0.1541     2.8467   0.054
## PoliceViolence.dum:ProtesterViolence.dum            6.6962    12.7313   0.526
## PoliceViolence.dum:ideology                        -0.8608     2.0885  -0.412
## ProtesterViolence.dum:ideology                     -3.6701     2.1982  -1.670
## PoliceViolence.dum:ProtesterViolence.dum:ideology   2.0471     2.9883   0.685
##                                                   Pr(>|t|)   
## (Intercept)                                        0.00381 **
## PoliceViolence.dum                                 0.08024 . 
## ProtesterViolence.dum                              0.57582   
## ideology                                           0.08074 . 
## incomeN                                            0.16804   
## Race4Black                                         0.46696   
## Race4Hispanic                                      0.83274   
## Race4Asian                                         0.85247   
## Race4Other                                         0.59139   
## age                                                0.00315 **
## educationN                                         0.96330   
## gender_dum                                         0.95687   
## PoliceViolence.dum:ProtesterViolence.dum           0.59928   
## PoliceViolence.dum:ideology                        0.68051   
## ProtesterViolence.dum:ideology                     0.09596 . 
## PoliceViolence.dum:ProtesterViolence.dum:ideology  0.49380   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 25.44 on 323 degrees of freedom
## Multiple R-squared:  0.1155, Adjusted R-squared:  0.07439 
## F-statistic: 2.811 on 15 and 323 DF,  p-value: 0.0003924
sim_slopes(model, pred = ProtesterViolence.dum, modx = ideology)
## JOHNSON-NEYMAN INTERVAL 
## 
## The Johnson-Neyman interval could not be found. Is the p value for your
## interaction term below the specified alpha?
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of ProtesterViolence.dum when ideology = 1.906236 (- 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   3.77   4.02     0.94   0.35
## 
## Slope of ProtesterViolence.dum when ideology = 3.790560 (Mean): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -1.16   2.82    -0.41   0.68
## 
## Slope of ProtesterViolence.dum when ideology = 5.674885 (+ 1 SD): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -6.10   3.97    -1.53   0.13
ggplot(S5, aes(x = ProtesterViolence, y = TrustGov_sc, fill = PoliceViolence, group = PoliceViolence)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(width = 0.8), width = 0.75) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", colour = "grey", 
               position = position_dodge(width = 0.8), width = 0.2) +
  scale_y_continuous(limits = c(0, 100)) +
  theme_bw() +
  scale_fill_manual(values = c("grey","#80b1d3")) +
  labs(x = "", 
       y = "Score", 
       title = "Effects on trust in the local government") +
  theme(
    plot.title = element_text(hjust = 0.5, size = 14), 
    plot.subtitle = element_text(hjust = 0.5),
    plot.caption = element_text(hjust = 0.5, face = "italic")
  ) 

summary(model <- lm(PolicySupport ~ condD1*condD2*condD3*ideology, S5, na.action=na.omit))
## 
## Call:
## lm(formula = PolicySupport ~ condD1 * condD2 * condD3 * ideology, 
##     data = S5, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -69.859 -12.151   0.703  11.100  52.168 
## 
## Coefficients: (8 not defined because of singularities)
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    65.4501     4.4439  14.728  < 2e-16 ***
## condD1                         11.3832     6.3747   1.786   0.0751 .  
## condD2                          5.6895     6.9762   0.816   0.4153    
## condD3                         11.0098     6.1557   1.789   0.0746 .  
## ideology                       -5.2022     1.0619  -4.899 1.51e-06 ***
## condD1:condD2                       NA         NA      NA       NA    
## condD1:condD3                       NA         NA      NA       NA    
## condD2:condD3                       NA         NA      NA       NA    
## condD1:ideology                 0.8806     1.5387   0.572   0.5675    
## condD2:ideology                -0.3789     1.6232  -0.233   0.8156    
## condD3:ideology                -0.8983     1.4582  -0.616   0.5383    
## condD1:condD2:condD3                NA         NA      NA       NA    
## condD1:condD2:ideology              NA         NA      NA       NA    
## condD1:condD3:ideology              NA         NA      NA       NA    
## condD2:condD3:ideology              NA         NA      NA       NA    
## condD1:condD2:condD3:ideology       NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 18.86 on 331 degrees of freedom
## Multiple R-squared:  0.2782, Adjusted R-squared:  0.2629 
## F-statistic: 18.22 on 7 and 331 DF,  p-value: < 2.2e-16
summary(model <- lm(PolicySupport ~ PoliceViolence.dum*ProtesterViolence.dum+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = PolicySupport ~ PoliceViolence.dum * ProtesterViolence.dum + 
##     incomeN + Race4 + age + educationN + gender_dum, data = S5, 
##     na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -60.871 -12.033  -1.008  13.777  52.619 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                              52.73144    6.95385   7.583 3.53e-13
## PoliceViolence.dum                       14.75555    3.26888   4.514 8.89e-06
## ProtesterViolence.dum                     2.31621    3.34569   0.692  0.48924
## incomeN                                  -1.01775    0.33213  -3.064  0.00236
## Race4Black                                1.33943    3.77753   0.355  0.72313
## Race4Hispanic                             5.48397    4.25470   1.289  0.19834
## Race4Asian                                1.05003    5.67475   0.185  0.85332
## Race4Other                               -0.60256   10.70882  -0.056  0.95516
## age                                      -0.22014    0.08421  -2.614  0.00936
## educationN                                2.92898    1.34662   2.175  0.03034
## gender_dum                                0.48754    2.32943   0.209  0.83435
## PoliceViolence.dum:ProtesterViolence.dum -9.87734    4.62694  -2.135  0.03352
##                                             
## (Intercept)                              ***
## PoliceViolence.dum                       ***
## ProtesterViolence.dum                       
## incomeN                                  ** 
## Race4Black                                  
## Race4Hispanic                               
## Race4Asian                                  
## Race4Other                                  
## age                                      ** 
## educationN                               *  
## gender_dum                                  
## PoliceViolence.dum:ProtesterViolence.dum *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 20.85 on 327 degrees of freedom
## Multiple R-squared:  0.1279, Adjusted R-squared:  0.09858 
## F-statistic:  4.36 on 11 and 327 DF,  p-value: 4.191e-06
sim_slopes(model, pred = PoliceViolence.dum, modx = ProtesterViolence.dum)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ProtesterViolence.dum is OUTSIDE the interval [0.90, 13.25], the slope
## of PoliceViolence.dum is p < .05.
## 
## Note: The range of observed values of ProtesterViolence.dum is [0.00, 1.00]
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 0.00 (0): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   14.76   3.27     4.51   0.00
## 
## Slope of PoliceViolence.dum when ProtesterViolence.dum = 1.00 (1): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   4.88   3.25     1.50   0.13
summary(model <- lm(PolicySupport ~ PoliceViolence.dum*ProtesterViolence.dum*ideology+ incomeN + Race4 + age + educationN + gender_dum, S5, na.action=na.omit))
## 
## Call:
## lm(formula = PolicySupport ~ PoliceViolence.dum * ProtesterViolence.dum * 
##     ideology + incomeN + Race4 + age + educationN + gender_dum, 
##     data = S5, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -72.721 -11.416   0.356  11.012  51.928 
## 
## Coefficients:
##                                                   Estimate Std. Error t value
## (Intercept)                                        73.7234     7.4179   9.939
## PoliceViolence.dum                                 12.0253     6.4243   1.872
## ProtesterViolence.dum                               6.7507     6.9990   0.965
## ideology                                           -4.8483     1.0675  -4.542
## incomeN                                            -0.4372     0.3059  -1.429
## Race4Black                                         -0.6423     3.4248  -0.188
## Race4Hispanic                                       2.0530     3.8470   0.534
## Race4Asian                                         -3.8201     5.1290  -0.745
## Race4Other                                         -6.5683     9.6566  -0.680
## age                                                -0.2131     0.0757  -2.815
## educationN                                          1.0266     1.2280   0.836
## gender_dum                                         -0.2418     2.0935  -0.116
## PoliceViolence.dum:ProtesterViolence.dum           -6.8517     9.3630  -0.732
## PoliceViolence.dum:ideology                         0.8353     1.5359   0.544
## ProtesterViolence.dum:ideology                     -0.5925     1.6166  -0.367
## PoliceViolence.dum:ProtesterViolence.dum:ideology  -1.3329     2.1977  -0.607
##                                                   Pr(>|t|)    
## (Intercept)                                        < 2e-16 ***
## PoliceViolence.dum                                 0.06213 .  
## ProtesterViolence.dum                              0.33550    
## ideology                                          7.89e-06 ***
## incomeN                                            0.15384    
## Race4Black                                         0.85136    
## Race4Hispanic                                      0.59393    
## Race4Asian                                         0.45693    
## Race4Other                                         0.49687    
## age                                                0.00517 ** 
## educationN                                         0.40379    
## gender_dum                                         0.90811    
## PoliceViolence.dum:ProtesterViolence.dum           0.46483    
## PoliceViolence.dum:ideology                        0.58695    
## ProtesterViolence.dum:ideology                     0.71421    
## PoliceViolence.dum:ProtesterViolence.dum:ideology  0.54460    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 18.71 on 323 degrees of freedom
## Multiple R-squared:  0.3067, Adjusted R-squared:  0.2745 
## F-statistic: 9.526 on 15 and 323 DF,  p-value: < 2.2e-16
ggplot(S5, aes(x = ProtesterViolence, y = PolicySupport, fill = PoliceViolence, group = PoliceViolence)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(width = 0.8), width = 0.75) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", colour = "grey", 
               position = position_dodge(width = 0.8), width = 0.2) +
  scale_y_continuous(limits = c(0, 100)) +
  theme_bw() +
  scale_fill_manual(values = c("grey","#80b1d3")) +
  labs(x = "", 
       y = "Score", 
       title = "Effects on support for police reforms") +
  theme(
    plot.title = element_text(hjust = 0.5, size = 14), 
    plot.subtitle = element_text(hjust = 0.5),
    plot.caption = element_text(hjust = 0.5, face = "italic")
  ) 

#plot trust in the police

S5_long <- S5 %>%
  pivot_longer(cols = c(TrustGov_sc, TrustPolice_sc, MoralPolice_sc, HarmfulPolice_sc, PolicySupport), 
               names_to = "DV", values_to = "value")

S5_long$DV <- factor(S5_long$DV, levels = c("HarmfulPolice_sc", "MoralPolice_sc", "TrustPolice_sc", "TrustGov_sc", "PolicySupport"))


# Plotting
p_trustpol <- ggplot(S5_long, aes(x = DV, y = value, fill = condition)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(width = 0.8), width = 0.75) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", colour = "grey", 
               position = position_dodge(width = 0.8), width = 0.2) +
  scale_y_continuous(limits = c(0, 100)) +
  theme_bw() +
  scale_fill_manual(values = c("#ffffb3","#80b1d3", "#8dd3c7", "#fb8072")) +
  labs(x = "Condition", 
       y = "Score", 
       title = "Effects on dependent variables") +
  theme(
    plot.title = element_text(hjust = 0.5, size = 14), 
    plot.subtitle = element_text(hjust = 0.5),
    plot.caption = element_text(hjust = 0.5, face = "italic")
  ) 

# Print the plot
print(p_trustpol)

#violin plot with ideology