## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ readr     2.1.4
## ✔ ggplot2   3.4.2     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## 
## Attaching package: 'Hmisc'
## 
## 
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## 
## 
## The following objects are masked from 'package:base':
## 
##     format.pval, units
## 
## 
## corrplot 0.92 loaded

Table on how John/Tyrone were perceived

##         ethnicity_person
## person   Asian Black Don't want to answer Other White
##   john       1     5                    2     2    42
##   tyrone     0    50                    4     0     1

Corrplot empathy measures for ingroup

Corrplot empathy measures for outgroup

T-test for ingroup & outgroup on affect, relate & motivation

## 
##  Two Sample t-test
## 
## data:  empathy_ingroup$affect and empathy_outgroup$affect
## t = 1.5966, df = 96, p-value = 0.1136
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.1404572  1.2952191
## sample estimates:
## mean of x mean of y 
##  3.523810  2.946429
## 
##  Two Sample t-test
## 
## data:  empathy_ingroup$relate and empathy_outgroup$relate
## t = 1.3918, df = 96, p-value = 0.1672
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.2308407  1.3141740
## sample estimates:
## mean of x mean of y 
##  2.309524  1.767857
## 
##  Two Sample t-test
## 
## data:  empathy_ingroup$motivation and empathy_outgroup$motivation
## t = 0, df = 96, p-value = 1
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.4822645  0.4822645
## sample estimates:
## mean of x mean of y 
##  5.285714  5.285714

Tibble for ingroup & outgroup on affect, relate & motivation

## # A tibble: 2 × 4
##   group    count  mean    sd
##   <chr>    <int> <dbl> <dbl>
## 1 ingroup     42  3.52  1.70
## 2 outgroup    56  2.95  1.82
## # A tibble: 2 × 4
##   group    count  mean    sd
##   <chr>    <int> <dbl> <dbl>
## 1 ingroup     42  2.31  1.88
## 2 outgroup    56  1.77  1.93
## # A tibble: 2 × 4
##   group    count  mean    sd
##   <chr>    <int> <dbl> <dbl>
## 1 ingroup     42  5.29  1.22
## 2 outgroup    56  5.29  1.17

Anova for ingroup & outgroup on affect, relate & motivation

##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1    8.0   8.001   2.549  0.114
## Residuals   96  301.3   3.139
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1      7   7.042   1.937  0.167
## Residuals   96    349   3.635
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1      0   0.000       0      1
## Residuals   96    136   1.417

Table on mean for empathy measures when fp respond to outgroup member

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA
##        Group.1   affect   relate motivation group
## 1 opp_fp_black 3.240000 2.080000   5.160000    NA
## 2 opp_fp_white 2.709677 1.516129   5.387097    NA

Anova comparing empathy measures, affect, relate & motivation, for outgroup members split on black/white fp

##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1   3.89   3.892   1.175  0.283
## Residuals   54 178.95   3.314
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1    4.4   4.400   1.191   0.28
## Residuals   54  199.6   3.696
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        1   0.71  0.7137   0.516  0.476
## Residuals   54  74.71  1.3836