0.1 Cleanup

experiment_two_DS_time <- read.csv("Experiment_2_Dataset_clean.csv")
experiment_two_DS <- read.csv("Experiment_2_Dataset_clean_noTime.csv")
corr_table <- readRDS("corr_table.rds")
m4 <- readRDS("m4.rds")
m5 <- readRDS("m5.rds")
m5_gen <- readRDS("m5_gen.rds")
m7 <- readRDS("m7.rds")
m8 <- readRDS("m8.rds")
m8_gen <- readRDS("m8_gen.rds")
m8_Age <- readRDS("m8_Age.rds")
dm0 <- readRDS("dm0.rds")
dm1 <- readRDS("dm1.rds")
dm2 <- readRDS("dm2.rds")
dm3 <- readRDS("dm3.rds")
dm4 <- readRDS("dm4.rds")
dm5 <- readRDS("dm5.rds")
demographicQuestions <- c("Age", "Gender", "Ethnicity", "Eth.ori", "Edu")
sjsQuestions <- c("SJS.1", "SJS.2", "SJS.3")
srpsQuestions <- c("SRPS.1"
, "SRPS.2"
, "SRPS.3"
, "SRPS.4"
, "SRPS.5"
, "SRPS.6"
, "SRPS.7"
, "SRPS.8"
, "SRPS.9"
, "SRPS.10"
, "SRPS.11"
, "SRPS.12"
, "SRPS.13"
, "SRPS.14"
, "SRPS.15"
, "SRPS.17"
, "SRPS.18"
, "SRPS.19"
, "SRPS.20"
, "SRPS.21"
, "SRPS.22"
, "SRPS.23"
, "SRPS.24")

srps.rcQuestions <- c("SRPS.1"
, "SRPS.2"
, "SRPS.3"
, "SRPS.4"
, "SRPS.5"
, "SRPS.6"
, "SRPS.7"
, "SRPS.8"
, "SRPS.9"
, "SRPS.10"
, "SRPS.11"
, "SRPS.12"
, "SRPS.13"
, "SRPS.14"
, "SRPS.15")

srps.dmQuestions <- c("SRPS.17"
, "SRPS.18"
, "SRPS.19"
, "SRPS.20"
, "SRPS.21"
, "SRPS.22"
, "SRPS.23"
, "SRPS.24")

ssesQuestions <- c("SSES.1"
, "SSES.2"
, "SSES.3"
, "SSES.4"
, "SSES.5"
, "SSES.6"
, "SSES.7"
, "SSES.8"
, "SSES.9"
, "SSES.10")

spiteQuestions <- c("Spite.1"
, "Spite.2"
, "Spite.3"
, "Spite.4"
, "Spite.5"
, "Spite.6"
, "Spite.7"
, "Spite.8"
, "Spite.9"
, "Spite.10"
, "Spite.11"
, "Spite.12"
, "Spite.13"
, "Spite.14"
, "Spite.15"
, "Spite.16")

Vign.Sex <- c("Vign.1", "Vign.2", "Vign.4", "Vign.7", "Vign.10")
Vign.noSex <- c("Vign.3", "Vign.5", "Vign.6", "Vign.8", "Vign.9")
Vign.Overall <- c("Vign.1", "Vign.2", "Vign.4", "Vign.7", "Vign.10", "Vign.3", "Vign.5", "Vign.6", "Vign.8", "Vign.9")

Real.Sex <- c("Real.1", "Real.2", "Real.4", "Real.7", "Real.10")
Real.noSex <- c("Real.3", "Real.5", "Real.6", "Real.8", "Real.9")
Real.Overall <- c("Real.1", "Real.2", "Real.4", "Real.7", "Real.10", "Real.3", "Real.5", "Real.6", "Real.8", "Real.9")

doplQuestions <- c('DoPL_1', 'DoPL_6', 'DoPL_11', 'DoPL_13', 'DoPL_14', 'DoPL_16', 'DoPL_5', 'DoPL_7', 'DoPL_8', 'DoPL_12', 'DoPL_17', 'DoPL_18', 'DoPL_2', 'DoPL_3', 'DoPL_4', 'DoPL_9', 'DoPL_10', 'DoPL_15')

dominanceQuestions <- c('DoPL_2','DoPL_3','DoPL_4','DoPL_9','DoPL_10','DoPL_15')
prestigeQuestions <- c('DoPL_5','DoPL_7','DoPL_8','DoPL_12','DoPL_17','DoPL_18')
leadershipQuestions <- c('DoPL_1','DoPL_6','DoPL_11','DoPL_13','DoPL_14','DoPL_16')

UMSQuestions <- c('UMS_1', 'UMS_2', 'UMS_3', 'UMS_4','UMS_5','UMS_6','UMS_7','UMS_8','UMS_9','UMS_11', 'UMS_12')
UMSIntimacyQuestions <- c('UMS_11', 'UMS_12')
UMSAffiliationQuestions <- c('UMS_1', 'UMS_2', 'UMS_3', 'UMS_4','UMS_5','UMS_6','UMS_7','UMS_8','UMS_9')

savedQuestionsBefore <- c('subjectID', "Age", "Duration..in.seconds.", "Gender", "Ethnicity", "Eth.ori", "Edu",
                     "DoPLSum"
,"dominanceSum"
,"prestigeSum"
,"leadershipSum"
,"UMSSum"
,"UMSIntimacySum"
,"UMSAffiliationSum"
,"sjsSum"
,"ssesSum"
, "Spite"
,"Vign.Sex"
,"Vign.noSex"
,"Vign.Ovr.Score"
,"Real.Sex"
,"Real.noSex"
,"Real.Ovr.Score"
,"srps.rc.rescale"
,"srps.dm.rescale"
,"srps.sum.rescale",
"Power",
"Vign.1",
"Vign.2",
"Vign.3",
"Vign.4",
"Vign.5",
"Vign.6",
"Vign.7",
"Vign.8",
"Vign.9",
"Vign.10",
"Real.1",
"Real.2",
"Real.3",
"Real.4",
"Real.5",
"Real.6",
"Real.7",
"Real.8",
"Real.9",
"Real.10")

savedQuestionsAfter <- c('subjectID', "Age", "Duration..in.seconds.", "Gender", "Ethnicity", "Eth.ori", "Edu",
                     "DoPLSum"
,"dominanceSum"
,"prestigeSum"
,"leadershipSum"
,"UMSSum"
,"UMSIntimacySum"
,"UMSAffiliationSum"
,"sjsSum"
,"ssesSum"
, "Spite"
,"Vign.Sex"
,"Vign.noSex"
,"Vign.Ovr.Score"
,"Real.Sex"
,"Real.noSex"
,"Real.Ovr.Score"
,"srps.rc.rescale"
,"srps.dm.rescale"
,"srps.sum.rescale"
,"Content",
"Vignette",
"Justification",
"Realism",
"Power")

0.2 Recoding variables

experiment_two_DS <- experiment_two_DS %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Gender")), ~as.numeric(recode(.,"Male" = 0, "Female" = 1))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Edu")), ~as.numeric(recode(., "Prefer not to answer" = 0, "Primary School" = 1, "GCSes or Equivalent" = 2, "A-Levels or Equivalent" = 3, "University Undergraduate Program" = 4, "University Post-Graduate Program" = 5, "Doctoral Degree" = 6))) %>%
   mutate_at(vars(locfunc(experiment_two_DS, 'Ethnicity')), ~as.numeric(recode(., "Prefer not to answer" = 0, "White" = 1, "Mixed or Multiple ethnic origins" = 2, "Asian or Asian Scottish or Asian British" = 3, "African" = 4, "Caribbean or Black" = 5,"Arab" = 6, "Other ethnic group" = 7))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, 'Eth.ori')), ~as.numeric(recode(., "Prefer not to answer" = 0, "Scottish" = 1, "English" = 2, "European" = 3, "Latin American" = 4, "Asian" = 5, "Arab" = 6, 
                             "African" = 7, "Other" = 8 ))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "DoPL_1"):locfunc(experiment_two_DS, "DoPL_5")), ~as.numeric(recode(., "Strongly disagree" = 0, "Disagree" = 1, "Somewhat disagree" = 2, "Somewhat agree" = 3, "Agree" = 4, "Strongly agree" = 5)))  %>%
  mutate_at(vars(locfunc(experiment_two_DS, "DoPL_6"), locfunc(experiment_two_DS, "DoPL_14")), ~as.numeric(recode(., "Strongly disagree" = 5, "Disagree" = 4, "Somewhat disagree" = 3, "Somewhat agree" = 2, "Agree" = 1, "Strongly agree" = 0))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "DoPL_7"):locfunc(experiment_two_DS, "DoPL_13")), ~as.numeric(recode(., "Strongly disagree" = 0, "Disagree" = 1, "Somewhat disagree" = 2, "Somewhat agree" = 3, "Agree" = 4, "Strongly agree" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "DoPL_15"):locfunc(experiment_two_DS, "DoPL_16")), ~as.numeric(recode(., "Strongly disagree" = 0, "Disagree" = 1, "Somewhat disagree" = 2, "Somewhat agree" = 3, "Agree" = 4, "Strongly agree" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "UMS_1"):locfunc(experiment_two_DS, "UMS_9")), ~as.numeric(recode(., "Strongly disagree" = 0, "Disagree" = 1, "Somewhat disagree" = 2, "Somewhat agree" = 3, "Agree" = 4, "Strongly agree" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "DoPL_17"):locfunc(experiment_two_DS, "DoPL_18")), ~as.numeric(recode(., "Not Important To Me" = 0, "Of Little Importance To me" = 1, "Of Some Importance To Me" = 2, "Important To Me" = 3, "Very Important To me" = 4, "Extremely Important To Me" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "UMS_10"):locfunc(experiment_two_DS, "UMS_12")), ~as.numeric(recode(., "Not Important To Me" = 1, "Of Little Importance To me" = 2, "Of Some Importance To Me" = 3, "Important To Me" = 4, "Very Important To me" = 5, "Extremely Important To Me" = 6))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Spite.1"):locfunc(experiment_two_DS, "Spite.13")), ~as.numeric(recode(., "Strongly disagree" = 1, "Disagree" = 2, "Neither agree nor disagree" = 3, "Agree" = 4, "Strongly agree" = 5, "Strongly Disagree" = 1, "Somewhat disagree" = 2))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Spite.14"):locfunc(experiment_two_DS, "Spite.16")), ~as.numeric(recode(., "Strongly disagree" = 5, "Disagree" = 4, "Neither agree nor disagree" = 3, "Agree" = 2, "Strongly agree" = 1, "Strongly Disagree" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SSES.1"):locfunc(experiment_two_DS, "SSES.3")), ~as.numeric(recode(., "Agree" = 1, "Slightly agree" = 2, "Neither agree nor disagree" = 3, "Slightly Disagree" = 4, "Disagree" = 5, "Slight Disagree" = 4, "Slight disagree" = 4, "Slightly disagree" = 4))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SSES.4"):locfunc(experiment_two_DS, "SSES.5")), ~as.numeric(recode(., "Agree" = 5, "Slightly agree" = 4, "Neither agree nor disagree" = 3, "Slightly Disagree" = 2, "Disagree" = 1, "Slight Disagree" = 2, "Slight disagree" = 2, "Slightly disagree" = 2))) %>%
   mutate_at(vars(locfunc(experiment_two_DS, "SSES.6")), ~as.numeric(recode(., "Agree" = 1, "Slightly agree" = 2, "Neither agree nor disagree" = 3, "Slightly Disagree" = 4, "Disagree" = 5, "Slight Disagree" = 4, "Slight disagree" = 4, "Slightly disagree" = 4))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SSES.7")), ~as.numeric(recode(., "Agree" = 5, "Slightly agree" = 4, "Neither agree nor disagree" = 3, "Slightly Disagree" = 2, "Disagree" = 1, "Slight Disagree" = 2, "Slight disagree" = 2, "Slightly disagree" = 2))) %>%
mutate_at(vars(locfunc(experiment_two_DS, "SSES.8")), ~as.numeric(recode(., "Agree" = 1, "Slightly agree" = 2, "Neither agree nor disagree" = 3, "Slightly Disagree" = 4, "Disagree" = 5, "Slight Disagree" = 4, "Slight disagree" = 4, "Slightly disagree" = 4))) %>%
mutate_at(vars(locfunc(experiment_two_DS, "SSES.9"):locfunc(experiment_two_DS, "SSES.10")), ~as.numeric(recode(., "Agree" = 5, "Slightly agree" = 4, "Neither agree nor disagree" = 3, "Slightly Disagree" = 2, "Disagree" = 1, "Slight Disagree" = 2, "Slight disagree" = 2,  "Slightly disagree" = 2))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SRPS.1"):locfunc(experiment_two_DS, "SRPS.15")), ~as.numeric(recode(., "Strongly agree" = 1, "Agree" = 2, "Disagree" = 3, "Strongly disagree" = 4))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SRPS.17"):locfunc(experiment_two_DS, "SRPS.24")), ~as.numeric(recode(., "Your Partner" = 1, "Both of You Equally" = 2, "You" = 3))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "SJS.1"):locfunc(experiment_two_DS, "SJS.3")), ~as.numeric(recode(., "Strongly disagree" = 1, "Disagree" = 2, "Somewhat disagree" = 3, "Somewhat agree" = 4, "Agree" = 5, "Strongly agree" = 6))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Real.1"):locfunc(experiment_two_DS, "Real.10")), ~as.numeric(recode(., "Strongly agree" = 1, "Agree" = 2, "Neither agree nor disagree" = 3, "Disagree" = 4, "Strongly disagree" = 5))) %>%
  mutate_at(vars(locfunc(experiment_two_DS, "Vign.1"):locfunc(experiment_two_DS, "Vign.10")), ~as.numeric(recode(., "Not justified at all" = 1, "Somewhat unjustified" = 2, "Neither justified or unjustified" = 3, "Slightly justified" = 4, "Very justified" = 5)))

0.3 Summing data

# DOPL----
experiment_two_DS$DoPLSum  <- rowSums(experiment_two_DS[, doplQuestions])
experiment_two_DS$dominanceSum <-
  rowSums(experiment_two_DS[, dominanceQuestions])
experiment_two_DS$prestigeSum <-
  rowSums(experiment_two_DS[, prestigeQuestions])
experiment_two_DS$leadershipSum <-
  rowSums(experiment_two_DS[, leadershipQuestions])

# UMS----
experiment_two_DS$UMSSum  <- rowSums(experiment_two_DS[, UMSQuestions])
experiment_two_DS$UMSIntimacySum  <- rowSums(experiment_two_DS[, UMSIntimacyQuestions])
experiment_two_DS$UMSAffiliationSum  <- rowSums(experiment_two_DS[, UMSAffiliationQuestions])

# Spite ----

experiment_two_DS$Spite  <- rowSums(experiment_two_DS[, spiteQuestions])

# SJS----
experiment_two_DS$sjsSum <- rowSums(experiment_two_DS[, sjsQuestions])

# SSES----
experiment_two_DS$ssesSum <- rowSums(experiment_two_DS[, ssesQuestions])

# Vign----
experiment_two_DS$Vign.Sex <- rowSums(experiment_two_DS[, Vign.Sex])
experiment_two_DS$Vign.noSex <- rowSums(experiment_two_DS[, Vign.noSex])
experiment_two_DS$Vign.Ovr.Score <- rowSums(experiment_two_DS[, Vign.Overall])

# Realism----
experiment_two_DS$Real.Sex <- rowSums(experiment_two_DS[, Real.Sex])
experiment_two_DS$Real.noSex <- rowSums(experiment_two_DS[, Real.noSex])
experiment_two_DS$Real.Ovr.Score <- rowSums(experiment_two_DS[, Real.Overall])

# SRPS----
experiment_two_DS$srps.rc.sum <- rowSums(experiment_two_DS[, srps.rcQuestions])
experiment_two_DS$srps.dm.sum <- rowSums(experiment_two_DS[, srps.dmQuestions])

# SRPS Rescaled----
experiment_two_DS$srps.rc.rescale <- ((experiment_two_DS$srps.rc.sum - 15)/(60 - 15)) * 3 + 1
experiment_two_DS$srps.dm.rescale <- ((experiment_two_DS$srps.dm.sum - 8)/(24 - 8)) * 3 + 1
experiment_two_DS$srps.sum <- ((experiment_two_DS$srps.dm.sum + experiment_two_DS$srps.rc.sum)/2)
experiment_two_DS$srps.sum.rescale <- ((experiment_two_DS$srps.sum - 11.5) / (42 - 11.5)) * 3 + 1

experiment_two_DS <- experiment_two_DS %>% mutate(Power = case_when(
  experiment_two_DS$srps.sum.rescale < 2.420 ~ "Low",
  experiment_two_DS$srps.sum.rescale > 2.420 & experiment_two_DS$srps.sum.rescale < 2.820   ~ "Medium",
  experiment_two_DS$srps.sum.rescale > 2.820 ~ "High"
))

0.4 Renaming

experiment_two_DS <- rowid_to_column(experiment_two_DS, "subjectID")

newDF <- experiment_two_DS[savedQuestionsBefore]

analysisDF <- newDF %>%
  pivot_longer("Vign.1":"Vign.10", names_to = "Vignette", values_to = "Justification")
  
tester1 <- newDF %>%
  pivot_longer("Real.1":"Real.10", names_to = "Real", values_to = "Realism")

analysisDF['Realism'] = tester1["Realism"]



analysisDF <- analysisDF %>% mutate(Content = case_when(
 analysisDF$Vignette == "Vign.1" ~ "Sexual",
analysisDF$Vignette == "Vign.2" ~  "Sexual",
analysisDF$Vignette == "Vign.3" ~ "Nonsexual",
analysisDF$Vignette == "Vign.4" ~  "Sexual",
analysisDF$Vignette == "Vign.5" ~  "Nonsexual",
analysisDF$Vignette == "Vign.6" ~ "Nonsexual",
analysisDF$Vignette == "Vign.7" ~ "Sexual",
analysisDF$Vignette == "Vign.8" ~ "Nonsexual",
analysisDF$Vignette == "Vign.9" ~ "Nonsexual",
analysisDF$Vignette == "Vign.10" ~ "Sexual"
))

analysisDF <- analysisDF %>% mutate(Vignette = case_when(
 analysisDF$Vignette == "Vign.1" ~  1,
analysisDF$Vignette == "Vign.2" ~  2,
analysisDF$Vignette == "Vign.3" ~  3,
analysisDF$Vignette == "Vign.4" ~  4,
analysisDF$Vignette == "Vign.5" ~  5,
analysisDF$Vignette == "Vign.6" ~  6,
analysisDF$Vignette == "Vign.7" ~  7,
analysisDF$Vignette == "Vign.8" ~  8,
analysisDF$Vignette == "Vign.9" ~  9,
analysisDF$Vignette == "Vign.10" ~ 10
))

analysisDF <- analysisDF[, savedQuestionsAfter]

analysisDF <- analysisDF %>%
rename("subjectID" = "subjectID") %>%
rename("Duration" = "Duration..in.seconds.") %>%
rename("Age" = "Age") %>%
rename("Gender" = "Gender") %>%
rename("Ethnicity" = "Ethnicity") %>%
rename("Ethnic_Origin" = "Eth.ori") %>%
rename("Education" = "Edu") %>%
rename("DoPL" = "DoPLSum") %>%
rename("Dominance" = "dominanceSum") %>%
rename("Prestige" = "prestigeSum") %>%
rename("Leadership" = "leadershipSum") %>%
rename("UMS" = "UMSSum") %>%
rename("UMS_Intimacy" = "UMSIntimacySum") %>%
rename("UMS_Affiliation" = "UMSAffiliationSum") %>%
rename("SJS" = "sjsSum") %>%
rename("SSES" = "ssesSum") %>%
rename("Vign.Sex" = "Vign.Sex") %>%
rename("Vign.noSex" = "Vign.noSex") %>%
rename("Vign.Ovr.Score" = "Vign.Ovr.Score") %>%
rename("Realism_Sex" = "Real.Sex") %>%
rename("Realism_NoSex" = "Real.noSex") %>%
rename("Realism_Overall" = "Real.Ovr.Score") %>%
rename("SRPS_RC" = "srps.rc.rescale") %>%
rename("SRPS_DM" = "srps.dm.rescale") %>%
rename("SRPS" = "srps.sum.rescale") %>%
rename("Vignette" = "Vignette") %>%
rename("Justification" = "Justification") %>%
rename("Realism" = "Realism") %>%
rename("Content" = "Content")

0.5 Fixing class

analysisDF$Vignette <- factor(analysisDF$Vignette)
analysisDF$subjectID <- factor(analysisDF$subjectID)
analysisDF$Spite_z <- scale(analysisDF$Spite)
analysisDF$SSES_z <- scale(analysisDF$SSES)
analysisDF$SRPS_z <- scale(analysisDF$SRPS)
analysisDF$SJS_z <- scale(analysisDF$SJS)
analysisDF$Justification_z <- scale(analysisDF$Justification)
analysisDF$Realism_z <- scale(analysisDF$Realism)
analysisDF$DoPL_z <- scale(analysisDF$DoPL)
analysisDF$Dominance_z <- scale(analysisDF$Dominance)
analysisDF$Leadership_z <- scale(analysisDF$Leadership)
analysisDF$Prestige_z <- scale(analysisDF$Prestige)
analysisDF$UMS_z <- scale(analysisDF$UMS)
analysisDF$UMS_Intimacy_z <- scale(analysisDF$UMS_Intimacy)
analysisDF$UMS_Affiliation_z <- scale(analysisDF$UMS_Affiliation)

0.6 Basic gglots

ggplot(analysisDF, aes(x = DoPL, y = Justification, color = Content)) + geom_point() + geom_smooth(method = "lm")

ggplot(analysisDF, aes(x = Dominance, y = Justification, color = Content)) + geom_point() + geom_smooth(method = "lm")

ggplot(analysisDF, aes(x = Leadership, y = Justification, color = Content)) + geom_point() + geom_smooth(method = "lm")

ggplot(analysisDF, aes(x = Prestige, y = Justification, color = Content)) + geom_point() + geom_smooth(method = "lm")

1 Initial Bayesian Analysis

m0 <- brm(Justification_z ~ 1 + (1|Vignette) + (1|subjectID), data = analysisDF, 
         warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 4, save_all_pars = T,
          prior = c(prior(normal(0,1), class = 'Intercept')))

# models 
m1 <- brm(Justification_z ~ Spite_z * Content + (1|Vignette) + (1|subjectID), data = analysisDF, 
        warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 6, save_all_pars = T,
         prior = c(prior(normal(0,1), class = 'Intercept'),
                   prior(normal(0,1), class = 'b'),
                   prior(normal(0.151, 0.0723), class = b, coef = "Spite_z:ContentSexual")))
summary(m1) 

m2 <- brm(Justification ~ Spite_z * Content + Realism_z + (1|Vignette) + (1|subjectID), data = analysisDF, 
        warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 4, save_all_pars = T,
         prior = c(prior(normal(0,1), class = 'Intercept'),
                   prior(normal(0,1), class = 'b'),
                   prior(normal(0.151, 0.0723), class = b, coef = "Spite_z:ContentSexual")))
summary(m2)

m3 <- brm(Justification ~ Spite_z * Content + Realism_z + SSES + SRPS + SJS + (1|Vignette) + 
           (1|subjectID), data = analysisDF,warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 6, 
         save_all_pars = T,
         prior = c(prior(normal(0,1), class = 'Intercept'),
                   prior(normal(0,1), class = 'b'),
                   prior(normal(0.151, 0.0723), class = b, coef = "Spite_z:ContentSexual")))
summary(m3)

m4 <- brm(Justification ~ Spite_z * Content * Realism_z + SSES + SRPS + SJS + (1|Vignette) + 
           (1|subjectID), data = analysisDF,warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 6, 
         save_all_pars = T,
         prior = c(prior(normal(0,1), class = 'Intercept'),
                   prior(normal(0,1), class = 'b'),
                   prior(normal(0.151, 0.0723), class = b, coef = "Spite_z:ContentSexual")))

1.0.1 Bayesian Correlation

scale_corr <- brm(mvbind(SSES, SRPS, Spite, SJS, Dominance, Prestige, Leadership) ~ 1, data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6, 
                  prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)
cor_1 <- summary(scale_corr)
corr_table <- cor_1[["rescor_pars"]]
kable(corr_table, format = "html", booktabs = T, escape = F, longtabe = F, digits = 2, col.names = c('Estimate',    'Est.Error',    'l-95% CI', 'u-95% CI', 'Rhat', 'Bulk_ESS', 'Tail_ESS')) %>%
  kable_styling(full_width = F)  %>%
  remove_column(6:8)
Estimate Est.Error l-95% CI u-95% CI
rescor(SSES,SRPS) -0.41 0.03 -0.47 -0.36
rescor(SSES,Spite) 0.19 0.04 0.12 0.26
rescor(SRPS,Spite) -0.20 0.04 -0.27 -0.13
rescor(SSES,SJS) 0.26 0.03 0.20 0.33
rescor(SRPS,SJS) -0.28 0.03 -0.34 -0.22
rescor(Spite,SJS) 0.24 0.04 0.17 0.31
rescor(SSES,Dominance) -0.11 0.04 -0.18 -0.04
rescor(SRPS,Dominance) 0.03 0.03 -0.04 0.10
rescor(Spite,Dominance) 0.55 0.03 0.50 0.60
rescor(SJS,Dominance) 0.29 0.03 0.22 0.35
rescor(SSES,Prestige) -0.01 0.04 -0.08 0.06
rescor(SRPS,Prestige) 0.24 0.03 0.18 0.31
rescor(Spite,Prestige) 0.13 0.04 0.06 0.20
rescor(SJS,Prestige) 0.02 0.03 -0.05 0.09
rescor(Dominance,Prestige) 0.22 0.03 0.16 0.29
rescor(SSES,Leadership) -0.25 0.03 -0.32 -0.19
rescor(SRPS,Leadership) 0.29 0.03 0.22 0.35
rescor(Spite,Leadership) 0.01 0.04 -0.06 0.08
rescor(SJS,Leadership) -0.07 0.03 -0.13 0.00
rescor(Dominance,Leadership) 0.31 0.03 0.25 0.37
rescor(Prestige,Leadership) 0.38 0.03 0.32 0.43

1.0.2 DoPL motives predicting risky behavior (by content) in addition to spitefulness

dm0 <- brm(Justification ~ 1 + (1|Vignette) + (1|subjectID), data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)

summary(dm0)

dm1 <- brm(Justification ~ Dominance_z * Gender + Prestige_z * Gender + Leadership_z * Gender + (1|Vignette) + (1|subjectID), data = analysisDF, iter = 8000,control = list(adapt_delta = 0.99), warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept"),
                      prior(normal(3, 1), class = "b", coef = "Dominance_z:Gender"),
                      prior(normal(0, 1), class = "b", coef = "Gender:Leadership_z"), 
                      prior(normal(0, 1), class = "b", coef = "Gender:Prestige_z"),
                      prior(normal(0, 1), class = "b", coef = "Dominance_z"),
                      prior(normal(0, 1), class = "b", coef = "Leadership_z"),
                      prior(normal(0, 1), class = "b", coef = "Prestige_z")), save_all_pars = T)

summary(dm1)

dm3 <- brm(Justification ~ Dominance_z * Gender + Prestige_z * Gender + Leadership_z * Gender + Age + (1|Vignette) + (1|subjectID), data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)

summary(dm3)

dm2 <- brm(Justification ~ Dominance_z * Gender + Prestige_z * Gender + Leadership_z * Gender + SJS_z + SRPS_z + SSES_z + Spite_z +  (1|Vignette) + (1|subjectID), control = list(adapt_delta = 0.99), data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept"),
                      prior(normal(3, 1), class = "b", coef = "Dominance_z:Gender"),
                      prior(normal(0, 1), class = "b", coef = "Gender:Leadership_z"), 
                      prior(normal(0, 1), class = "b", coef = "Gender:Prestige_z"),
                      prior(normal(0, 1), class = "b", coef = "Dominance_z"),
                      prior(normal(0, 1), class = "b", coef = "Leadership_z"),
                      prior(normal(0, 1), class = "b", coef = "Prestige_z")), save_all_pars = T)

summary(dm2)

dm4 <- brm(Justification ~ Dominance_z * Gender * Content + Prestige_z * Gender * Content + Leadership_z * Gender * Content + SJS_z + SRPS_z + SSES_z + Spite_z +  (1|Vignette) + (1|subjectID), control = list(adapt_delta = 0.99), data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept"),
                      prior(normal(3, 1), class = "b", coef = "Dominance_z:Gender"),
                      prior(normal(0, 1), class = "b", coef = "Gender:Leadership_z"), 
                      prior(normal(0, 1), class = "b", coef = "Gender:Prestige_z"),
                      prior(normal(0, 1), class = "b", coef = "Dominance_z"),
                      prior(normal(0, 1), class = "b", coef = "Leadership_z"),
                      prior(normal(0, 1), class = "b", coef = "Prestige_z")), save_all_pars = T)

summary(dm4)

dm4_hdi <- bayestestR::hdi(dm4, effects = "fixed", component = "conditional", ci = .95)
dm4_hdi[sign(dm4_hdi$CI_low) == sign(dm4_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')]

dm5 <- brm(Justification ~ Dominance_z * Realism_z * Content + Prestige_z * Realism_z * Content + Leadership_z * Realism_z * Content + SJS_z + SRPS_z + SSES_z + Spite_z +  (1|Vignette) + (1|subjectID), control = list(adapt_delta = 0.99), data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6
           ,prior = c(prior(normal(0, 1), class = "Intercept"),
                      prior(normal(0, 1), class = "b", coef = "Dominance_z"),
                      prior(normal(0, 1), class = "b", coef = "Leadership_z"),
                      prior(normal(0, 1), class = "b", coef = "Prestige_z")), save_all_pars = T)

summary(dm5)

loo(dm1, dm2, dm4, dm5)

1.0.3 DoPL motives predicting risky behavior (by content) in addition to spitefulness HDI

dm5_hdi <- bayestestR::hdi(dm5, effects = "fixed", component = "conditional", ci = .95)
kable(dm5_hdi[sign(dm5_hdi$CI_low) == sign(dm5_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')], format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
8 b_Intercept 0.95 0.74 3.27
18 b_Spite_z 0.95 0.06 0.24
5 b_Dominance_z.ContentSexual 0.95 0.01 0.28

1.0.4 Bayesian analysis m4

summary(m4)
## Warning: There were 2 divergent transitions after warmup. Increasing adapt_delta
## above may help. See http://mc-stan.org/misc/warnings.html#divergent-transitions-
## after-warmup
##  Family: gaussian 
##   Links: mu = identity; sigma = identity 
## Formula: Justification ~ Spite_z * Content * Realism_z + SSES + SRPS + SJS + (1 | Vignette) + (1 | subjectID) 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 1000; thin = 1;
##          total post-warmup samples = 28000
## 
## Group-Level Effects: 
## ~subjectID (Number of levels: 92) 
##               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)     0.18      0.06     0.04     0.30 1.00     5343     3628
## 
## ~Vignette (Number of levels: 10) 
##               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)     1.33      0.40     0.79     2.33 1.00     7556    10705
## 
## Population-Level Effects: 
##                                 Estimate Est.Error l-95% CI u-95% CI Rhat
## Intercept                           1.71      0.71     0.25     3.05 1.00
## Spite_z                             0.12      0.05     0.03     0.21 1.00
## ContentSexual                      -0.10      0.63    -1.36     1.15 1.00
## Realism_z                          -0.10      0.06    -0.21     0.01 1.00
## SSES                               -0.00      0.00    -0.01     0.01 1.00
## SRPS                                0.08      0.12    -0.16     0.32 1.00
## SJS                                 0.02      0.02    -0.02     0.05 1.00
## Spite_z:ContentSexual               0.07      0.05    -0.02     0.17 1.00
## Spite_z:Realism_z                  -0.11      0.05    -0.21    -0.02 1.00
## ContentSexual:Realism_z            -0.02      0.07    -0.16     0.13 1.00
## Spite_z:ContentSexual:Realism_z     0.06      0.06    -0.06     0.19 1.00
##                                 Bulk_ESS Tail_ESS
## Intercept                          10635    14416
## Spite_z                            27293    23384
## ContentSexual                       9986    14758
## Realism_z                          24794    22641
## SSES                               34317    23121
## SRPS                               30251    23206
## SJS                                32126    22822
## Spite_z:ContentSexual              35115    23079
## Spite_z:Realism_z                  24685    22889
## ContentSexual:Realism_z            25942    23012
## Spite_z:ContentSexual:Realism_z    26408    22494
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma     0.99      0.02     0.95     1.04 1.00    25851    19058
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
m4_hdi <- bayestestR::hdi(m4, effects = "fixed", component = "conditional", ci = .95)
kable(m4_hdi[sign(m4_hdi$CI_low) == sign(m4_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
3 b_Intercept 0.95 0.26 3.07
6 b_Spite_z 0.95 0.03 0.21
9 b_Spite_z.Realism_z 0.95 -0.21 -0.02
m5 <- brm(Justification ~ Dominance_z + Leadership_z + Prestige_z + (1|Vignette) + (1|subjectID), data = analysisDF,warmup = 500, control = list(adapt_delta = 0.95)), iter = 8000, chains = 4, cores = 6, prior = c(prior(normal(0,1), class = 'Intercept'),
                   prior(normal(0,1), class = 'b')))
summary(m5)

m5_gen <- brm(Justification_z ~ Dominance_z*Gender + Leadership_z*Gender + Prestige_z*Gender + (1|Vignette) + (1|subjectID), data = analysisDF, warmup = 500, control = list(adapt_delta = 0.95), iter = 8000, chains = 4, cores = 6, 
  prior = c(prior(normal(0,1), class = 'Intercept'), 
                   prior(normal(3, 1), class = 'b', coef = "Dominance_z:Gender"),
                   prior(normal(0, 1), class = 'b', coef = "Gender:Leadership_z"),
                   prior(normal(0, 1), class = 'b', coef = "Gender:Prestige_z")),
                   save_all_pars = T)
summary(m5_gen)

1.0.5 DoPL and Justification

summary(m5_gen)
##  Family: gaussian 
##   Links: mu = identity; sigma = identity 
## Formula: Justification_z ~ Dominance_z * Gender + Leadership_z * Gender + Prestige_z * Gender + (1 | Vignette) + (1 | Vignette) 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 1000; thin = 1;
##          total post-warmup samples = 28000
## 
## Group-Level Effects: 
## ~Vignette (Number of levels: 10) 
##               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)     0.86      0.24     0.53     1.44 1.00     6759    11597
## 
## Population-Level Effects: 
##                     Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept               0.01      0.27    -0.53     0.55 1.00     5588     8686
## Dominance_z             0.08      0.03     0.03     0.14 1.00    27825    21036
## Gender                 -0.03      0.05    -0.13     0.07 1.00    35643    18845
## Leadership_z           -0.00      0.03    -0.07     0.06 1.00    22254    20736
## Prestige_z              0.04      0.03    -0.02     0.10 1.00    22906    22421
## Dominance_z:Gender      0.01      0.06    -0.10     0.13 1.00    27002    20763
## Gender:Leadership_z    -0.08      0.05    -0.19     0.02 1.00    22612    20831
## Gender:Prestige_z      -0.01      0.05    -0.12     0.10 1.00    24251    20699
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma     0.70      0.02     0.67     0.74 1.00    33649    19043
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
m5_gen_hdi <- bayestestR::hdi(m5_gen, effects = "fixed", component = "conditional", ci = .95)
kable(m5_gen_hdi[sign(m5_gen_hdi$CI_low) == sign(m5_gen_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
b_Dominance_z 0.95 0.03 0.14

1.0.6 Spite and DoPL

m7 <- brm(Spite_z ~ Dominance_z*Gender + Leadership_z*Gender + Prestige_z*Gender, data = analysisDF, warmup = 500, iter = 8000, chains = 4, cores = 6,
          prior = c(prior(normal(0, 1), class = "Intercept"),
                   prior(normal(3, 1), class = "b", coef = "Dominance_z:Gender"),
                   prior(normal(0, 1), class = 'b', coef = "Gender:Leadership_z"),
                   prior(normal(0, 1), class = 'b', coef = "Gender:Prestige_z")),
                   save_all_pars = T)
m7_hdi <- bayestestR::hdi(m7, effects = "fixed", component = "conditional", ci = .95)
## Warning: Identical densities found along different segments of the distribution,
## choosing rightmost.
kable(m7_hdi[sign(m7_hdi$CI_low) == sign(m7_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
6 b_Intercept 0.95 0.03 0.16
1 b_Dominance_z 0.95 0.45 0.58
3 b_Gender 0.95 -0.40 -0.17
7 b_Leadership_z 0.95 -0.20 -0.04
2 b_Dominance_z.Gender 0.95 0.10 0.37
4 b_Gender.Leadership_z 0.95 -0.34 -0.09
summary(m7)
##  Family: gaussian 
##   Links: mu = identity; sigma = identity 
## Formula: Spite_z ~ Dominance_z * Gender + Leadership_z * Gender + Prestige_z * Gender 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 500; thin = 1;
##          total post-warmup samples = 30000
## 
## Population-Level Effects: 
##                     Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept               0.10      0.03     0.03     0.16 1.00    40628    23120
## Dominance_z             0.51      0.03     0.45     0.58 1.00    28732    23403
## Gender                 -0.28      0.06    -0.40    -0.17 1.00    35017    23530
## Leadership_z           -0.12      0.04    -0.20    -0.04 1.00    21084    23402
## Prestige_z              0.03      0.04    -0.04     0.10 1.00    21678    24050
## Dominance_z:Gender      0.23      0.07     0.10     0.37 1.00    28824    24379
## Gender:Leadership_z    -0.22      0.06    -0.35    -0.09 1.00    20611    21689
## Gender:Prestige_z       0.01      0.06    -0.12     0.14 1.00    24132    24383
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma     0.83      0.02     0.79     0.87 1.00    42739    22720
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).

1.0.7 DoPL and Measures

m8 <- brm(mvbind(Dominance, Prestige, Leadership) ~ Spite_z + SSES + SRPS + SJS, data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6, 
          prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)
summary(m8)
##  Family: MV(gaussian, gaussian, gaussian) 
##   Links: mu = identity; sigma = identity
##          mu = identity; sigma = identity
##          mu = identity; sigma = identity 
## Formula: Dominance ~ Spite_z + SSES + SRPS + SJS 
##          Prestige ~ Spite_z + SSES + SRPS + SJS 
##          Leadership ~ Spite_z + SSES + SRPS + SJS 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 500; thin = 1;
##          total post-warmup samples = 30000
## 
## Population-Level Effects: 
##                      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Dominance_Intercept      6.50      1.80     2.96    10.02 1.00    25865
## Prestige_Intercept       3.99      1.73     0.61     7.39 1.00    28795
## Leadership_Intercept     5.60      2.07     1.57     9.67 1.00    25311
## Dominance_Spite_z        2.82      0.16     2.51     3.13 1.00    34724
## Dominance_SSES          -0.15      0.02    -0.19    -0.12 1.00    31340
## Dominance_SRPS           1.89      0.48     0.94     2.84 1.00    27582
## Dominance_SJS            0.59      0.07     0.46     0.72 1.00    34688
## Prestige_Spite_z         0.48      0.15     0.19     0.78 1.00    33062
## Prestige_SSES            0.02      0.02    -0.01     0.05 1.00    34530
## Prestige_SRPS            4.17      0.47     3.27     5.09 1.00    31612
## Prestige_SJS             0.08      0.06    -0.05     0.20 1.00    29195
## Leadership_Spite_z       0.13      0.18    -0.22     0.48 1.00    30382
## Leadership_SSES         -0.12      0.02    -0.16    -0.08 1.00    29064
## Leadership_SRPS          3.67      0.56     2.57     4.76 1.00    28015
## Leadership_SJS           0.05      0.08    -0.10     0.20 1.00    28129
##                      Tail_ESS
## Dominance_Intercept     22337
## Prestige_Intercept      23855
## Leadership_Intercept    23208
## Dominance_Spite_z       23523
## Dominance_SSES          24959
## Dominance_SRPS          25109
## Dominance_SJS           24874
## Prestige_Spite_z        24281
## Prestige_SSES           24176
## Prestige_SRPS           24442
## Prestige_SJS            23696
## Leadership_Spite_z      24159
## Leadership_SSES         24482
## Leadership_SRPS         23089
## Leadership_SJS          24565
## 
## Family Specific Parameters: 
##                  Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma_Dominance      4.58      0.11     4.38     4.80 1.00    36782    24459
## sigma_Prestige       4.39      0.10     4.19     4.60 1.00    33582    22374
## sigma_Leadership     5.30      0.13     5.06     5.55 1.00    34020    22710
## 
## Residual Correlations: 
##                              Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## rescor(Dominance,Prestige)       0.16      0.03     0.09     0.22 1.00    31621
## rescor(Dominance,Leadership)     0.32      0.03     0.26     0.38 1.00    31943
## rescor(Prestige,Leadership)      0.34      0.03     0.28     0.40 1.00    36103
##                              Tail_ESS
## rescor(Dominance,Prestige)      24028
## rescor(Dominance,Leadership)    23826
## rescor(Prestige,Leadership)     24334
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
m8_hdi <- bayestestR::hdi(m8, effects = "fixed", component = "conditional", ci = .95)
kable(m8_hdi[sign(m8_hdi$CI_low) == sign(m8_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
1 b_Dominance_Intercept 0.95 3.09 10.13
3 b_Dominance_Spite_z 0.95 2.51 3.12
5 b_Dominance_SSES 0.95 -0.19 -0.12
4 b_Dominance_SRPS 0.95 0.96 2.86
2 b_Dominance_SJS 0.95 0.46 0.72
11 b_Prestige_Intercept 0.95 0.66 7.43
13 b_Prestige_Spite_z 0.95 0.19 0.78
14 b_Prestige_SRPS 0.95 3.30 5.12
6 b_Leadership_Intercept 0.95 1.59 9.69
10 b_Leadership_SSES 0.95 -0.16 -0.08
9 b_Leadership_SRPS 0.95 2.56 4.75

1.0.8 DoPL and Measures * Gender

m8_gen <- brm(mvbind(Dominance, Prestige, Leadership) ~ Spite_z*Gender + SSES*Gender + SRPS*Gender + SJS*Gender, data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6, 
          prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)
m8_gen_hdi <- bayestestR::hdi(m8_gen, effects = "fixed", component = "conditional", ci = .95)
kable(m8_gen_hdi[sign(m8_gen_hdi$CI_low) == sign(m8_gen_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
5 b_Dominance_Intercept 0.95 5.04 14.19
7 b_Dominance_Spite_z 0.95 2.62 3.31
10 b_Dominance_SSES 0.95 -0.23 -0.14
6 b_Dominance_SJS 0.95 0.59 0.89
4 b_Dominance_Gender.SSES 0.95 0.02 0.17
3 b_Dominance_Gender.SRPS 0.95 0.20 4.31
2 b_Dominance_Gender.SJS 0.95 -0.95 -0.33
25 b_Prestige_Intercept 0.95 2.45 11.13
27 b_Prestige_Spite_z 0.95 0.23 0.90
29 b_Prestige_SRPS 0.95 2.37 4.69
26 b_Prestige_SJS 0.95 0.08 0.37
24 b_Prestige_Gender.SSES 0.95 0.09 0.23
22 b_Prestige_Gender.SJS 0.95 -0.83 -0.24
15 b_Leadership_Intercept 0.95 6.38 16.92
11 b_Leadership_Gender 0.95 -22.33 -4.78
20 b_Leadership_SSES 0.95 -0.23 -0.13
19 b_Leadership_SRPS 0.95 0.76 3.60
14 b_Leadership_Gender.SSES 0.95 0.06 0.22
13 b_Leadership_Gender.SRPS 0.95 0.79 5.59
summary(m8_gen)
##  Family: MV(gaussian, gaussian, gaussian) 
##   Links: mu = identity; sigma = identity
##          mu = identity; sigma = identity
##          mu = identity; sigma = identity 
## Formula: Dominance ~ Spite_z * Gender + SSES * Gender + SRPS * Gender + SJS * Gender 
##          Prestige ~ Spite_z * Gender + SSES * Gender + SRPS * Gender + SJS * Gender 
##          Leadership ~ Spite_z * Gender + SSES * Gender + SRPS * Gender + SJS * Gender 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 500; thin = 1;
##          total post-warmup samples = 30000
## 
## Population-Level Effects: 
##                           Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Dominance_Intercept           9.46      2.33     4.88    14.06 1.00    17194
## Prestige_Intercept            6.87      2.22     2.48    11.17 1.00    16489
## Leadership_Intercept         11.63      2.70     6.33    16.89 1.00    16875
## Dominance_Spite_z             2.96      0.18     2.61     3.31 1.00    28409
## Dominance_Gender             -5.12      3.88   -12.62     2.58 1.00    14702
## Dominance_SSES               -0.19      0.02    -0.23    -0.14 1.00    20652
## Dominance_SRPS                0.84      0.62    -0.38     2.06 1.00    18850
## Dominance_SJS                 0.74      0.08     0.59     0.90 1.00    25681
## Dominance_Spite_z:Gender      0.19      0.40    -0.59     0.96 1.00    28130
## Dominance_Gender:SSES         0.10      0.04     0.03     0.17 1.00    22063
## Dominance_Gender:SRPS         2.30      1.05     0.22     4.34 1.00    16176
## Dominance_Gender:SJS         -0.64      0.16    -0.95    -0.33 1.00    24226
## Prestige_Spite_z              0.57      0.17     0.23     0.91 1.00    29089
## Prestige_Gender              -5.94      3.72   -13.30     1.41 1.00    14229
## Prestige_SSES                -0.04      0.02    -0.08     0.00 1.00    21998
## Prestige_SRPS                 3.48      0.59     2.32     4.64 1.00    17920
## Prestige_SJS                  0.22      0.07     0.08     0.37 1.00    24582
## Prestige_Spite_z:Gender      -0.00      0.38    -0.75     0.75 1.00    25982
## Prestige_Gender:SSES          0.16      0.04     0.09     0.23 1.00    23564
## Prestige_Gender:SRPS          1.57      1.01    -0.43     3.57 1.00    15464
## Prestige_Gender:SJS          -0.53      0.15    -0.82    -0.22 1.00    22610
## Leadership_Spite_z            0.24      0.21    -0.16     0.65 1.00    26199
## Leadership_Gender           -13.53      4.50   -22.24    -4.67 1.00    14312
## Leadership_SSES              -0.18      0.03    -0.23    -0.13 1.00    21252
## Leadership_SRPS               2.15      0.72     0.73     3.57 1.00    18556
## Leadership_SJS                0.02      0.09    -0.15     0.20 1.00    23764
## Leadership_Spite_z:Gender    -0.67      0.46    -1.56     0.23 1.00    25240
## Leadership_Gender:SSES        0.14      0.04     0.06     0.22 1.00    21223
## Leadership_Gender:SRPS        3.16      1.23     0.75     5.55 1.00    15845
## Leadership_Gender:SJS         0.11      0.18    -0.25     0.47 1.00    21910
##                           Tail_ESS
## Dominance_Intercept          21671
## Prestige_Intercept           20383
## Leadership_Intercept         20028
## Dominance_Spite_z            23402
## Dominance_Gender             19110
## Dominance_SSES               22003
## Dominance_SRPS               22862
## Dominance_SJS                22732
## Dominance_Spite_z:Gender     23099
## Dominance_Gender:SSES        22201
## Dominance_Gender:SRPS        19830
## Dominance_Gender:SJS         23001
## Prestige_Spite_z             23554
## Prestige_Gender              17275
## Prestige_SSES                21963
## Prestige_SRPS                21164
## Prestige_SJS                 23474
## Prestige_Spite_z:Gender      22343
## Prestige_Gender:SSES         23334
## Prestige_Gender:SRPS         18747
## Prestige_Gender:SJS          21649
## Leadership_Spite_z           23323
## Leadership_Gender            17234
## Leadership_SSES              22391
## Leadership_SRPS              21811
## Leadership_SJS               23074
## Leadership_Spite_z:Gender    23991
## Leadership_Gender:SSES       22449
## Leadership_Gender:SRPS       18504
## Leadership_Gender:SJS        21897
## 
## Family Specific Parameters: 
##                  Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma_Dominance      4.51      0.11     4.31     4.72 1.00    34438    23546
## sigma_Prestige       4.33      0.10     4.13     4.53 1.00    33077    23032
## sigma_Leadership     5.25      0.13     5.01     5.51 1.00    36326    24456
## 
## Residual Correlations: 
##                              Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## rescor(Dominance,Prestige)       0.13      0.03     0.07     0.19 1.00    34418
## rescor(Dominance,Leadership)     0.32      0.03     0.26     0.37 1.00    33054
## rescor(Prestige,Leadership)      0.33      0.03     0.27     0.39 1.00    33469
##                              Tail_ESS
## rescor(Dominance,Prestige)      23737
## rescor(Dominance,Leadership)    23268
## rescor(Prestige,Leadership)     23120
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).

1.0.9 DoPL and Measures * Age

m8_Age <- brm(mvbind(Dominance, Prestige, Leadership) ~ Spite_z*Age + SSES*Age + SRPS*Age + SJS*Age, data = analysisDF, iter = 8000, warmup = 500, chains = 4, cores = 6, 
          prior = c(prior(normal(0, 1), class = "Intercept")), save_all_pars = T)
m8_Age_hdi <- bayestestR::hdi(m8_Age, effects = "fixed", component = "conditional", ci = .95)
kable(m8_Age_hdi[sign(m8_Age_hdi$CI_low) == sign(m8_Age_hdi$CI_high),
            c('Parameter', 'CI','CI_low', 'CI_high')] , format = "html", booktabs = T, escape = F, longtable = F, digits = 2) %>% kable_styling(full_width = T)
Parameter CI CI_low CI_high
5 b_Dominance_Intercept 0.95 20.07 44.23
1 b_Dominance_Age 0.95 -1.25 -0.39
10 b_Dominance_SSES 0.95 -0.38 -0.18
9 b_Dominance_SRPS 0.95 -7.54 -0.94
8 b_Dominance_Spite_z.Age 0.95 0.02 0.15
4 b_Dominance_Age.SSES 0.95 0.00 0.01
3 b_Dominance_Age.SRPS 0.95 0.07 0.30
25 b_Prestige_Intercept 0.95 -41.76 -19.34
21 b_Prestige_Age 0.95 1.01 1.81
30 b_Prestige_SSES 0.95 0.29 0.47
29 b_Prestige_SRPS 0.95 9.00 15.10
26 b_Prestige_SJS 0.95 0.29 1.21
24 b_Prestige_Age.SSES 0.95 -0.02 -0.01
23 b_Prestige_Age.SRPS 0.95 -0.44 -0.23
22 b_Prestige_Age.SJS 0.95 -0.05 -0.01
19 b_Leadership_SRPS 0.95 3.45 11.20
14 b_Leadership_Age.SSES 0.95 -0.01 0.00
13 b_Leadership_Age.SRPS 0.95 -0.27 0.00
summary(m8_Age)
##  Family: MV(gaussian, gaussian, gaussian) 
##   Links: mu = identity; sigma = identity
##          mu = identity; sigma = identity
##          mu = identity; sigma = identity 
## Formula: Dominance ~ Spite_z * Age + SSES * Age + SRPS * Age + SJS * Age 
##          Prestige ~ Spite_z * Age + SSES * Age + SRPS * Age + SJS * Age 
##          Leadership ~ Spite_z * Age + SSES * Age + SRPS * Age + SJS * Age 
##    Data: analysisDF (Number of observations: 920) 
## Samples: 4 chains, each with iter = 8000; warmup = 500; thin = 1;
##          total post-warmup samples = 30000
## 
## Population-Level Effects: 
##                        Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Dominance_Intercept       31.97      6.20    19.84    44.06 1.00    15301
## Prestige_Intercept       -30.63      5.71   -41.80   -19.37 1.00    15760
## Leadership_Intercept      -4.57      7.23   -18.71     9.61 1.00    14490
## Dominance_Spite_z          0.56      0.74    -0.91     2.00 1.00    28513
## Dominance_Age             -0.82      0.22    -1.25    -0.39 1.00    14399
## Dominance_SSES            -0.28      0.05    -0.38    -0.18 1.00    36329
## Dominance_SRPS            -4.11      1.69    -7.44    -0.82 1.00    16074
## Dominance_SJS              0.34      0.26    -0.16     0.84 1.00    17489
## Dominance_Spite_z:Age      0.09      0.03     0.03     0.15 1.00    27632
## Dominance_Age:SSES         0.00      0.00     0.00     0.01 1.00    34730
## Dominance_Age:SRPS         0.18      0.06     0.07     0.29 1.00    14929
## Dominance_Age:SJS          0.01      0.01    -0.01     0.03 1.00    16613
## Prestige_Spite_z          -0.98      0.68    -2.31     0.34 1.00    25959
## Prestige_Age               1.42      0.20     1.02     1.82 1.00    15079
## Prestige_SSES              0.38      0.05     0.28     0.46 1.00    34674
## Prestige_SRPS             12.15      1.56     9.09    15.20 1.00    16519
## Prestige_SJS               0.75      0.24     0.29     1.21 1.00    19303
## Prestige_Spite_z:Age       0.06      0.03     0.00     0.11 1.00    25342
## Prestige_Age:SSES         -0.01      0.00    -0.02    -0.01 1.00    33898
## Prestige_Age:SRPS         -0.33      0.05    -0.43    -0.23 1.00    15491
## Prestige_Age:SJS          -0.03      0.01    -0.05    -0.01 1.00    18476
## Leadership_Spite_z         1.43      0.86    -0.25     3.10 1.00    27642
## Leadership_Age             0.41      0.26    -0.10     0.91 1.00    13685
## Leadership_SSES            0.01      0.06    -0.10     0.13 1.00    34463
## Leadership_SRPS            7.17      1.97     3.31    11.07 1.00    15257
## Leadership_SJS            -0.10      0.30    -0.70     0.48 1.00    17756
## Leadership_Spite_z:Age    -0.06      0.04    -0.13     0.01 1.00    27077
## Leadership_Age:SSES       -0.01      0.00    -0.01    -0.00 1.00    33618
## Leadership_Age:SRPS       -0.13      0.07    -0.27    -0.00 1.00    14116
## Leadership_Age:SJS         0.00      0.01    -0.02     0.03 1.00    16977
##                        Tail_ESS
## Dominance_Intercept       19449
## Prestige_Intercept        19327
## Leadership_Intercept      19917
## Dominance_Spite_z         22951
## Dominance_Age             18379
## Dominance_SSES            24743
## Dominance_SRPS            20687
## Dominance_SJS             20929
## Dominance_Spite_z:Age     22658
## Dominance_Age:SSES        24299
## Dominance_Age:SRPS        19666
## Dominance_Age:SJS         20914
## Prestige_Spite_z          21626
## Prestige_Age              17977
## Prestige_SSES             24070
## Prestige_SRPS             20276
## Prestige_SJS              22312
## Prestige_Spite_z:Age      22950
## Prestige_Age:SSES         24837
## Prestige_Age:SRPS         19495
## Prestige_Age:SJS          21552
## Leadership_Spite_z        22504
## Leadership_Age            18924
## Leadership_SSES           24934
## Leadership_SRPS           20887
## Leadership_SJS            20721
## Leadership_Spite_z:Age    21978
## Leadership_Age:SSES       25409
## Leadership_Age:SRPS       18886
## Leadership_Age:SJS        20252
## 
## Family Specific Parameters: 
##                  Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma_Dominance      4.46      0.10     4.26     4.67 1.00    49917    22042
## sigma_Prestige       4.09      0.10     3.91     4.29 1.00    50277    22139
## sigma_Leadership     5.19      0.12     4.96     5.44 1.00    46032    23326
## 
## Residual Correlations: 
##                              Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## rescor(Dominance,Prestige)       0.17      0.03     0.11     0.24 1.00    48127
## rescor(Dominance,Leadership)     0.32      0.03     0.27     0.38 1.00    43176
## rescor(Prestige,Leadership)      0.32      0.03     0.26     0.37 1.00    47274
##                              Tail_ESS
## rescor(Dominance,Prestige)      23043
## rescor(Dominance,Leadership)    23593
## rescor(Prestige,Leadership)     23019
## 
## Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).

2 Justification and Content type

ggplot(analysisDF, aes(y = Justification, x = Vignette, fill = Content, group = Vignette)) +
       geom_violin() +  
  scale_shape_prism() + 
  scale_y_continuous(guide = "prism_offset") + 
  scale_x_discrete(guide = "prism_offset")

3 Demographic Information

ggplot(experiment_two_DS, aes(x = Age)) + 
  geom_histogram(stat = "count") +
scale_fill_gradient("Count", low = "#FFEDA0", high = "#800F26")  + aes(fill = ..count..) + scale_shape_prism() + scale_y_continuous(limits = c(0, 10), guide = "prism_offset") + scale_x_continuous(guide = "prism_offset")

kable(demographic_table, format = "html", bootabs = T, escape = F, longtable = T,
      col.names = c("", "Overall *n* = 92"),
      align = c("l", "c"),
      caption = "*Participant Demographic Information*") %>%
  kable_styling(full_width = F)%>%
  row_spec(row = 0, align = "c")%>%
  column_spec(column = 1, width = "1.5in" )%>%
  column_spec(column = 2, width = "1in") %>%
  pack_rows("Age",1, 2 )%>%
  pack_rows("Gender", 3, 4)%>%
  pack_rows("Ethnicity", 11, 17)%>%
  pack_rows("Ethnic Origin", 18, 22)%>%
  pack_rows("Educational Attainment", 5, 10)
Participant Demographic Information
Overall n = 92
Age
Mean (SD) 26.14 (8.69)
Median [Min, Max] 23 [18,60]
Gender
Female 30 (32.6%)
Male 62 (67.4%)
Educational Attainment
A-Levels or Equivalent 32 (34.8%)
GCSes or Equivalent 8 (8.7%)
Prefer not to answer 1 (1.1%)
Primary School 3 (3.3%)
University Post-Graduate Program 17 (18.5%)
University Undergraduate Program 31 (33.7%)
Ethnicity
Arab 1 (1.1%)
Asian 5 (5.4%)
English 10 (10.9%)
European 69 (75.0%)
Latin American 2 (2.2%)
Other 2 (2.2%)
Prefer not to answer 1 (1.1%)
Ethnic Origin
Scottish 2 (2.2%)
Asian or Asian Scottish or Asian British 5 (5.4%)
Mixed or Multiple ethnic origins 4 (4.3%)
Other ethnic group 1 (1.1%)
White 82 (89.1%)