Generosity vs Justice V5

Author

Marcus + Lizy + Nadia

Published

July 24, 2023

Overview and Methodology

  • Study of third party judgments of donors motivated by a justice or generosity virtue
  • Data collected July 19, 2023
  • N = 200

Setup

Libraries and functions

Code
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")

#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)  

Load Data

Code
# read in data files
gjg <-read.csv("/Users/mtrenfield17/Desktop/Research/Boston College Research/Morality Lab Research/Generosity Vs Justice Project/just_vs_gen_v5/Gen_just_V5 (1).csv")

Reshaping data

Code
# changing appropriate DVs to numeric
cols_to_convert <- c("age", "income", "ses", "political_overall", "political_social", "political_economic", "attn_self", "pid")
gjg[cols_to_convert] <- lapply(gjg[cols_to_convert], as.numeric)

gjg$reputation_signal_just <- NA
gjg$reputation_signal_gen <- NA

gjg$reputation_signal_just <- ifelse(gjg$vigOrder == "justiceFirst", gjg$reputation_signal_1, gjg$reputation_signal_2)
gjg$reputation_signal_gen <- ifelse(gjg$vigOrder == "justiceFirst", gjg$reputation_signal_2, gjg$reputation_signal_1)

convert_vigOrder_columns <- function(data, column_just, column_gen, vigOrder_col) {
  # Create new columns for "_just" and "_gen"
  data[[column_just]] <- ifelse(data[[vigOrder_col]] == "justiceFirst",
                                data[[paste0(column_just, "_1")]], data[[paste0(column_just, "_2")]])
  data[[column_gen]] <- ifelse(data[[vigOrder_col]] == "justiceFirst",
                               data[[paste0(column_just, "_2")]], data[[paste0(column_just, "_1")]])

  # Replace missing values with NA
  data[[column_just]][is.na(data[[column_just]])] <- NA
  data[[column_gen]][is.na(data[[column_gen]])] <- NA

  # Remove "_1" and "_2" from the column names
  names(data[[column_just]]) <- gsub("_1$", "_just", names(data[[column_just]]))
  names(data[[column_gen]]) <- gsub("_2$", "_gen", names(data[[column_gen]]))

  # Return the modified data frame
  return(data)
}

gjg <- convert_vigOrder_columns(gjg, "norm_signal", "norm_signal_gen", "vigOrder")
names(gjg)[names(gjg) == "norm_signal"] <- "norm_signal_just"
gjg <- convert_vigOrder_columns(gjg, "approval", "approval_gen", "vigOrder")
names(gjg)[names(gjg) == "approval"] <- "approval_just"
gjg <- convert_vigOrder_columns(gjg, "moral", "moral_gen", "vigOrder")
names(gjg)[names(gjg) == "moral"] <- "moral_just"
gjg <- convert_vigOrder_columns(gjg, "genuine", "genuine_gen", "vigOrder")
names(gjg)[names(gjg) == "genuine"] <- "genuine_just"
gjg <- convert_vigOrder_columns(gjg, "deliberate", "deliberate_gen", "vigOrder")
names(gjg)[names(gjg) == "deliberate"] <- "deliberate_just"
gjg <- convert_vigOrder_columns(gjg, "spontaneous", "spontaneous_gen", "vigOrder")
names(gjg)[names(gjg) == "spontaneous"] <- "spontaneous_just"
gjg <- convert_vigOrder_columns(gjg, "emotion", "emotion_gen", "vigOrder")
names(gjg)[names(gjg) == "emotion"] <- "emotion_just"
gjg <- convert_vigOrder_columns(gjg, "logic", "logic_gen", "vigOrder")
names(gjg)[names(gjg) == "logic"] <- "logic_just"
gjg <- convert_vigOrder_columns(gjg, "quick", "quick_gen", "vigOrder")
names(gjg)[names(gjg) == "quick"] <- "quick_just"
gjg <- convert_vigOrder_columns(gjg, "slow", "slow_gen", "vigOrder")
names(gjg)[names(gjg) == "slow"] <- "slow_just"
gjg <- convert_vigOrder_columns(gjg, "warm", "warm_gen", "vigOrder")
names(gjg)[names(gjg) == "warm"] <- "warm_just"
gjg <- convert_vigOrder_columns(gjg, "good.natured", "good.natured_gen", "vigOrder")
names(gjg)[names(gjg) == "good.natured"] <- "good.natured_just"
gjg <- convert_vigOrder_columns(gjg, "tolerant", "tolerant_gen", "vigOrder")
names(gjg)[names(gjg) == "tolerant"] <- "tolerant_just"
gjg <- convert_vigOrder_columns(gjg, "sincere", "sincere_gen", "vigOrder")
names(gjg)[names(gjg) == "sincere"] <- "sincere_just"
gjg <- convert_vigOrder_columns(gjg, "competent", "competent_gen", "vigOrder")
names(gjg)[names(gjg) == "competent"] <- "competent_just"
gjg <- convert_vigOrder_columns(gjg, "confident", "confident_gen", "vigOrder")
names(gjg)[names(gjg) == "confident"] <- "confident_just"
gjg <- convert_vigOrder_columns(gjg, "independent", "independent_gen", "vigOrder")
names(gjg)[names(gjg) == "independent"] <- "independent_just"
gjg <- convert_vigOrder_columns(gjg, "competitive", "competitive_gen", "vigOrder")
names(gjg)[names(gjg) == "competitive"] <- "competitive_just"
gjg <- convert_vigOrder_columns(gjg, "intelligent", "intelligent_gen", "vigOrder")
names(gjg)[names(gjg) == "intelligent"] <- "intelligent_just"
gjg <- convert_vigOrder_columns(gjg, "politics", "politics_gen", "vigOrder")
names(gjg)[names(gjg) == "politics"] <- "politics_just"
gjg <- convert_vigOrder_columns(gjg, "diff_org_polit", "diff_org_polit_gen", "vigOrder")
names(gjg)[names(gjg) == "diff_org_polit"] <- "diff_org_polit_just"

Attention check

Code
# filtering out failures/nonresponses to attention checks
length(gjg$pid)
gjg <- gjg %>%
  filter(!is.na(attn_bucket), attn_self>2)
length(gjg$pid)

1 participant failed the attention check.

Demographics

Code
# Subset your data frame to include only the demographic columns
numeric_demos <- gjg[,c("age", "income", "ses", "political_social", "political_economic")]

# descriptive stats for numeric demos
describeBy(numeric_demos)

gjg$gender <- as.factor(as.character(gjg$gender))
levels(gjg$gender)
table(gjg$gender)
gjg$gender <- ifelse(gjg$gender == 1, "Man",
                     ifelse(gjg$gender == 2, "Woman",
                            ifelse(gjg$gender == 3, "Nonbinary person or Other",
                                   ifelse(gjg$gender == 4, NA, NA))))
prop.table(table(gjg$gender, useNA="always"))

gjg$race<-as.factor(gjg$race)
levels(gjg$race)
table(gjg$race)
gjg$race <- ifelse(gjg$race == 1, "American Indian or Alaskan Native",
                  ifelse(gjg$race == 2, "Asian",
                         ifelse(gjg$race == 3, "Black",
                                ifelse(gjg$race == 100, "Middle Eastern",
                                       ifelse(gjg$race == 4, "Native Hawaiian or Other Pacific Islander",
                                              ifelse(gjg$race == 5, "White",
                                                     ifelse(gjg$race == 6, "Latinx",
                                                            ifelse(gjg$race == 7 | gjg$race == 99, "Unlisted",
                                                                   ifelse(gjg$race == "", "Unlisted", 
                                                                          ifelse(grepl(",", gjg$race), "Multiracial", NA))))))))))
gjg$race<-as.factor(gjg$race)
levels(gjg$race)
table(gjg$race)
prop.table(table(gjg$race))

gjg$income <- as.factor(as.character(gjg$income))
levels(gjg$income)
table(gjg$income)
gjg$income <- ifelse(gjg$income == 1, "<$10,000",
                     ifelse(gjg$income == 2, "$10,000-$19,999",
                            ifelse(gjg$income == 3, "$20,000-$29,999",
                                   ifelse(gjg$income == 4, "$30,000-$39,999",
                                          ifelse(gjg$income == 5, "$40,000-$49,999",
                                                 ifelse(gjg$income == 6, "$50,000-$74,999",
                                                        ifelse(gjg$income == 7, "$75,000-$99,999",
                                                               ifelse(gjg$income == 8, "$100,000-$149,999", 
                                                                      ifelse(gjg$income == 9, ">$150,000", NA)))))))))
prop.table(table(gjg$income, useNA="always"))

gjg$education <- as.factor(as.character(gjg$education))
levels(gjg$education)
table(gjg$education)
gjg$education <- ifelse(gjg$education == 1, "Less than a high school diploma",
                     ifelse(gjg$education == 2, "High school degree or equivalent",
                            ifelse(gjg$education == 3, "Some college, no degree",
                                   ifelse(gjg$education == 4, "Associate Degree",
                                          ifelse(gjg$education == 5, "Bachelor's Degree",
                                                 ifelse(gjg$education == 6, "Postgraduate Degree", NA))))))
prop.table(table(gjg$education, useNA="always"))

gjg$political_party <- as.factor(as.character(gjg$political_party))
levels(gjg$political_party)
table(gjg$political_party)
gjg$political_party <- ifelse(gjg$political_party == 1, "Republican",
                              ifelse(gjg$political_party == 2, "Democrat",
                                     ifelse(gjg$political_party == 3, "Independent",
                                            ifelse(gjg$political_party == 4, "Something else", NA))))
prop.table(table(gjg$political_party, useNA="always"))

# Create composite political measures
gjg$polit_self <- ifelse(gjg$political_overall %in% c(1, 2, 3), "Democrat",
                         ifelse(gjg$political_overall == 4, "Moderate",
                                ifelse(gjg$political_overall %in% c(5, 6, 7), "Republican", NA)))

Correlation

Code
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", "same_org_polit", "diff_org_polit_just", "diff_org_polit_gen", "age", "ses", "political_overall", "political_social", "political_economic")
names(gjg)
  [1] "attn_bucket"            "reputation_signal_1"    "reputation_signal_2"   
  [4] "norm_signal_1"          "norm_signal_2"          "approval_1"            
  [7] "approval_2"             "moral_1"                "moral_2"               
 [10] "genuine_1"              "genuine_2"              "deliberate_1"          
 [13] "deliberate_2"           "spontaneous_1"          "spontaneous_2"         
 [16] "emotion_1"              "emotion_2"              "logic_1"               
 [19] "logic_2"                "quick_1"                "quick_2"               
 [22] "slow_1"                 "slow_2"                 "warm_1"                
 [25] "warm_2"                 "good.natured_1"         "good.natured_2"        
 [28] "tolerant_1"             "tolerant_2"             "sincere_1"             
 [31] "sincere_2"              "competent_1"            "competent_2"           
 [34] "confident_1"            "confident_2"            "independent_1"         
 [37] "independent_2"          "competitive_1"          "competitive_2"         
 [40] "intelligent_1"          "intelligent_2"          "politics_1"            
 [43] "politics_2"             "same_org"               "same_org_polit"        
 [46] "diff_org_polit_1"       "diff_org_polit_2"       "age"                   
 [49] "gender"                 "race"                   "income"                
 [52] "education"              "ses"                    "political_party"       
 [55] "political_party_4_TEXT" "political_overall"      "political_social"      
 [58] "political_economic"     "openFeedback"           "confusion"             
 [61] "attn_self"              "pid"                    "vigOrder"              
 [64] "firstSentence"          "secondSentence"         "vigFirstVirtue"        
 [67] "vigSecondVirtue"        "nameOne"                "nameTwo"               
 [70] "reputation_signal_just" "reputation_signal_gen"  "norm_signal_just"      
 [73] "norm_signal_gen"        "approval_just"          "approval_gen"          
 [76] "moral_just"             "moral_gen"              "genuine_just"          
 [79] "genuine_gen"            "deliberate_just"        "deliberate_gen"        
 [82] "spontaneous_just"       "spontaneous_gen"        "emotion_just"          
 [85] "emotion_gen"            "logic_just"             "logic_gen"             
 [88] "quick_just"             "quick_gen"              "slow_just"             
 [91] "slow_gen"               "warm_just"              "warm_gen"              
 [94] "good.natured_just"      "good.natured_gen"       "tolerant_just"         
 [97] "tolerant_gen"           "sincere_just"           "sincere_gen"           
[100] "competent_just"         "competent_gen"          "confident_just"        
[103] "confident_gen"          "independent_just"       "independent_gen"       
[106] "competitive_just"       "competitive_gen"        "intelligent_just"      
[109] "intelligent_gen"        "politics_just"          "politics_gen"          
[112] "diff_org_polit_just"    "diff_org_polit_gen"     "polit_self"            
Code
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", "same_org_polit", "diff_org_polit_just", "diff_org_polit_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)

Code
# New columns for composite of warmth and competence
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)

# 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", "politics_just", "politics_gen", "same_org_polit", "diff_org_polit_just", "diff_org_polit_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)

Code
# 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", "warm_just", "good.natured_just", "tolerant_just", "sincere_just", "competent_just", "confident_just", "independent_just", "competitive_just", "intelligent_just", "warmth_just", "competence_just","politics_just", "diff_org_polit_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)

Code
# 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", "warm_gen", "good.natured_gen", "tolerant_gen", "sincere_gen", "competent_gen", "confident_gen", "independent_gen", "competitive_gen", "intelligent_gen", "warmth_gen", "competence_gen","politics_gen", "diff_org_polit_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)

Code
# 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",
         "diffOrgPolit_just"="diff_org_polit_just",
         "diffOrgPolit_gen"="diff_org_polit_gen")

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","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","warmth_just","warmth_gen","competence_just","competence_gen", "politics_just", "politics_gen", "diffOrgPolit_just", "diffOrgPolit_gen")

gjg_long<-gjg_long %>%
  separate(DV, into= c("DV", "motive"), sep="_")
gjg_long <- spread(gjg_long, DV, resp)

DVs_col <- gjg_long[c("reputationSignal","normSignal", "approval", "moral", "genuine", "deliberate", "spontaneous", "emotion", "logic", "quick", "slow", "warm", "good.natured", "tolerant", "sincere", "competent", "confident", "independent", "competitive", "intelligent", "warmth", "competence","politics", "diffOrgPolit", "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)

Changing to long format

Code
# splitting data into gen and just motives
names(gjg)[names(gjg) == "reputation_signal_1"] <- "reputationSignal1"
names(gjg)[names(gjg) == "reputation_signal_2"] <- "reputationSignal2"
names(gjg)[names(gjg) == "norm_signal_1"] <- "normSignal1"
names(gjg)[names(gjg) == "norm_signal_2"] <- "normSignal2"
names(gjg)[names(gjg) == "approval_1"] <- "approval1"
names(gjg)[names(gjg) == "approval_2"] <- "approval2"
names(gjg)[names(gjg) == "moral_1"] <- "moral1"
names(gjg)[names(gjg) == "moral_2"] <- "moral2"
names(gjg)[names(gjg) == "genuine_1"] <- "genuine1"
names(gjg)[names(gjg) == "genuine_2"] <- "genuine2"
names(gjg)[names(gjg) == "deliberate_1"] <- "deliberate1"
names(gjg)[names(gjg) == "deliberate_2"] <- "deliberate2"
names(gjg)[names(gjg) == "spontaneous_1"] <- "spontaneous1"
names(gjg)[names(gjg) == "spontaneous_2"] <- "spontaneous2"
names(gjg)[names(gjg) == "emotion_1"] <- "emotion1"
names(gjg)[names(gjg) == "emotion_2"] <- "emotion2"
names(gjg)[names(gjg) == "logic_1"] <- "logic1"
names(gjg)[names(gjg) == "logic_2"] <- "logic2"
names(gjg)[names(gjg) == "quick_1"] <- "quick1"
names(gjg)[names(gjg) == "quick_2"] <- "quick2"
names(gjg)[names(gjg) == "slow_1"] <- "slow1"
names(gjg)[names(gjg) == "slow_2"] <- "slow2"
names(gjg)[names(gjg) == "warm_1"] <- "warm1"
names(gjg)[names(gjg) == "warm_2"] <- "warm2"
names(gjg)[names(gjg) == "good.natured_1"] <- "good.natured1"
names(gjg)[names(gjg) == "good.natured_2"] <- "good.natured2"
names(gjg)[names(gjg) == "tolerant_1"] <- "tolerant1"
names(gjg)[names(gjg) == "tolerant_2"] <- "tolerant2"
names(gjg)[names(gjg) == "sincere_1"] <- "sincere1"
names(gjg)[names(gjg) == "sincere_2"] <- "sincere2"
names(gjg)[names(gjg) == "competent_1"] <- "competent1"
names(gjg)[names(gjg) == "competent_2"] <- "competent2"
names(gjg)[names(gjg) == "confident_1"] <- "confident1"
names(gjg)[names(gjg) == "confident_2"] <- "confident2"
names(gjg)[names(gjg) == "independent_1"] <- "independent1"
names(gjg)[names(gjg) == "independent_2"] <- "independent2"
names(gjg)[names(gjg) == "competitive_1"] <- "competitive1"
names(gjg)[names(gjg) == "competitive_2"] <- "competitive2"
names(gjg)[names(gjg) == "intelligent_1"] <- "intelligent1"
names(gjg)[names(gjg) == "intelligent_2"] <- "intelligent2"
names(gjg)[names(gjg) == "politics_1"] <- "politics1"
names(gjg)[names(gjg) == "politics_2"] <- "politics2"
names(gjg)[names(gjg) == "same_org"] <- "sameOrg"
names(gjg)[names(gjg) == "same_org_polit"] <- "sameOrgPolit"
names(gjg)[names(gjg) == "diff_org_polit_1"] <- "diffOrgPolit1"
names(gjg)[names(gjg) == "diff_org_polit_2"] <- "diffOrgPolit2"

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","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","warmth_just","warmth_gen","competence_just","competence_gen", "politics_just", "politics_gen", "diffOrgPolit_just", "diffOrgPolit_gen")

gjg_long<-gjg_long %>%
  separate(DV, into= c("DV", "motive"), sep="_")
gjg_long <- spread(gjg_long, DV, resp)

Linear Mixed Effects

Norm signaling, approval, moral, and genuine are significant.

Code
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")
}

# mixed effects model
gjg_long$motive <- as.factor(gjg_long$motive)
mod_reputationSignaling <- lmer(reputationSignal ~ motive + (1 | pid), data = gjg_long)
summary(mod_reputationSignaling)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: reputationSignal ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1293.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.0263 -0.5968 -0.1737  0.5285  2.3345 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.8502   0.9220  
 Residual             0.8691   0.9322  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.54271    0.09295 318.19206  27.356   <2e-16 ***
motivejust    0.06533    0.09346 198.00000   0.699    0.485    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.503
Code
percep_plot_list <- list(plot_cooker("motive", "reputationSignal", "Reputation Signal", c("generosity","justice")," ", 199),plot_cooker("motive", "normSignal", "Norm Signal", c("generosity", "justice")," ", 199),plot_cooker("motive", "approval", "Approval", c("generosity", "justice")," ", 199),plot_cooker("motive", "moral", "Moral", c("generosity", "justice")," ", 199),plot_cooker("motive", "genuine", "Genuine", c("generosity", "justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 2, nrow = 3)

overall_percep_title <- ggdraw() + 
  draw_label("Perception DVs", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_reputationSignaling <- lmer(reputationSignal ~ motive + (1 | pid), data = gjg_long)
summary(mod_reputationSignaling)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: reputationSignal ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1293.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.0263 -0.5968 -0.1737  0.5285  2.3345 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.8502   0.9220  
 Residual             0.8691   0.9322  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.54271    0.09295 318.19206  27.356   <2e-16 ***
motivejust    0.06533    0.09346 198.00000   0.699    0.485    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.503
Code
mod_normSignaling <- lmer(normSignal ~ motive + (1 | pid), data = gjg_long)
summary(mod_normSignaling)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: normSignal ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1223.2

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.86310 -0.48266  0.07358  0.45221  2.45402 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.7565   0.8698  
 Residual             0.7059   0.8402  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.30653    0.08573 312.39881  38.571  < 2e-16 ***
motivejust    0.46734    0.08423 198.00000   5.548 9.17e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.491
Code
mod_approval <- lmer(approval ~ motive + (1 | pid), data = gjg_long)
summary(mod_approval)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: approval ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 956.7

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.7777 -0.4335  0.1447  0.6165  2.2261 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3434   0.5860  
 Residual             0.3816   0.6177  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.48744    0.06036 323.43262  74.349  < 2e-16 ***
motivejust   -0.29146    0.06193 198.00000  -4.707 4.72e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.513
Code
mod_moral <- lmer(moral ~ motive + (1 | pid), data = gjg_long)
summary(mod_moral)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: moral ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 951.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.8553 -0.2234  0.0288  0.5668  2.5846 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3769   0.6139  
 Residual             0.3573   0.5977  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.25628    0.06074 313.40954  70.076   <2e-16 ***
motivejust   -0.15075    0.05992 198.00000  -2.516   0.0127 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.493
Code
mod_genuine <- lmer(genuine ~ motive + (1 | pid), data = gjg_long)
summary(mod_genuine)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: genuine ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1020.3

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.4727 -0.4038 -0.0198  0.6192  1.9570 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3036   0.5510  
 Residual             0.5052   0.7108  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.25628    0.06375 347.10016  66.764   <2e-16 ***
motivejust   -0.14070    0.07126 198.00000  -1.975   0.0497 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.559

Spontaneous, logic, and slow are significant (deliberate is marginally significant).

Code
percep_plot_list <- list(plot_cooker("motive", "deliberate", "Deliberate", c("generosity","justice")," ", 199),plot_cooker("motive", "spontaneous", "Spontaneous", c("generosity", "justice")," ", 199),plot_cooker("motive", "emotion", "Emotion", c("generosity", "justice")," ", 199),plot_cooker("motive", "logic", "Logic", c("generosity", "justice")," ", 199),plot_cooker("motive", "quick", "Quick", c("generosity", "justice"),"", 199),plot_cooker("motive","slow","Slow",c("generosity","justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 2, nrow = 3)

overall_percep_title <- ggdraw() + 
  draw_label("Deliberation DVs", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_deliberate <- lmer(deliberate ~ motive + (1 | pid), data = gjg_long)
summary(mod_deliberate)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: deliberate ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 987.3

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.9015 -0.3386  0.2171  0.4051  3.0363 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.5972   0.7728  
 Residual             0.3151   0.5613  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.11055    0.06771 277.21296  60.709   <2e-16 ***
motivejust    0.10553    0.05628 198.00000   1.875   0.0622 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.416
Code
mod_spontaneous <- lmer(spontaneous ~ motive + (1 | pid), data = gjg_long)
summary(mod_spontaneous)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: spontaneous ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1210.4

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.61569 -0.43139 -0.04319  0.43987  2.78139 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.9120   0.9550  
 Residual             0.6044   0.7775  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.83920    0.08730 290.81187  32.524   <2e-16 ***
motivejust   -0.19598    0.07794 198.00000  -2.514   0.0127 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.446
Code
mod_emotion <- lmer(emotion ~ motive + (1 | pid), data = gjg_long)
summary(mod_emotion)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: emotion ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1151.9

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.8665 -0.5548  0.1019  0.6650  1.8209 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3554   0.5962  
 Residual             0.7485   0.8651  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.90955    0.07448 358.80178  52.491   <2e-16 ***
motivejust   -0.05528    0.08673 198.00000  -0.637    0.525    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.582
Code
mod_logic <- lmer(logic ~ motive + (1 | pid), data = gjg_long)
summary(mod_logic)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: logic ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1158.2

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.45475 -0.58942 -0.01264  0.47439  1.85269 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.5054   0.7109  
 Residual             0.6707   0.8190  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.38191    0.07688 334.26853  43.991  < 2e-16 ***
motivejust    0.47236    0.08210 198.00000   5.753 3.28e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.534
Code
mod_quick <- lmer(quick ~ motive + (1 | pid), data = gjg_long)
summary(mod_quick)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: quick ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1121.7

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.1641 -0.3589 -0.0017  0.2680  3.0732 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.9723   0.9860  
 Residual             0.4000   0.6324  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.19598    0.08304 263.64685  38.487   <2e-16 ***
motivejust   -0.05528    0.06340 198.00001  -0.872    0.384    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.382
Code
mod_slow <- lmer(slow ~ motive + (1 | pid), data = gjg_long)
summary(mod_slow)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: slow ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1061.1

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.9249 -0.4491 -0.1321  0.1849  3.5032 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.7689   0.8769  
 Residual             0.3633   0.6027  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.02513    0.07543 271.00500  26.848   <2e-16 ***
motivejust    0.12563    0.06042 198.00000   2.079   0.0389 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.401

Warmth and competence are both significant.

Code
percep_plot_list <- list(plot_cooker("motive", "warmth", "Warmth", c("generosity","justice")," ", 199),plot_cooker("motive", "competence", "Competence", c("generosity", "justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 2, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Warmth/Competence DVs", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_warmth <- lmer(warmth ~ motive + (1 | pid), data = gjg_long)
summary(mod_warmth)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: warmth ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 873.9

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.8289 -0.5064  0.0885  0.5319  2.9143 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.2465   0.4965  
 Residual             0.3271   0.5720  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.08417    0.05369 334.26210  76.067  < 2e-16 ***
motivejust   -0.35678    0.05734 198.00000  -6.222 2.86e-09 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.534
Code
mod_competence <- lmer(competence ~ motive + (1 | pid), data = gjg_long)
summary(mod_competence)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: competence ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 498

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.6379 -0.3581 -0.0149  0.4290  3.1747 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.30198  0.5495  
 Residual             0.06048  0.2459  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.66332    0.04268 233.74837  85.837  < 2e-16 ***
motivejust    0.12462    0.02465 198.00000   5.055 9.77e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.289

Warm, good-natured, and tolerant are significant (sincere is marginally significant).

Code
percep_plot_list <- list(plot_cooker("motive", "warm", "Warm", c("generosity","justice")," ", 199),plot_cooker("motive", "good.natured", "Good-Natured", c("generosity", "justice")," ", 199),plot_cooker("motive", "tolerant", "Tolerant", c("generosity", "justice")," ", 199),plot_cooker("motive", "sincere", "Sincere", c("generosity", "justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 2, nrow = 2)

overall_percep_title <- ggdraw() + 
  draw_label("Warmth DVs", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_warm <- lmer(warm ~ motive + (1 | pid), data = gjg_long)
summary(mod_warm)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: warm ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1066.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.4583 -0.5360  0.1088  0.5062  2.4571 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3006   0.5483  
 Residual             0.5937   0.7705  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.05528    0.06704 355.78956  60.493  < 2e-16 ***
motivejust   -0.55779    0.07724 198.00000  -7.221 1.08e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.576
Code
mod_good.natured <- lmer(good.natured ~ motive + (1 | pid), data = gjg_long)
summary(mod_good.natured)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: good.natured ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 988.6

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.3438 -0.3235  0.2092  0.7349  2.2450 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3267   0.5716  
 Residual             0.4385   0.6622  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.22613    0.06201 334.94058   68.15  < 2e-16 ***
motivejust   -0.39698    0.06638 198.00000   -5.98 1.02e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.535
Code
mod_tolerant <- lmer(tolerant ~ motive + (1 | pid), data = gjg_long)
summary(mod_tolerant)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: tolerant ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1011.8

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.76653 -0.61680 -0.06626  0.40906  2.54739 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.4805   0.6932  
 Residual             0.3967   0.6298  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.90955    0.06639 304.60269  58.888  < 2e-16 ***
motivejust   -0.34673    0.06314 198.00000  -5.492 1.21e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.476
Code
mod_sincere <- lmer(sincere ~ motive + (1 | pid), data = gjg_long)
summary(mod_sincere)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: sincere ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 999.5

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.6854 -0.5306  0.0350  0.6246  2.2418 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.2799   0.5290  
 Residual             0.4845   0.6961  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.14573    0.06198 349.18388   66.89   <2e-16 ***
motivejust   -0.12563    0.06978 198.00000   -1.80   0.0733 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.563

Confident, independent, and competitive are significant (competent is marginally significant).

Code
percep_plot_list <- list(plot_cooker("motive", "competent", "Competent", c("generosity","justice")," ", 199),plot_cooker("motive", "confident", "Confident", c("generosity", "justice")," ", 199),plot_cooker("motive", "independent", "Independent", c("generosity", "justice")," ", 199),plot_cooker("motive", "competitive", "Competitive", c("generosity", "justice")," ", 199),plot_cooker("motive", "intelligent", "Intelligent", c("generosity", "justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 2, nrow = 3)

overall_percep_title <- ggdraw() + 
  draw_label("Competence DVs", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_competent <- lmer(competent ~ motive + (1 | pid), data = gjg_long)
summary(mod_competent)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: competent ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 809.9

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.9426 -0.2051  0.0911  0.2051  3.6463 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.577    0.7596  
 Residual             0.149    0.3860  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.96482    0.06040 242.70585  65.641   <2e-16 ***
motivejust    0.07035    0.03870 198.00000   1.818   0.0706 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.320
Code
mod_confident <- lmer(confident ~ motive + (1 | pid), data = gjg_long)
summary(mod_confident)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: confident ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 853.6

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.2931 -0.3513  0.0895  0.5183  2.7770 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.4256   0.6524  
 Residual             0.2250   0.4744  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.02513    0.05718 277.32587  70.395   <2e-16 ***
motivejust    0.12060    0.04755 198.00000   2.536    0.012 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.416
Code
mod_independent <- lmer(independent ~ motive + (1 | pid), data = gjg_long)
summary(mod_independent)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: independent ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 981.4

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.9186 -0.2287  0.1161  0.4610  3.2479 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.6390   0.7993  
 Residual             0.2938   0.5420  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.91457    0.06846 269.52383  57.178   <2e-16 ***
motivejust    0.11558    0.05434 198.00000   2.127   0.0347 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.397
Code
mod_competitive <- lmer(competitive ~ motive + (1 | pid), data = gjg_long)
summary(mod_competitive)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: competitive ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1152.3

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.84691 -0.40635 -0.06641  0.30386  3.08436 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.7993   0.8940  
 Residual             0.5174   0.7193  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.51759    0.08134 289.36658  30.951  < 2e-16 ***
motivejust    0.26633    0.07211 198.00000   3.693 0.000286 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.443
Code
mod_intelligent <- lmer(intelligent ~ motive + (1 | pid), data = gjg_long)
summary(mod_intelligent)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: intelligent ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 855.7

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-4.7456 -0.2818 -0.0265  0.3409  4.0698 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.5093   0.7136  
 Residual             0.2008   0.4481  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.89447    0.05973 261.47709  65.198   <2e-16 ***
motivejust    0.05025    0.04492 198.00000   1.119    0.265    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.376

Political Perceptions

No significance.

Code
plot_cooker7 <- 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: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))
  ggpar(part1, legend = "none")
}

percep_plot_list <- list(plot_cooker7("motive", "politics", "Donor Politics", c("generosity","justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Donor Politics", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_politics <- lmer(politics ~ motive + (1 | pid), data = gjg_long)
summary(mod_politics)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: politics ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1445.8

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.8381 -1.0004  0.1865  0.7334  2.3739 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.000    0.000   
 Residual             2.196    1.482   
Number of obs: 398, groups:  pid, 199

Fixed effects:
            Estimate Std. Error       df t value Pr(>|t|)    
(Intercept)   3.4824     0.1050 396.0000  33.153   <2e-16 ***
motivejust    0.2412     0.1485 396.0000   1.624    0.105    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.707
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
Code
# effect size = 0.163
d <- 0.2412 / sqrt(2.196)

# by own politics

mod_politics2 <- lmer(politics ~ motive * polit_self + (1 | pid), data = gjg_long)
summary(mod_politics2)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: politics ~ motive * polit_self + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1420.5

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.18973 -0.72991 -0.03318  0.66355  2.75375 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.00     0.000   
 Residual             2.06     1.435   
Number of obs: 398, groups:  pid, 199

Fixed effects:
                                Estimate Std. Error       df t value Pr(>|t|)
(Intercept)                       3.0476     0.1401 392.0000  21.758  < 2e-16
motivejust                        0.4952     0.1981 392.0000   2.500   0.0128
polit_selfModerate                0.6190     0.2557 392.0000   2.421   0.0159
polit_selfRepublican              1.1973     0.2483 392.0000   4.822 2.04e-06
motivejust:polit_selfModerate    -0.4730     0.3617 392.0000  -1.308   0.1917
motivejust:polit_selfRepublican  -0.5973     0.3512 392.0000  -1.701   0.0898
                                   
(Intercept)                     ***
motivejust                      *  
polit_selfModerate              *  
polit_selfRepublican            ***
motivejust:polit_selfModerate      
motivejust:polit_selfRepublican .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
            (Intr) mtvjst plt_sM plt_sR mtv:_M
motivejust  -0.707                            
plt_slfMdrt -0.548  0.387                     
plt_slfRpbl -0.564  0.399  0.309              
mtvjst:pl_M  0.387 -0.548 -0.707 -0.218       
mtvjst:pl_R  0.399 -0.564 -0.218 -0.707  0.309
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')

Marginally significant.

Code
percep_plot_list <- list(plot_cooker7("motive", "diffOrgPolit", "Organization Politics", c("generosity","justice")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Organization Politics", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_orgPolitics <- lmer(diffOrgPolit ~ motive + (1 | pid), data = gjg_long)
summary(mod_orgPolitics)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: diffOrgPolit ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 921.3

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.8717 -0.9492  0.1600  0.4053  2.4370 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.00     0.000   
 Residual             2.18     1.477   
Number of obs: 254, groups:  pid, 127

Fixed effects:
            Estimate Std. Error       df t value Pr(>|t|)    
(Intercept)   3.4016     0.1310 252.0000  25.961   <2e-16 ***
motivejust    0.3622     0.1853 252.0000   1.955   0.0517 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.707
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
Code
# effect size = 0.245
d <- 0.3622 / sqrt(2.18)

# by own politics

mod_orgPolitics2 <- lmer(diffOrgPolit ~ motive * polit_self + (1 | pid), data = gjg_long)
summary(mod_orgPolitics2)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: diffOrgPolit ~ motive * polit_self + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 908.7

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.18955 -0.75336  0.05762  0.62952  2.70382 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.000    0.000   
 Residual             2.092    1.446   
Number of obs: 254, groups:  pid, 127

Fixed effects:
                                Estimate Std. Error       df t value Pr(>|t|)
(Intercept)                       3.0896     0.1767 248.0000  17.486  < 2e-16
motivejust                        0.3582     0.2499 248.0000   1.434  0.15296
polit_selfModerate                0.4104     0.3441 248.0000   1.193  0.23402
polit_selfRepublican              0.8271     0.2989 248.0000   2.767  0.00607
motivejust:polit_selfModerate     0.1835     0.4866 248.0000   0.377  0.70646
motivejust:polit_selfRepublican  -0.1082     0.4227 248.0000  -0.256  0.79815
                                   
(Intercept)                     ***
motivejust                         
polit_selfModerate                 
polit_selfRepublican            ** 
motivejust:polit_selfModerate      
motivejust:polit_selfRepublican    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
            (Intr) mtvjst plt_sM plt_sR mtv:_M
motivejust  -0.707                            
plt_slfMdrt -0.514  0.363                     
plt_slfRpbl -0.591  0.418  0.304              
mtvjst:pl_M  0.363 -0.514 -0.707 -0.215       
mtvjst:pl_R  0.418 -0.591 -0.215 -0.707  0.304
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')

64% of people thought Jon and Will donated to different organizations (36% to same). Among the “same org” group, the average perceived political leaning of the org is significantly different from 4 (more liberal).

Code
# percent of people who thought they donated to same org
prop.table(table(gjg$sameOrg, useNA="always"))  # 64% different, 36% same

table(gjg$sameOrgPolit)
gjg$sameOrgPolit <- ifelse(gjg$sameOrgPolit == 10, 1,
                           ifelse(gjg$sameOrgPolit == 1, 2,
                                  ifelse(gjg$sameOrgPolit == 2, 3,
                                         ifelse(gjg$sameOrgPolit == 3, 4,
                                                ifelse(gjg$sameOrgPolit == 4, 5,
                                                       ifelse(gjg$sameOrgPolit == 5, 6, 
                                                              ifelse(gjg$sameOrgPolit == 6, 7, NA)))))))
prop.table(table(gjg$sameOrgPolit))

shapiro.test(gjg$sameOrgPolit)  
sameorg_test <- wilcox.test(gjg$sameOrgPolit, mu=4)
mean(gjg$sameOrgPolit, na.rm=T)

Exploratory Factor Analyses

Running Factor Analysis for Generosity, 5 factor

Code
#deleting unrelated columns
gjg_long2 <- gjg_long[, ! names(gjg_long) %in% c("attn_bucket","openFeedback","confusion","attn_self","polit_comp","pid","age","gender","race","income","education","ses","political_party","political_overall","political_social","political_economic","warmth","competence","reputationSignal1","reputationSignal2","normSignal1","normSignal2","approval1","approval2","moral1","moral2","genuine1","genuine2","deliberate1","deliberate2","spontaneous1","spontaneous2","emotion1","emotion2","logic1","logic2","quick1","quick2","slow1","slow2","warm1","warm2","good.natured1","good.natured2","tolerant1","tolerant2","sincere1","sincere2","competent1","competent2","confident1","confident2", "independent1","independent2","competitive1","competitive2","intelligent1","intelligent2","warmth1","warmth2","competence1","competence2", "politics1", "politics2", "diffOrgPolit1", "diffOrgPolit2", "political_party_4_TEXT", "vigOrder", "firstSentence", "secondSentence", "vigFirstVirtue", "vigSecondVirtue", "nameOne", "nameTwo", "sameOrg", "sameOrgPolit", "diffOrgPolit", "politics", "polit_self")]

#generous factor analysis
gjg_long_gen <- subset(gjg_long2, motive != "just")
gjg_long_gen <- gjg_long_gen[, ! names(gjg_long_gen) %in% c("motive")]
which(is.na(gjg_long_gen), arr.ind = TRUE)
str(gjg_long_gen)
gjg_long_gen<-as.data.frame(gjg_long_gen)
gjg_long_gen<-na.omit(gjg_long_gen)
#evaluating correlation matrix
write.csv(cor(gjg_long_gen)>0.8, file="Suspect_Correlations.csv")
write.csv(cor(gjg_long_gen), file="Correlation_Values.csv")
#KMO test
KMO(gjg_long_gen)
cortest.bartlett(gjg_long_gen)
#reject the null
ev <- eigen(cor(gjg_long_gen)) 
ev$values
scree(gjg_long_gen, pc=FALSE)

Code
fa.parallel(gjg_long_gen, fa="fa")

Code
Nfacs <- 5
fit <- factanal(gjg_long_gen, Nfacs, rotation="promax")
print(fit, digits=2, cutoff=0.3, sort=TRUE)
loads <- fit$loadings
fa.diagram(loads)

Running Factor Analysis for Justice, 4 factor

Code
gjg_long_just <- subset(gjg_long2, motive != "gen")
gjg_long_just <- gjg_long_just[, ! names(gjg_long_just) %in% c("motive")]
which(is.na(gjg_long_just), arr.ind = TRUE)
str(gjg_long_just)
gjg_long_just<-as.data.frame(gjg_long_just)
gjg_long_just<-na.omit(gjg_long_just)
#evaluating correlation matrix
write.csv(cor(gjg_long_just)>0.8, file="Suspect_Correlations.csv")
write.csv(cor(gjg_long_just), file="Correlation_Values.csv")
#KMO test
KMO(gjg_long_just)
cortest.bartlett(gjg_long_just)
#reject the null
ev <- eigen(cor(gjg_long_just)) 
ev$values
scree(gjg_long_just, pc=FALSE)

Code
fa.parallel(gjg_long_just, fa="fa")

Code
Nfacs <- 4
fit <- factanal(gjg_long_just, Nfacs, rotation="promax")
print(fit, digits=2, cutoff=0.3, sort=TRUE)
loads <- fit$loadings
fa.diagram(loads)

Running Factor Analysis Overall, 5 factor

Code
#deleting unrelated columns
gjg_long3 <- gjg_long[, ! names(gjg_long) %in% c("attn_bucket","gender_text","race_text","income_text","education_text","political_party_text","political_party_4_TEXT","openFeedback","confusion","attn_self","polit_comp","pid","age","gender","race","income","education","ses","political_party","political_social","political_economic","warmth","competence","motive","political_overall","reputationSignal1","reputationSignal2","normSignal1","normSignal2","approval1","approval2","moral1","moral2","genuine1","genuine2","deliberate1","deliberate2","spontaneous1","spontaneous2","emotion1","emotion2","logic1","logic2","quick1","quick2","slow1","slow2","warm1","warm2","good.natured1","good.natured2","tolerant1","tolerant2","sincere1","sincere2","competent1","competent2","confident1","confident2", "independent1","independent2","competitive1","competitive2","intelligent1","intelligent2","warmth1","warmth2","competence1","competence2", "politics1", "politics2", "diffOrgPolit1", "diffOrgPolit2", "political_party_4_TEXT", "vigOrder", "firstSentence", "secondSentence", "vigFirstVirtue", "vigSecondVirtue", "nameOne", "nameTwo", "sameOrg", "sameOrgPolit", "diffOrgPolit", "politics", "polit_self")]
write.csv(cor(gjg_long3)>0.8, file="Suspect_Correlations.csv")
write.csv(cor(gjg_long3), file="Correlation_Values.csv")
#KMO test
KMO(gjg_long3)
cortest.bartlett(gjg_long3)
#reject the null
ev <- eigen(cor(gjg_long3)) 
ev$values
scree(gjg_long3, pc=FALSE)

Code
fa.parallel(gjg_long3, fa="fa")

Code
Nfacs <- 5
fit <- factanal(gjg_long3, Nfacs, rotation="promax")
print(fit, digits=2, cutoff=0.3, sort=TRUE)
#diagram
loads <- fit$loadings
fa.diagram(loads)

Linear Mixed Effects for 5 Factors

Code
#new columns for Factor 1-competence (plus logic, minus competitive), Factor 2-moral goodness (approval, moral, genuine, sincere), Factor 3-warmth (minus sincere), Factor 4-decision speed (quick, spontaneous), Factor 5-decision style (slow, competitive, norm signal)
gjg <- gjg %>%
  mutate(competence2_just=(competent_just+confident_just+independent_just+logic_just+
                            intelligent_just)/5)%>%
  mutate(competence2_gen=(competent_gen+confident_gen+independent_gen+logic_gen+
                            intelligent_gen)/5)%>%
  mutate(moralGoodness_just=(approval_just+moral_just+genuine_just+sincere_just)/4)%>%
  mutate(moralGoodness_gen=(approval_gen+moral_gen+genuine_gen+sincere_gen)/4)%>%
  mutate(warmth2_just=(warm_just+good.natured_just+tolerant_just)/3)%>%
  mutate(warmth2_gen=(warm_gen+good.natured_gen+tolerant_gen)/3)%>%
  mutate(decisionSpeed_just=(quick_just+spontaneous_just)/2)%>%
  mutate(decisionSpeed_gen=(quick_gen+spontaneous_gen)/2)%>%
  mutate(decisionStyle_just=(slow_just+competitive_just+normSignal_just)/3)%>%
  mutate(decisionStyle_gen=(slow_gen+competitive_gen+normSignal_gen)/3)

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","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","warmth_just","warmth_gen","competence_just","competence_gen","competence2_just","competence2_gen","moralGoodness_just","moralGoodness_gen","warmth2_just", "warmth2_gen","decisionSpeed_just","decisionSpeed_gen","decisionStyle_just","decisionStyle_gen")

# splitting data into gen and just motives
gjg_long<-gjg_long %>%
  separate(DV, into= c("DV", "motive"), sep="_")
gjg_long <- spread(gjg_long, DV, resp)  

Mixed Effects Model Competence (Factor 1)

Just donors are perceived to be significantly more competent than generous donors.

Code
percep_plot_list <- list(plot_cooker("motive", "competence2", "Competence", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 1 (Competence)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_competence2 <- lmer(competence2 ~ motive + (1 | pid), data = gjg_long)
summary(mod_competence2)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: competence2 ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 649.5

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.4886 -0.3814  0.0461  0.3657  2.8668 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3704   0.6086  
 Residual             0.1024   0.3201  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.83618    0.04875 245.40581  78.696  < 2e-16 ***
motivejust    0.16583    0.03209 198.00001   5.168 5.76e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.329

Mixed Effects Model Moral Goodness (Factor 2)

Generous donors are perceived to be significantly more morally good than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "moralGoodness", "Moral Goodness", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 2 (Moral Goodness)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_moralGoodness <- lmer(moralGoodness ~ motive + (1 | pid), data = gjg_long)
summary(mod_moralGoodness)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: moralGoodness ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 849.6

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.9834 -0.4760  0.1211  0.5668  2.3933 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.2211   0.4702  
 Residual             0.3139   0.5603  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.28643    0.05185 338.24904  82.670  < 2e-16 ***
motivejust   -0.17714    0.05617 198.00000  -3.154  0.00186 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.542

Mixed Effects Model Warmth (Factor 3)

Generous donors are perceived to be significantly more warm than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "warmth2", "Warmth", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 3 (Warmth)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_warmth2 <- lmer(warmth2 ~ motive + (1 | pid), data = gjg_long)
summary(mod_warmth2)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: warmth2 ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 901.9

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.5307 -0.4873  0.0765  0.5081  2.8459 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.2684   0.5180  
 Residual             0.3490   0.5908  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   4.06365    0.05570 333.07117  72.957  < 2e-16 ***
motivejust   -0.43384    0.05923 198.00000  -7.325  5.9e-12 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.532

Mixed Effects Model Decision Speed (Factor 4)

Generous donors are perceived to make decisions significantly more quickly/spontaneously than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "decisionSpeed", "Decision Speed", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 4 (Decision Speed)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_decisionSpeed <- lmer(decisionSpeed ~ motive + (1 | pid), data = gjg_long)
summary(mod_decisionSpeed)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: decisionSpeed ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 1029.7

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.92139 -0.38726 -0.06053  0.30334  3.13623 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.6433   0.8021  
 Residual             0.3582   0.5985  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   3.01759    0.07094 280.33770  42.535   <2e-16 ***
motivejust   -0.12563    0.06000 198.00000  -2.094   0.0376 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.423

Mixed Effects Model Decision Speed (Factor 5)

Just donors are perceived to make decisions significantly more slowly/competitively and engage in norm signaling more than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "decisionStyle", "Decision Style", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 5 (Decision Style)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_decisionStyle <- lmer(decisionStyle ~ motive + (1 | pid), data = gjg_long)
summary(mod_decisionStyle)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: decisionStyle ~ motive + (1 | pid)
   Data: gjg_long

REML criterion at convergence: 834.7

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.72562 -0.50873 -0.03778  0.42085  2.80471 

Random effects:
 Groups   Name        Variance Std.Dev.
 pid      (Intercept) 0.3368   0.5804  
 Residual             0.2408   0.4907  
Number of obs: 398, groups:  pid, 199

Fixed effects:
             Estimate Std. Error        df t value Pr(>|t|)    
(Intercept)   2.61642    0.05388 295.50131  48.565  < 2e-16 ***
motivejust    0.28643    0.04919 198.00000   5.823  2.3e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr)
motivejust -0.457

Confirmatory Factor Analyses

Running Factor Analysis for V3 Factors, 6 Factor

These 6 factors are a reasonably good fit.

Code
#install.packages("lavaan")
library(lavaan)
path <- '
f1 =~ warm + good.natured + tolerant + sincere
f2 =~ logic + independent + intelligent + confident + competent
f3 =~ approval + moral + genuine
f4 =~ reputationSignal
f5 =~ quick + spontaneous
f6 =~ emotion
'
model <- cfa(path, data= gjg_long3)
summary(model, fit.measures=TRUE)

Linear Mixed Effects for 6 Factors (from V3)

Code
#new column for Factor 3-moral goodness (approval, moral, genuine)
gjg <- gjg %>%
  mutate(moralGoodness2_just=(approval_just+moral_just+genuine_just)/3)%>%
  mutate(moralGoodness2_gen=(approval_gen+moral_gen+genuine_gen)/3)

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","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","warmth_just","warmth_gen","competence_just","competence_gen","competence2_just","competence2_gen","moralGoodness2_just","moralGoodness2_gen","decisionSpeed_just","decisionSpeed_gen")

# splitting data into gen and just motives
gjg_long<-gjg_long %>%
  separate(DV, into= c("DV", "motive"), sep="_")
gjg_long <- spread(gjg_long, DV, resp)  

Mixed Effects Model Warmth (Factor 1)

Generous donors are perceived to be significantly warmer than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "warmth", "Warmth", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 1 (Warmth)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_warmth <- lmer(warmth ~ motive + (1 | pid), data = gjg_long)
summary(mod_warmth)

Mixed Effects Model Competence (Factor 2)

Just donors are perceived to be significantly more competent than generous donors.

Code
percep_plot_list <- list(plot_cooker("motive", "competence2", "Competence", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 2 (Competence)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_competence <- lmer(competence2 ~ motive + (1 | pid), data = gjg_long)
summary(mod_competence)

Mixed Effects Model Moral Goodness (Factor 3)

Generous donors are perceived to be significantly more morally good than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "moralGoodness2", "Moral Goodness", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 3 (Moral Goodness)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_moralGoodness <- lmer(moralGoodness2 ~ motive + (1 | pid), data = gjg_long)
summary(mod_moralGoodness)

Mixed Effects Model Reputation Signaling (Factor 4)

No significant findings.

Code
percep_plot_list <- list(plot_cooker("motive", "reputationSignal", "Reputation Signaling", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 4 (Reputation Signaling)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_reputationSignal<- lmer(reputationSignal ~ motive + (1 | pid), data = gjg_long)
summary(mod_reputationSignal)

Mixed Effects Model Decision Speed (Factor 5)

Generous donors are perceived to make decisions significantly more quickly/spontaneously than just donors.

Code
percep_plot_list <- list(plot_cooker("motive", "decisionSpeed", "Decision Speed", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 5 (Decision Speed)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_decisionSpeed<- lmer(decisionSpeed ~ motive + (1 | pid), data = gjg_long)
summary(mod_decisionSpeed)

Mixed Effects Model Emotion (Factor 6)

No significant findings.

Code
percep_plot_list <- list(plot_cooker("motive", "emotion", "Emotion", c("justice","generosity")," ", 199))

percep_plot_arranged <- ggarrange(plotlist = percep_plot_list, ncol = 1, nrow = 1)

overall_percep_title <- ggdraw() + 
  draw_label("Factor 6 (Emotion)", fontface = "bold")

plot_grid(overall_percep_title, percep_plot_arranged, ncol = 1, rel_heights = c(0.1, 0.9))

Code
mod_emotion<- lmer(emotion ~ motive + (1 | pid), data = gjg_long)
summary(mod_emotion)

Running Factor Analysis for Original Factors, 6 Factor

Not as good of a fit.

Code
library(lavaan)
path <- '
f1 =~ warm + good.natured + tolerant + sincere
f2 =~ independent + intelligent + confident + competent + competitive
f3 =~ approval + moral + genuine
f4 =~ quick + spontaneous + emotion + slow + deliberate + logic
f5 =~ reputationSignal
f6 =~ normSignal
'
model <- cfa(path, data= gjg_long3)
summary(model, fit.measures=TRUE)