---
title: "Generosity vs Justice V7"
author: 'Marcus + Lizy + Nadia'
date: "9/6/2023"
format:
html:
code-fold: true
code-tools: true
fontsize: 16px
self-contained: true
toc: true
toc-location: left
output:
html_document:
code_folding: hide
number_sections: true
toc: true
toc_float: true
toc_collapsed: true
toc_depth: 3
keep_md: true
header-includes:
- \usepackage{Roboto Condensed}
knitr:
opts_chunk:
dev: ragg_png
execute:
warning: false
---
# Overview and Methodology
- Study of third party judgments of donors motivated by a justice or generosity virtue when the informamtion is shared either from a first person or third person perspective
- Data collected August 28, 2023
- N = 400
# Setup {.tabset .tabset-pills}
## Libraries {.unlisted .unnumbered}
```{r setup, message=F, results='hide', warning=FALSE}
knitr:: opts_chunk$ set (warning = FALSE , message = FALSE )
Mypackages <-
c ("lme4" ,"tidyverse" ,"effects" ,"ggplot2" ,"psych" ,
"MASS" ,"Rmisc" ,"lmerTest" ,"ggthemes" , "knitr" ,
"lsmeans" ,"pastecs" ,"sjstats" ,"car" ,"ordinal" ,
"Rcpp" ,"corrplot" , "ggpubr" , "EnvStats" ,
"easyStats" , "cowplot" ,"see" ,"datawizard" , "ggcorrplot" ,
"RColorBrewer" , "lavaan" )
#install.packages(Mypackages) #you must remove the # in this comment if you need to install the packages!
lapply (Mypackages,
require,
character.only = TRUE )
options (knitr.kable.NA = '—' )
set.seed (1 )
```
## Functions {.unlisted .unnumbered}
```{r}
plot_cooker <- function (dv, iv, Title, x_axis_labs, y_label, sample_size) {
part1 <- ggviolin (gjg_long, x = dv, y = iv, color = dv,
alpha = 0.1 , fill = dv, xlab = "Motive" ,
trim = TRUE , ylab = y_label) +
stat_summary (fun.data = "mean_cl_normal" , geom = "crossbar" , fatten = 1 ) +
scale_y_continuous (breaks = c (1 : 5 )) +
labs (title = paste0 (Title, " (n = " , sample_size, ")" )) +
scale_x_discrete (labels = x_axis_labs) +
theme (panel.background = element_rect (fill = "transparent" ),
legend.position = "right" , ## Consider “gray97” for fill
plot.title = element_text (face = "bold" , hjust = 0.5 , size = 16 ),
plot.subtitle = element_text (hjust = 0.5 ),
panel.grid.major.y = element_line (color= 'grey75' ),
axis.text.x = element_text (face = "plain" , size = 13 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 13 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 13 , color = "black" ,
margin = margin (t = 0 , r = 10 , b = 0 , l = 0 )), ## lower X axis title
panel.border = element_rect (color = "black" , fill = NA , size = 1 ))
ggpar (part1, legend = "none" )
}
pol_line <- function (data, iv, dv) {
ggplot (data, aes (x = {{iv}}, y = {{dv}}, color = cell)) +
stat_summary (fun.data = "mean_cl_normal" , geom = "line" ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.5 ) +
labs (x = "Political Leaning" , color = "Condition" )
}
facet_plot_fn <- function (data, dv, iv, facet_var, Title, x_axis_labs, y_label, sample_size, coln, rown) {
part1 <- ggviolin (data, x = dv, y = iv, color = dv,
alpha = 0.1 , fill = dv, xlab = "Motive" ,
trim = TRUE , ylab = y_label) +
stat_summary (fun.data = "mean_cl_normal" , geom = "crossbar" , fatten = 1 ) +
scale_y_continuous (breaks = c (1 : 7 )) +
labs (title = paste0 (Title, " (n = " , sample_size, ")" )) +
scale_x_discrete (labels = x_axis_labs) +
theme (panel.background = element_rect (fill = "transparent" ),
legend.position = "right" , ## Consider “gray97” for fill
plot.title = element_text (face = "bold" , hjust = 0.5 , size = 16 ),
plot.subtitle = element_text (hjust = 0.5 ),
panel.grid.major.y = element_line (color= 'grey75' ),
axis.text.x = element_text (face = "plain" , size = 13 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 13 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 13 , color = "black" ,
margin = margin (t = 0 , r = 10 , b = 0 , l = 0 )), ## lower X axis title
panel.border = element_rect (color = "black" , fill = NA , size = 1 )) +
scale_color_discrete (name = "Condition" ) +
facet_wrap (as.formula (paste0 ("~" , facet_var)), ncol = coln, nrow = rown, scales = "free" , as.table = TRUE )
ggpar (part1, legend = "none" )
}
```
## Load Data
```{r, message=F, results='hide', warning=FALSE}
# read in data files
gjg <- read.csv ("/Users/mtrenfield17/Desktop/Research/Boston College Research/Morality Lab Research/Generosity Vs Justice Project/just_vs_gen_v7/Generosity vs Justice V7.csv" )
```
## Reshaping data
```{r}
# changing appropriate DVs to numeric
cols_to_convert <- c ("age" , "income" , "ses" , "political_overall" , "political_social" , "political_economic" , "attn_self" , "pid" ,
"religious" , "education" )
gjg[cols_to_convert] <- lapply (gjg[cols_to_convert], as.numeric)
## Making column for condition (1st or 3rd person)
gjg <- gjg %>%
mutate (
condition = ifelse (FL_35_DO == "FL_37" , "thirdPerson" ,
ifelse (FL_35_DO == "FL_38" , "firstPerson" , NA ))
)
## Making column that merges 1st and 3rd person data into one column
gjg <- gjg %>%
mutate (reputation_signal_1 = as.numeric (paste (reputation_signal_1st_1, reputation_signal_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (reputation_signal_2 = as.numeric (paste (reputation_signal_1st_2, reputation_signal_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (norm_signal_1 = as.numeric (paste (norm_signal_1st_1, norm_signal_3rd_10, sep = "" )))
gjg <- gjg %>%
mutate (norm_signal_2 = as.numeric (paste (norm_signal_1st_2, norm_signal_3rd_11, sep = "" )))
gjg <- gjg %>%
mutate (reputation_signal_1 = as.numeric (paste (reputation_signal_1st_1, reputation_signal_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (reputation_signal_2 = as.numeric (paste (reputation_signal_1st_2, reputation_signal_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (approval_1 = as.numeric (paste (approval_1st_1, approval_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (approval_2 = as.numeric (paste (approval_1st_2, approval_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (moral_1 = as.numeric (paste (moral_1st_1, moral_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (moral_2 = as.numeric (paste (moral_1st_2, moral_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (genuine_1 = as.numeric (paste (genuine_1st_1, genuine_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (genuine_2 = as.numeric (paste (genuine_1st_2, genuine_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (deliberate_1 = as.numeric (paste (deliberate_1st_1, deliberate_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (deliberate_2 = as.numeric (paste (deliberate_1st_2, deliberate_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (spontaneous_1 = as.numeric (paste (spontaneous_1st_1, spontaneous_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (spontaneous_2 = as.numeric (paste (spontaneous_1st_2, spontaneous_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (emotion_1 = as.numeric (paste (emotion_1st_1, emotion_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (emotion_2 = as.numeric (paste (emotion_1st_2, emotion_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (logic_1 = as.numeric (paste (logic_1st_1, logic_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (logic_2 = as.numeric (paste (logic_1st_2, logic_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (quick_1 = as.numeric (paste (quick_1st_1, quick_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (quick_2 = as.numeric (paste (quick_1st_2, quick_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (slow_1 = as.numeric (paste (slow_1st_1, slow_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (slow_2 = as.numeric (paste (slow_1st_2, slow_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (warm_1 = as.numeric (paste (warm_1st_1, warm_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (warm_2 = as.numeric (paste (warm_1st_2, warm_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (good_natured_1 = as.numeric (paste (good.natured_1st_1, good.natured_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (good_natured_2 = as.numeric (paste (good.natured_1st_2, good.natured_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (tolerant_1 = as.numeric (paste (tolerant_1st_1, tolerant_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (tolerant_2 = as.numeric (paste (tolerant_1st_2, tolerant_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (sincere_1 = as.numeric (paste (sincere_1st_1, sincere_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (sincere_2 = as.numeric (paste (sincere_1st_2, sincere_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (competent_1 = as.numeric (paste (competent_1st_1, competent_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (competent_2 = as.numeric (paste (competent_1st_2, competent_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (confident_1 = as.numeric (paste (confident_1st_1, confident_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (confident_2 = as.numeric (paste (confident_1st_2, confident_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (independent_1 = as.numeric (paste (independent_1st_1, independent_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (independent_2 = as.numeric (paste (independent_1st_2, independent_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (competitive_1 = as.numeric (paste (competitive_1st_1, competitive_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (competitive_2 = as.numeric (paste (competitive_1st_2, competitive_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (intelligent_1 = as.numeric (paste (intelligent_1st_1, intelligent_3rd_1, sep = "" )))
gjg <- gjg %>%
mutate (intelligent_2 = as.numeric (paste (intelligent_1st_2, intelligent_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (politics_1 = as.numeric (paste (politics_1st_1, politics_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (politics_2 = as.numeric (paste (politics_1st_2, politics_3rd_2, sep = "" )))
gjg <- gjg %>%
mutate (
reputation_signal_just = ifelse (vigFirstVirtue == "justice" , reputation_signal_1,
ifelse (vigFirstVirtue == "generosity" , reputation_signal_2, NA )),
reputation_signal_gen = ifelse (vigFirstVirtue == "generosity" , reputation_signal_1,
ifelse (vigFirstVirtue == "justice" , reputation_signal_2, NA ))
)
gjg <- gjg %>%
mutate (
norm_signal_just = ifelse (vigFirstVirtue == "justice" , norm_signal_1,
ifelse (vigFirstVirtue == "generosity" , norm_signal_2, NA )),
norm_signal_gen = ifelse (vigFirstVirtue == "generosity" , norm_signal_1,
ifelse (vigFirstVirtue == "justice" , norm_signal_2, NA ))
)
gjg <- gjg %>%
mutate (
approval_just = ifelse (vigFirstVirtue == "justice" , approval_1,
ifelse (vigFirstVirtue == "generosity" , approval_2, NA )),
approval_gen = ifelse (vigFirstVirtue == "generosity" , approval_1,
ifelse (vigFirstVirtue == "justice" , approval_2, NA ))
)
gjg <- gjg %>%
mutate (
moral_just = ifelse (vigFirstVirtue == "justice" , moral_1,
ifelse (vigFirstVirtue == "generosity" , moral_2, NA )),
moral_gen = ifelse (vigFirstVirtue == "generosity" , moral_1,
ifelse (vigFirstVirtue == "justice" , moral_2, NA ))
)
gjg <- gjg %>%
mutate (
genuine_just = ifelse (vigFirstVirtue == "justice" , genuine_1,
ifelse (vigFirstVirtue == "generosity" , genuine_2, NA )),
genuine_gen = ifelse (vigFirstVirtue == "generosity" , genuine_1,
ifelse (vigFirstVirtue == "justice" , genuine_2, NA ))
)
gjg <- gjg %>%
mutate (
deliberate_just = ifelse (vigFirstVirtue == "justice" , deliberate_1,
ifelse (vigFirstVirtue == "generosity" , deliberate_2, NA )),
deliberate_gen = ifelse (vigFirstVirtue == "generosity" , deliberate_1,
ifelse (vigFirstVirtue == "justice" , deliberate_2, NA ))
)
gjg <- gjg %>%
mutate (
spontaneous_just = ifelse (vigFirstVirtue == "justice" , spontaneous_1,
ifelse (vigFirstVirtue == "generosity" , spontaneous_2, NA )),
spontaneous_gen = ifelse (vigFirstVirtue == "generosity" , spontaneous_1,
ifelse (vigFirstVirtue == "justice" , spontaneous_2, NA ))
)
gjg <- gjg %>%
mutate (
emotion_just = ifelse (vigFirstVirtue == "justice" , emotion_1,
ifelse (vigFirstVirtue == "generosity" , emotion_2, NA )),
emotion_gen = ifelse (vigFirstVirtue == "generosity" , emotion_1,
ifelse (vigFirstVirtue == "justice" , emotion_2, NA ))
)
gjg <- gjg %>%
mutate (
logic_just = ifelse (vigFirstVirtue == "justice" , logic_1,
ifelse (vigFirstVirtue == "generosity" , logic_2, NA )),
logic_gen = ifelse (vigFirstVirtue == "generosity" , logic_1,
ifelse (vigFirstVirtue == "justice" , logic_2, NA ))
)
gjg <- gjg %>%
mutate (
quick_just = ifelse (vigFirstVirtue == "justice" , quick_1,
ifelse (vigFirstVirtue == "generosity" , quick_2, NA )),
quick_gen = ifelse (vigFirstVirtue == "generosity" , quick_1,
ifelse (vigFirstVirtue == "justice" , quick_2, NA ))
)
gjg <- gjg %>%
mutate (
slow_just = ifelse (vigFirstVirtue == "justice" , slow_1,
ifelse (vigFirstVirtue == "generosity" , slow_2, NA )),
slow_gen = ifelse (vigFirstVirtue == "generosity" , slow_1,
ifelse (vigFirstVirtue == "justice" , slow_2, NA ))
)
gjg <- gjg %>%
mutate (
warm_just = ifelse (vigFirstVirtue == "justice" , warm_1,
ifelse (vigFirstVirtue == "generosity" , warm_2, NA )),
warm_gen = ifelse (vigFirstVirtue == "generosity" , warm_1,
ifelse (vigFirstVirtue == "justice" , warm_2, NA ))
)
gjg <- gjg %>%
mutate (
good_natured_just = ifelse (vigFirstVirtue == "justice" , good_natured_1,
ifelse (vigFirstVirtue == "generosity" , good_natured_2, NA )),
good_natured_gen = ifelse (vigFirstVirtue == "generosity" , good_natured_1,
ifelse (vigFirstVirtue == "justice" , good_natured_2, NA ))
)
gjg <- gjg %>%
mutate (
tolerant_just = ifelse (vigFirstVirtue == "justice" , tolerant_1,
ifelse (vigFirstVirtue == "generosity" , tolerant_2, NA )),
tolerant_gen = ifelse (vigFirstVirtue == "generosity" , tolerant_1,
ifelse (vigFirstVirtue == "justice" , tolerant_2, NA ))
)
gjg <- gjg %>%
mutate (
sincere_just = ifelse (vigFirstVirtue == "justice" , sincere_1,
ifelse (vigFirstVirtue == "generosity" , sincere_2, NA )),
sincere_gen = ifelse (vigFirstVirtue == "generosity" , sincere_1,
ifelse (vigFirstVirtue == "justice" , sincere_2, NA ))
)
gjg <- gjg %>%
mutate (
competent_just = ifelse (vigFirstVirtue == "justice" , competent_1,
ifelse (vigFirstVirtue == "generosity" , competent_2, NA )),
competent_gen = ifelse (vigFirstVirtue == "generosity" , competent_1,
ifelse (vigFirstVirtue == "justice" , competent_2, NA ))
)
gjg <- gjg %>%
mutate (
confident_just = ifelse (vigFirstVirtue == "justice" , confident_1,
ifelse (vigFirstVirtue == "generosity" , confident_2, NA )),
confident_gen = ifelse (vigFirstVirtue == "generosity" , confident_1,
ifelse (vigFirstVirtue == "justice" , confident_2, NA ))
)
gjg <- gjg %>%
mutate (
independent_just = ifelse (vigFirstVirtue == "justice" , independent_1,
ifelse (vigFirstVirtue == "generosity" , independent_2, NA )),
independent_gen = ifelse (vigFirstVirtue == "generosity" , independent_1,
ifelse (vigFirstVirtue == "justice" , independent_2, NA ))
)
gjg <- gjg %>%
mutate (
competitive_just = ifelse (vigFirstVirtue == "justice" , competitive_1,
ifelse (vigFirstVirtue == "generosity" , competitive_2, NA )),
competitive_gen = ifelse (vigFirstVirtue == "generosity" , competitive_1,
ifelse (vigFirstVirtue == "justice" , competitive_2, NA ))
)
gjg <- gjg %>%
mutate (
intelligent_just = ifelse (vigFirstVirtue == "justice" , intelligent_1,
ifelse (vigFirstVirtue == "generosity" , intelligent_2, NA )),
intelligent_gen = ifelse (vigFirstVirtue == "generosity" , intelligent_1,
ifelse (vigFirstVirtue == "justice" , intelligent_2, NA ))
)
gjg <- gjg %>%
mutate (
politics_just = ifelse (vigFirstVirtue == "justice" , politics_1,
ifelse (vigFirstVirtue == "generosity" , politics_2, NA )),
politics_gen = ifelse (vigFirstVirtue == "generosity" , politics_1,
ifelse (vigFirstVirtue == "justice" , politics_2, NA ))
)
```
# Attention check
```{r,message=F, results='hide', warning=FALSE}
# filtering out failures/nonresponses to attention checks
length (gjg$ pid)
gjg <- gjg %>%
filter (! is.na (attn_bucket), attn_self> 2 , bot_check == 1 )
length (gjg$ pid)
```
18 participants failed the attention check.
# Demographics
```{r,message=F, results='hide', warning=FALSE}
# Analyzing numeric variables
# Specify the variables you want to include in the table
vars_to_include <- c ("age" , "income" , "education" , "ses" , "political_overall" , "political_social" , "political_economic" , "religious" )
# Create an empty data frame to store the summary
summary_table <- data.frame (Variable = character (0 ),
Mean = numeric (0 ),
Median = numeric (0 ),
Min = numeric (0 ),
Max = numeric (0 ),
N = numeric (0 ))
# Loop through each variable and calculate summary statistics
for (var in vars_to_include) {
summary_stats <- summary (gjg[[var]])
var_data <- data.frame (Variable = var,
Mean = mean (gjg[[var]], na.rm = TRUE ),
Median = median (gjg[[var]], na.rm = TRUE ),
Min = min (gjg[[var]], na.rm = TRUE ),
Max = max (gjg[[var]], na.rm = TRUE ),
N = length (gjg[[var]]))
summary_table <- rbind (summary_table, var_data)
}
# Print the summary table
print (summary_table)
# Analyzing categorical demos
# Subset your data frame to include only the demographic columns
demo_gjg <- gjg[, c ("gender_TEXT" , "race_TEXT" , "income_TEXT" , "education_TEXT" , "political_party_TEXT" )]
# Loop through each demographic column and calculate frequency counts
freq_tables <- list ()
for (col in names (demo_gjg)) {
{
freq_table <- as.data.frame (table (demo_gjg[[col]]))
freq_table$ Percent <- round (freq_table$ Freq / sum (freq_table$ Freq) * 100 , 2 )
freq_tables[[col]] <- freq_table
}
}
# Print the frequency tables
for (i in seq_along (freq_tables)) {
if (! is.null (freq_tables[[i]])) {
cat (" \n Table of frequencies for" , names (freq_tables)[i], ": \n " )
print (freq_tables[[i]])
}
}
```
# Correlation
```{r fig.dim = c(12, 10)}
cols_to_convert <- c ("reputation_signal_just" , "reputation_signal_gen" , "norm_signal_just" , "norm_signal_gen" , "approval_just" , "approval_gen" , "moral_just" , "moral_gen" , "genuine_just" , "genuine_gen" , "deliberate_just" , "deliberate_gen" , "spontaneous_just" , "spontaneous_gen" , "emotion_just" , "emotion_gen" , "logic_just" , "logic_gen" , "quick_just" , "quick_gen" , "slow_just" , "slow_gen" , "warm_just" , "warm_gen" , "good_natured_just" , "good_natured_gen" , "tolerant_just" , "tolerant_gen" , "sincere_just" , "sincere_gen" , "competent_just" , "competent_gen" , "confident_just" , "confident_gen" , "independent_just" , "independent_gen" , "competitive_just" , "competitive_gen" , "intelligent_just" , "intelligent_gen" , "politics_just" , "politics_gen" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )
gjg[cols_to_convert] <- lapply (gjg[cols_to_convert], as.numeric)
DVs <- gjg[c ("reputation_signal_just" , "reputation_signal_gen" , "norm_signal_just" , "norm_signal_gen" , "approval_just" , "approval_gen" , "moral_just" , "moral_gen" , "genuine_just" , "genuine_gen" , "deliberate_just" , "deliberate_gen" , "spontaneous_just" , "spontaneous_gen" , "emotion_just" , "emotion_gen" , "logic_just" , "logic_gen" , "quick_just" , "quick_gen" , "slow_just" , "slow_gen" , "warm_just" , "warm_gen" , "good_natured_just" , "good_natured_gen" , "tolerant_just" , "tolerant_gen" , "sincere_just" , "sincere_gen" , "competent_just" , "competent_gen" , "confident_just" , "confident_gen" , "independent_just" , "independent_gen" , "competitive_just" , "competitive_gen" , "intelligent_just" , "intelligent_gen" , "politics_just" , "politics_gen" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )]
# Compute pairwise correlations
corr_DVs <- cor (DVs, use = "pairwise.complete.obs" )
# Plot the correlation matrix
corrplot (corr_DVs, is.corr = TRUE , type = "lower" , lower = "circle" , tl.cex = 0.7 , insig = "label_sig" , diag = TRUE )
# New columns for composite of warmth and competence, moral goodness
gjg <- gjg %>%
mutate (warmth_just= (warm_just+ good_natured_just+ tolerant_just+ sincere_just)/ 4 )%>%
mutate (warmth_gen= (warm_gen+ good_natured_gen+ tolerant_gen+ sincere_gen)/ 4 )%>%
mutate (competence_just= (competent_just+ confident_just+ independent_just+ competitive_just+
intelligent_just)/ 5 )%>%
mutate (competence_gen= (competent_gen+ confident_gen+ independent_gen+ competitive_gen+
intelligent_gen)/ 5 ) %>%
mutate (moralGoodness_just= (approval_just+ moral_just+ genuine_just)/ 3 )%>%
mutate (moralGoodness_gen= (approval_gen+ moral_gen+ genuine_gen)/ 3 ) %>%
mutate (decisionSpeed_just= (quick_just+ spontaneous_just)/ 2 )%>%
mutate (decisionSpeed_gen= (quick_gen+ spontaneous_gen)/ 2 )
# DVs 2
DVs_2 <- gjg[c ("reputation_signal_just" , "reputation_signal_gen" , "norm_signal_just" , "norm_signal_gen" , "approval_just" , "approval_gen" , "moral_just" , "moral_gen" , "genuine_just" , "genuine_gen" , "deliberate_just" , "deliberate_gen" , "spontaneous_just" , "spontaneous_gen" , "emotion_just" , "emotion_gen" , "logic_just" , "logic_gen" , "quick_just" , "quick_gen" , "slow_just" , "slow_gen" , "warmth_just" , "warmth_gen" , "competence_just" , "competence_gen" , "moralGoodness_just" , "moralGoodness_gen" , "decisionSpeed_just" , "decisionSpeed_gen" , "politics_just" , "politics_gen" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )]
# Compute pairwise correlations
corr_DVs_2 <- cor (DVs_2, use = "pairwise.complete.obs" )
# Plot the correlation matrix
corrplot (corr_DVs_2, is.corr = TRUE , type = "lower" , lower = "circle" , tl.cex = 0.7 , insig = "label_sig" , diag = TRUE )
# DVs just
DVs_just <- gjg[c ("reputation_signal_just" , "norm_signal_just" , "approval_just" , "moral_just" , "genuine_just" , "deliberate_just" , "spontaneous_just" , "emotion_just" , "logic_just" , "quick_just" , "slow_just" , "warmth_just" , "competence_just" , "politics_just" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )]
# Compute pairwise correlations
corr_DVs_just <- cor (DVs_just, use = "pairwise.complete.obs" )
# Plot the correlation matrix
corrplot (corr_DVs_just, is.corr = TRUE , type = "lower" , lower = "circle" , tl.cex = 0.7 , insig = "label_sig" , diag = TRUE )
# DVs gen
DVs_gen <- gjg[c ("reputation_signal_gen" , "norm_signal_gen" , "approval_gen" , "moral_gen" , "genuine_gen" , "deliberate_gen" , "spontaneous_gen" , "emotion_gen" , "logic_gen" , "quick_gen" , "slow_gen" , "warmth_gen" , "competence_gen" , "politics_gen" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )]
# Compute pairwise correlations
corr_DVs_gen <- cor (DVs_gen, use = "pairwise.complete.obs" )
# Plot the correlation matrix
corrplot (corr_DVs_gen, is.corr = TRUE , type = "lower" , lower = "circle" , tl.cex = 0.7 , insig = "label_sig" , diag = TRUE )
# DVs collapsed
# renaming DVs with underscores in name
gjg <- gjg %>%
dplyr:: rename ("reputationSignal_just" = "reputation_signal_just" ,
"reputationSignal_gen" = "reputation_signal_gen" ,
"normSignal_just" = "norm_signal_just" ,
"normSignal_gen" = "norm_signal_gen" ,
"goodNatured_gen" = "good_natured_gen" ,
"goodNatured_just" = "good_natured_just" )
gjg_long<- gjg %>% gather (DV, resp, "reputationSignal_just" ,"reputationSignal_gen" ,"normSignal_just" ,"normSignal_gen" ,"approval_just" ,"approval_gen" ,"moral_just" ,"moral_gen" ,"genuine_just" ,"genuine_gen" ,"deliberate_just" ,"deliberate_gen" ,"spontaneous_just" ,"spontaneous_gen" ,"emotion_just" ,"emotion_gen" ,"logic_just" ,"logic_gen" ,"quick_just" ,"quick_gen" ,"slow_just" ,"slow_gen" ,"warm_just" ,"warm_gen" ,"goodNatured_just" ,"goodNatured_gen" ,"tolerant_just" ,"tolerant_gen" ,"sincere_just" ,"sincere_gen" ,"competent_just" ,"competent_gen" ,"confident_just" ,"confident_gen" , "independent_just" ,"independent_gen" ,"competitive_just" ,"competitive_gen" ,"intelligent_just" ,"intelligent_gen" ,"warmth_just" ,"warmth_gen" ,"competence_just" ,"competence_gen" , "moralGoodness_just" , "moralGoodness_gen" , "decisionSpeed_just" , "decisionSpeed_gen" , "politics_just" , "politics_gen" )
gjg_long<- gjg_long %>%
separate (DV, into= c ("DV" , "motive" ), sep= "_" )
gjg_long <- spread (gjg_long, DV, resp)
gjg_long <- gjg_long %>%
mutate (
cell = case_when (
motive == "gen" & condition == "firstPerson" ~ "genFirst" ,
motive == "just" & condition == "firstPerson" ~ "justFirst" ,
motive == "gen" & condition == "thirdPerson" ~ "genThird" ,
motive == "just" & condition == "thirdPerson" ~ "justThird" ,
TRUE ~ NA_character_
)
)
gjg_long$ cell <- as.factor (gjg_long$ cell)
gjg_long <- gjg_long %>%
mutate (
motive_order = if_else (grepl ("gen.*First" , vigOrder), "genFirst" , "justFirst" ),
text_order = if_else (grepl ("genCommit|justiceValue" , vigOrder), "genCommitJustValue" , "genValueJustCommit" )
)
DVs_col <- gjg_long[c ("reputationSignal" ,"normSignal" , "approval" , "moral" , "genuine" , "deliberate" , "spontaneous" , "emotion" , "logic" , "quick" , "slow" , "warm" , "goodNatured" , "tolerant" , "sincere" , "competent" , "confident" , "independent" , "competitive" , "intelligent" , "warmth" , "competence" ,"politics" , "age" , "ses" , "political_overall" , "political_social" , "political_economic" )]
# Compute pairwise correlations
corr_DVs_col <- cor (DVs_col, use = "pairwise.complete.obs" )
# Plot the correlation matrix
corrplot (corr_DVs_col, is.corr = TRUE , type = "lower" , lower = "circle" , tl.cex = 0.7 , insig = "label_sig" , diag = TRUE )
```
# EFA
```{r, include=FALSE}
factorDVs <- gjg_long[c ("reputationSignal" ,"normSignal" , "approval" , "moral" , "genuine" , "deliberate" , "spontaneous" , "emotion" , "logic" , "quick" , "slow" , "warm" , "goodNatured" , "tolerant" , "sincere" , "competent" , "confident" , "independent" , "competitive" , "intelligent" )]
```
## Evaluating the correlation matrix
```{r}
factorCor <- cor (factorDVs, use = "complete.obs" )
# Assuming you have a correlation matrix named "correlation_matrix"
correlation_threshold <- 0.8
high_correlations <- which (factorCor > correlation_threshold & upper.tri (factorCor, diag = FALSE ), arr.ind = TRUE )
# Extract the row and column indices of high correlations
row_indices <- high_correlations[, 1 ]
column_indices <- high_correlations[, 2 ]
# Extract the correlations greater than 0.8
high_correlation_values <- factorCor[high_correlations]
# Print the results
high_correlation_results <- data.frame (row_indices, column_indices, high_correlation_values)
print (high_correlation_results)
# removing one from all pairs of overcorrelated variables
# overcorrelated <- c("")
# efaDVs <- factorDVs[ ,!(names(factorDVs) %in% overcorrelated)]
efaDVs <- factorDVs
```
## Determining number of factors
* Eigenvalues suggests 5 factors
* Scree plot suggests 2 or 5 factors
* Parallel Analysis suggests 5
```{r}
## evaluating data
corr_DVs = cor (efaDVs, use= "complete.obs" )
KMO (efaDVs)
cortest.bartlett (efaDVs) #tests correlations between variables
##
ev<- eigen (corr_DVs) #gets eigenvalues (variance explained by each component)
ev$ values
scree (factorDVs, pc = FALSE ) #number of factors until plot levels off
fa.parallel (factorDVs, fa= "fa" ) #checks eigenvalues of factors against eigenvalues of identity (no correlation) matrix
dat_fa <- na.omit (DVs)
```
## 5 Factors
```{r}
fit <- factanal (na.omit (efaDVs), factors= 5 , rotation= "promax" , scores = "regression" )
print (fit, digits = 2 , cutoff = .3 , sort = TRUE )
loads <- fit$ loadings
fa.diagram (loads)
## Cronbach's Alpha
f1 <- efaDVs[ , c ("approval" , "moral" , "genuine" , "sincere" , "deliberate" , "emotion" , "logic" )]
f2 <- efaDVs[ , c ("competent" , "confident" , "independent" , "intelligent" )]
f3 <- efaDVs[ , c ("warm" , "goodNatured" , "tolerant" )]
f4 <- efaDVs[ , c ("quick" , "spontaneous" )]
f5 <- efaDVs[ , c ("reputationSignal" , "normSignal" , "competitive" )]
alpha (f1)
alpha (f2)
alpha (f3)
alpha (f4)
alpha (f5)
```
# CFA
```{r, include=FALSE}
model <- '
moralGoodness =~ approval + moral + genuine
competence =~ competent + confident + independent + intelligent + competitive + logic
warmth =~ warm + goodNatured + tolerant + sincere
decisionSpeed =~ quick + spontaneous
signaling =~ reputationSignal + normSignal
'
fit <- cfa (model, data = factorDVs)
summary (fit, fit.measures= TRUE )
```
# First & Third Results
## Factor 1: Warmth
```{r fig.dim=c(12,10)}
mod_warmth <- lmer (warmth ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_warmth)
warmthP <- ggplot (gjg_long, aes (x = cell, y = warmth, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Warmth (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (warmthP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
## Factor 2: Competence
```{r fig.dim=c(12,10)}
mod_competence <- lmer (competence ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_competence)
compP <- ggplot (gjg_long, aes (x = cell, y = competence, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Competence (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (compP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
## Factor 3: Moral Goodness
```{r fig.dim=c(12,10)}
mod_moral <- lmer (moralGoodness ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_moral)
moralP <- ggplot (gjg_long, aes (x = cell, y = moralGoodness, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Moral Goodness (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (moralP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
## Factor 4: Decision Speed
```{r fig.dim=c(12,10)}
mod_speed <- lmer (decisionSpeed ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_speed)
speedP <- ggplot (gjg_long, aes (x = cell, y = decisionSpeed, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Decision Speed (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (speedP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
## Factor 5: Signaling
```{r fig.dim=c(12,10)}
mod_rep <- lmer (reputationSignal ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_rep)
repP <- ggplot (gjg_long, aes (x = cell, y = reputationSignal, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Reputation Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (repP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
plot_cooker ("cell" , "normSignal" , "Norm Signal" , c ("genFirst" , "justFirst" , "genThird" , "justThird" )," " , 393 )
mod_norm <- lmer (normSignal ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_norm)
speedP <- ggplot (gjg_long, aes (x = cell, y = normSignal, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Norm Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (speedP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
## Factor 6: Emotion
```{r fig.dim=c(12,10)}
mod_emotion <- lmer (emotion ~ motive* condition + (1 | pid), data = gjg_long)
summary (mod_emotion)
emotionP <- ggplot (gjg_long, aes (x = cell, y = emotion, color = cell)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Emotion (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (emotionP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
```
# First Person Results
## Factor 1: Warmth
```{r fig.dim=c(12,10)}
first_gjg_long <- gjg_long %>% filter (condition == "firstPerson" )
mod_warmth <- lmer (warmth ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_warmth)
first_warmthP <- ggplot (first_gjg_long, aes (x = motive, y = warmth, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Warmth (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" ))
print (first_warmthP)
```
## Factor 2: Competence
```{r fig.dim=c(12,10)}
mod_competence <- lmer (competence ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_competence)
first_compP <- ggplot (first_gjg_long, aes (x = motive, y = competence, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Competence (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" ))
print (first_compP)
```
## Factor 3: Moral Goodness
```{r fig.dim=c(12,10)}
plot_cooker ("motive" , "moralGoodness" , "Moral Goodness" , c ("genFirst" , "justFirst" , "genThird" , "justThird" )," " , 393 )
mod_moral <- lmer (moralGoodness ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_moral)
first_moralP <- ggplot (first_gjg_long, aes (x = motive, y = moralGoodness, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Moral Goodness (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (first_moralP)
```
## Factor 4: Decision Speed
```{r fig.dim=c(12,10)}
mod_speed <- lmer (decisionSpeed ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_speed)
first_speedP <- ggplot (first_gjg_long, aes (x = motive, y = decisionSpeed, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Decision Speed (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (speedP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
print (first_speedP)
```
## Factor 5: Signaling
### Reputational
```{r fig.dim=c(12,10)}
mod_rep <- lmer (reputationSignal ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_rep)
first_repP <- ggplot (first_gjg_long, aes (x = motive, y = reputationSignal, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Reputation Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (first_repP)
```
### Norm
```{r}
mod_norm <- lmer (normSignal ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_norm)
first_normP <- ggplot (first_gjg_long, aes (x = motive, y = normSignal, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Norm Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (first_normP)
```
## Factor 6: Emotion
```{r fig.dim=c(12,10)}
mod_emotion <- lmer (emotion ~ motive + (1 | pid), data = first_gjg_long)
summary (mod_emotion)
first_emotionP <- ggplot (first_gjg_long, aes (x = motive, y = emotion, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Emotion (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("First Person \n \ Generosity-motivated \n \ Donor" , "First Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (first_emotionP)
```
# First Person Faceted By Vignette Order and Text Order
## Factor 1: Warmth
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "warmth" , "text_order" , "Warmth" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "warmth" , "motive_order" , "Warmth" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_warmth_text <- lmer (warmth ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_warmth_text)
mod_warmth_motive <- lmer (warmth ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_warmth_motive)
mod_warmth_motive <- lmer (warmth ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_warmth_motive)
```
## Factor 2: Competence
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "competence" , "text_order" , "competence" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "competence" , "motive_order" , "competence" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_competence_text <- lmer (competence ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_competence_text)
mod_competence_motive <- lmer (competence ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_competence_motive)
mod_competence_motive <- lmer (competence ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_competence_motive)
```
## Factor 3: Moral Goodness
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "moralGoodness" , "text_order" , "moralGoodness" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "moralGoodness" , "motive_order" , "moralGoodness" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_moralGoodness_text <- lmer (moralGoodness ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_moralGoodness_text)
mod_moralGoodness_motive <- lmer (moralGoodness ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_moralGoodness_motive)
mod_moralGoodness_motive <- lmer (moralGoodness ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_moralGoodness_motive)
```
## Factor 4: Decision Speed
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "decisionSpeed" , "text_order" , "decisionSpeed" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "decisionSpeed" , "motive_order" , "decisionSpeed" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_decisionSpeed_text <- lmer (decisionSpeed ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_decisionSpeed_text)
mod_decisionSpeed_motive <- lmer (decisionSpeed ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_decisionSpeed_motive)
mod_decisionSpeed_motive <- lmer (decisionSpeed ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_decisionSpeed_motive)
```
## Factor 5: Signaling
### Reputational
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "reputationSignal" , "text_order" , "reputationSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "reputationSignal" , "motive_order" , "reputationSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_reputationSignal_text <- lmer (reputationSignal ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_reputationSignal_text)
mod_reputationSignal_motive <- lmer (reputationSignal ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_reputationSignal_motive)
mod_reputationSignal_motive <- lmer (reputationSignal ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_reputationSignal_motive)
```
### Norm
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "normSignal" , "text_order" , "normSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "normSignal" , "motive_order" , "normSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_normSignal_text <- lmer (normSignal ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_normSignal_text)
mod_normSignal_motive <- lmer (normSignal ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_normSignal_motive)
mod_normSignal_motive <- lmer (normSignal ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_normSignal_motive)
```
## Factor 6: Emotion
```{r fig.dim=c(12,10)}
facet_plot_fn (first_gjg_long, "cell" , "emotion" , "text_order" , "emotion" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (first_gjg_long, "cell" , "emotion" , "motive_order" , "emotion" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_emotion_text <- lmer (emotion ~ motive* text_order + (1 | pid), data = first_gjg_long)
summary (mod_emotion_text)
mod_emotion_motive <- lmer (emotion ~ motive* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_emotion_motive)
mod_emotion_motive <- lmer (emotion ~ motive* text_order* motive_order + (1 | pid), data = first_gjg_long)
summary (mod_emotion_motive)
```
# Third Person Results
## Factor 1: Warmth
```{r fig.dim=c(12,10)}
third_gjg_long <- gjg_long %>% filter (condition == "thirdPerson" )
mod_warmth <- lmer (warmth ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_warmth)
third_warmthP <- ggplot (third_gjg_long, aes (x = motive, y = warmth, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Warmth (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_warmthP)
```
## Factor 2: Competence
```{r fig.dim=c(12,10)}
mod_competence <- lmer (competence ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_competence)
third_compP <- ggplot (third_gjg_long, aes (x = motive, y = competence, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Competence (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_compP)
```
## Factor 3: Moral Goodness
```{r fig.dim=c(12,10)}
plot_cooker ("motive" , "moralGoodness" , "Moral Goodness" , c ("genFirst" , "justFirst" , "genThird" , "justThird" )," " , 393 )
mod_moral <- lmer (moralGoodness ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_moral)
third_moralP <- ggplot (third_gjg_long, aes (x = motive, y = moralGoodness, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Moral Goodness (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_moralP)
```
## Factor 4: Decision Speed
```{r fig.dim=c(12,10)}
mod_speed <- lmer (decisionSpeed ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_speed)
third_speedP <- ggplot (third_gjg_long, aes (x = motive, y = decisionSpeed, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Decision Speed (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
ggpar (speedP, legend = "none" ) + scale_color_manual (values = c ("genFirst" = "#7CCCB0" , "justFirst" = "#D193DC" , "genThird" = "#cc917c" , "justThird" = "#4e2de0" ))
print (third_speedP)
```
## Factor 5: Signaling
### Reputational
```{r fig.dim=c(12,10)}
mod_rep <- lmer (reputationSignal ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_rep)
third_repP <- ggplot (third_gjg_long, aes (x = motive, y = reputationSignal, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Reputation Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_repP)
```
### Norm
```{r}
mod_norm <- lmer (normSignal ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_norm)
third_normP <- ggplot (third_gjg_long, aes (x = motive, y = normSignal, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Norm Signaling (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_normP)
```
## Factor 6: Emotion
```{r fig.dim=c(12,10)}
mod_emotion <- lmer (emotion ~ motive + (1 | pid), data = third_gjg_long)
summary (mod_emotion)
third_emotionP <- ggplot (third_gjg_long, aes (x = motive, y = emotion, color = motive)) +
xlab ("" ) +
ylab ("" ) +
geom_point (stat= "summary" , fun= "mean" , size = 5 ) +
stat_summary (fun.data = "mean_cl_normal" , geom = "errorbar" , linewidth = 1.5 , width = .3 ) +
geom_point (position = position_jitter (width = 0.1 , height = 0.1 ), alpha = 0.4 ) +
labs (x = "" , y = "" , title = "Emotion (N = 393)" ) +
theme (
plot.title = element_text (hjust = 0.5 , size = 25 ),
axis.text.x = element_text (face = "plain" , size = 23 , color = "black" ),
axis.text.y = element_text (face = "plain" , size = 20 , color = "black" ),
axis.title.y = element_text (face = "plain" , size = 23 , color = "black" ),
axis.title.x = element_text (face = "plain" , size = 20 , color = "black" ), ) +
scale_x_discrete (labels = c ("Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" , "Third Person \n \ Generosity-motivated \n \ Donor" , "Third Person \n \ Justice-motivated \n \ Donor" ))
print (third_emotionP)
```
# Third Person Faceted By Vignette Order and Text Order
## Factor 1: Warmth
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "warmth" , "text_order" , "Warmth" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "warmth" , "motive_order" , "Warmth" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_warmth_text <- lmer (warmth ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_warmth_text)
mod_warmth_motive <- lmer (warmth ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_warmth_motive)
mod_warmth_motive <- lmer (warmth ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_warmth_motive)
```
## Factor 2: Competence
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "competence" , "text_order" , "competence" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "competence" , "motive_order" , "competence" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_competence_text <- lmer (competence ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_competence_text)
mod_competence_motive <- lmer (competence ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_competence_motive)
mod_competence_motive <- lmer (competence ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_competence_motive)
```
## Factor 3: Moral Goodness
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "moralGoodness" , "text_order" , "moralGoodness" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "moralGoodness" , "motive_order" , "moralGoodness" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_moralGoodness_text <- lmer (moralGoodness ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_moralGoodness_text)
mod_moralGoodness_motive <- lmer (moralGoodness ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_moralGoodness_motive)
mod_moralGoodness_motive <- lmer (moralGoodness ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_moralGoodness_motive)
```
## Factor 4: Decision Speed
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "decisionSpeed" , "text_order" , "decisionSpeed" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "decisionSpeed" , "motive_order" , "decisionSpeed" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_decisionSpeed_text <- lmer (decisionSpeed ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_decisionSpeed_text)
mod_decisionSpeed_motive <- lmer (decisionSpeed ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_decisionSpeed_motive)
mod_decisionSpeed_motive <- lmer (decisionSpeed ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_decisionSpeed_motive)
```
## Factor 5: Signaling
### Reputational
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "reputationSignal" , "text_order" , "reputationSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "reputationSignal" , "motive_order" , "reputationSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_reputationSignal_text <- lmer (reputationSignal ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_reputationSignal_text)
mod_reputationSignal_motive <- lmer (reputationSignal ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_reputationSignal_motive)
mod_reputationSignal_motive <- lmer (reputationSignal ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_reputationSignal_motive)
```
### Norm
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "normSignal" , "text_order" , "normSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "normSignal" , "motive_order" , "normSignal" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_normSignal_text <- lmer (normSignal ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_normSignal_text)
mod_normSignal_motive <- lmer (normSignal ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_normSignal_motive)
mod_normSignal_motive <- lmer (normSignal ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_normSignal_motive)
```
## Factor 6: Emotion
```{r fig.dim=c(12,10)}
facet_plot_fn (third_gjg_long, "cell" , "emotion" , "text_order" , "emotion" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
facet_plot_fn (third_gjg_long, "cell" , "emotion" , "motive_order" , "emotion" , c ("gen" , "just" , "" , "" )," " , 393 , 2 , 2 )
mod_emotion_text <- lmer (emotion ~ motive* text_order + (1 | pid), data = third_gjg_long)
summary (mod_emotion_text)
mod_emotion_motive <- lmer (emotion ~ motive* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_emotion_motive)
mod_emotion_motive <- lmer (emotion ~ motive* text_order* motive_order + (1 | pid), data = third_gjg_long)
summary (mod_emotion_motive)
```