# install packages
install.packages(c('tidyverse', 'MASS', 'dplyr', 'gtsummary'), repos = list(CRAN="http://cran.rstudio.com/"))
## Installing packages into '/Users/perso204/Library/R/x86_64/4.4/library'
## (as 'lib' is unspecified)
##
## The downloaded binary packages are in
## /var/folders/96/xz1fg2r56mb2kymyn8r37rqc0000gq/T//RtmpnysPH4/downloaded_packages
# Read in data
library(readr)
rawdata <- read_csv("~/Downloads/PDSA_rawdata.csv",
col_types = cols(Progress = col_number(), #making several variables numeric
`Duration (in seconds)` = col_number(),
Finished = col_number(), Q_RecaptchaScore = col_number(),
Q_RelevantIDDuplicate = col_number(),
Q_RelevantIDDuplicateScore = col_number(),
Q_RelevantIDFraudScore = col_number(),
`Consent ` = col_number()))
options(scipen=999) # remove scientific notation
# Cleaning data
# Finding median and sd response time
(Duration.median<- median(rawdata$`Duration (in seconds)`, na.rm=T)) # median response time is a little over 7 minutes
## [1] 422.5
(Duration.sd<- sd(rawdata$`Duration (in seconds)`, na.rm=T))# the standard deviation is a little over 9 minutes
## [1] 549.773
mean(rawdata$`Duration (in seconds)`, na.rm=T)
## [1] 539.1331
length(which(rawdata$`Consent `==0)) #0 people who did not consent
## [1] 0
length(which(rawdata$Consent_Confirm=="please delete all of my data from this study."))
## [1] 2
length(which(rawdata$Consent_Confirm=="please delete all of my data from this study")) # 5 people said to remove their data from the study after debriefing
## [1] 3
length(which(rawdata$Q_RelevantIDFraudScore>=30)) #26 people had fraud score equal to or over 30
## [1] 26
length(which(rawdata$Q_RelevantIDDuplicateScore>=75)) #0 people were likely to be duplicate users
## [1] 0
length(which(rawdata$Q_RecaptchaScore < .5)) # 7 people were likely bots
## [1] 7
rawdata$Consent <- rawdata$`Consent ` #renaming this variable
data<-rawdata # creating copy of dataset
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
data <- rawdata %>%
# Clean up column names just in case
rename_with(~ gsub("\\s+", "", .x)) %>%
filter(
Q_RelevantIDDuplicateScore < 75,
Q_RelevantIDFraudScore < 30,
Q_RecaptchaScore >= .5,
as.numeric(Consent) == 1,
!grepl("please delete all of my data from this study\\.", Consent_Confirm, ignore.case = TRUE),
!grepl("please delete all of my data from this study", Consent_Confirm, ignore.case = TRUE)
)
# 38 people removed at this stage, later I remove additional 7 who failed manipulation check
min(data$`Duration(inseconds)`) #the miniumum number of seconds that someone took to complete. We decided that minimum response time should be 92 seconds in line with guidelines of 2 min number of seconds per item, so no people will be removed for response time
## [1] 134
# One person entered their birth year instead of their age (1987) so I'm changing their age to 38
data$Age_1[data$Age_1 == 1987] <- 38
data<- data %>% #creating a condition variable
mutate(Condition = case_when(
data$'FL_100_DO_W-T'==1 ~ "WT",
data$'FL_100_DO_W-SV'==1 ~ "WSV",
data$'FL_100_DO_AA-SV'==1 ~ "AASV",
data$'FL_100_DO_AA-T'==1 ~ "AAT"
))
# coalescing likability items across conditions
data <- data %>%
mutate(
Likability_1 = coalesce(WT_Likability_1, WSV_Likability_1, AAT_Likability_1, AASV_Likability_1),
Likability_2 = coalesce(WT_Likability_2, WSV_Likability_2, AAT_Likability_2, AASV_Likability_2),
Likability_3 = coalesce(WT_Likability_3, WSV_Likability_3, AAT_Likability_3, AASV_Likability_3),
Likability_4 = coalesce(WT_Likability_4, WSV_Likability_4, AAT_Likability_4, AASV_Likability_4)
)
# coalescing warm and competent items across conditions
data <- data %>%
mutate(
Warmth = coalesce(WT_WarmCompetent_1, WSV_WarmCompetent_1, AAT_WarmCompetent_1, AASV_WarmCompetent_1),
Competent = coalesce(WT_WarmCompetent_2, WSV_WarmCompetent_2, AAT_WarmCompetent_2, AASV_WarmCompetent_2)
)
# coalescing blame items across conditions
data <- data %>%
mutate(
Blame_1 = coalesce(WT_Blame_1, WSV_Blame_1, AAT_Blame_1, AASV_Blame_1),
Blame_2 = coalesce(WT_Blame_2, WSV_Blame_2, AAT_Blame_2, AASV_Blame_2),
Blame_3 = coalesce(WT_Blame_3, WSV_Blame_3, AAT_Blame_3, AASV_Blame_3),
Blame_4 = coalesce(WT_Blame_4, WSV_Blame_4, AAT_Blame_4, AASV_Blame_4),
Blame_5 = coalesce(WT_Blame_5, WSV_Blame_5, AAT_Blame_5, AASV_Blame_5),
Blame_6 = coalesce(WT_Blame_6, WSV_Blame_6, AAT_Blame_6, AASV_Blame_6),
Blame_7 = coalesce(WT_Blame_7, WSV_Blame_7, AAT_Blame_7, AASV_Blame_7),
Blame_8 = coalesce(WT_Blame_8, WSV_Blame_8, AAT_Blame_8, AASV_Blame_8),
Blame_9 = coalesce(WT_Blame_9, WSV_Blame_9, AAT_Blame_9, AASV_Blame_9),
Blame_10 = coalesce(WT_Blame_10, WSV_Blame_10, AAT_Blame_10, AASV_Blame_10),
Blame_11 = coalesce(WT_Blame_11, WSV_Blame_11, AAT_Blame_11, AASV_Blame_11),
Blame_12 = coalesce(WT_Blame_12, WSV_Blame_12, AAT_Blame_12, AASV_Blame_12)
)
colSums(is.na(data)) #number of missing observations per column
## StartDate EndDate
## 0 0
## Status Progress
## 0 0
## Duration(inseconds) Finished
## 0 0
## RecordedDate ResponseId
## 0 0
## DistributionChannel Q_RecaptchaScore
## 0 0
## Q_RelevantIDDuplicate Q_RelevantIDDuplicateScore
## 916 0
## Q_RelevantIDFraudScore Q_RelevantIDLastStartDate
## 0 916
## Consent WT_Likability_1
## 0 685
## WT_Likability_2 WT_Likability_3
## 685 685
## WT_Likability_4 WT_WarmCompetent_1
## 685 686
## WT_WarmCompetent_2 WT_Blame_1
## 688 685
## WT_Blame_2 WT_Blame_3
## 685 685
## WT_Blame_4 WT_Blame_5
## 685 685
## WT_Blame_6 WT_Blame_7
## 685 685
## WT_Blame_8 WT_Blame_9
## 685 685
## WT_Blame_10 WT_Blame_11
## 686 685
## WT_Blame_12 WT_Responsibility
## 685 685
## WT_Feel WSV_Likability_1
## 685 682
## WSV_Likability_2 WSV_Likability_3
## 682 682
## WSV_Likability_4 WSV_WarmCompetent_1
## 682 683
## WSV_WarmCompetent_2 WSV_Blame_1
## 683 682
## WSV_Blame_2 WSV_Blame_3
## 682 682
## WSV_Blame_4 WSV_Blame_5
## 682 682
## WSV_Blame_6 WSV_Blame_7
## 682 682
## WSV_Blame_8 WSV_Blame_9
## 682 682
## WSV_Blame_10 WSV_Blame_11
## 682 682
## WSV_Blame_12 WSV_Responsibility
## 682 683
## WSV_Feel AASV_Likability_1
## 683 684
## AASV_Likability_2 AASV_Likability_3
## 684 684
## AASV_Likability_4 AASV_WarmCompetent_1
## 684 686
## AASV_WarmCompetent_2 AASV_Blame_1
## 686 684
## AASV_Blame_2 AASV_Blame_3
## 684 684
## AASV_Blame_4 AASV_Blame_5
## 684 684
## AASV_Blame_6 AASV_Blame_7
## 684 684
## AASV_Blame_8 AASV_Blame_9
## 684 684
## AASV_Blame_10 AASV_Blame_11
## 684 684
## AASV_Blame_12 AASV_Responsibility
## 684 685
## AASV_Feel AAT_Likability_1
## 685 697
## AAT_Likability_2 AAT_Likability_3
## 697 697
## AAT_Likability_4 AAT_WarmCompetent_1
## 697 698
## AAT_WarmCompetent_2 AAT_Blame_1
## 699 697
## AAT_Blame_2 AAT_Blame_3
## 697 697
## AAT_Blame_4 AAT_Blame_5
## 697 697
## AAT_Blame_6 AAT_Blame_7
## 697 697
## AAT_Blame_8 AAT_Blame_9
## 697 697
## AAT_Blame_10 AAT_Blame_11
## 697 697
## AAT_Blame_12 AAT_Responsibility
## 697 697
## AAT_Feel Trauma_Condition
## 697 0
## RE_Condition AAS_1
## 0 0
## AAS_2 AAS_3
## 0 0
## AAS_4 AAS_5
## 0 0
## AAS_6 AAS_7
## 0 0
## AAS_8 AAS_9
## 0 0
## AAS_10 AAS_11
## 0 0
## AAS_12 AAS_13
## 0 1
## AAS_14 AAS_15
## 0 0
## AAS_16 Education
## 0 0
## Age_1 Gender
## 0 0
## Gender_6_TEXT Sex
## 910 0
## SexualOrientation SexualOrientation_12_TEXT
## 0 912
## Race Race_7_TEXT
## 0 911
## PoliticalIdentitiy Income
## 1 0
## Consent_Confirm FL_100_DO_W-T
## 913 685
## FL_100_DO_W-SV FL_100_DO_AA-SV
## 682 684
## FL_100_DO_AA-T Consent
## 697 0
## Condition Likability_1
## 0 0
## Likability_2 Likability_3
## 0 0
## Likability_4 Warmth
## 0 5
## Competent Blame_1
## 8 0
## Blame_2 Blame_3
## 0 0
## Blame_4 Blame_5
## 0 0
## Blame_6 Blame_7
## 0 0
## Blame_8 Blame_9
## 0 0
## Blame_10 Blame_11
## 1 0
## Blame_12
## 0
# Very small amounts of missing data, less than 1%
data<- data %>% # creating a new manipulation check variable to incidate whether people passed manipulation check
mutate(manip.check = case_when(
data$Condition=="WSV" & data$Trauma_Condition==3 ~ 1,# 1 = passed manipulation check
data$Condition=="AASV" & data$Trauma_Condition==3~ 1,
data$Condition=="WT" & data$Trauma_Condition==2 ~ 1,
data$Condition=="AAT" & data$Trauma_Condition==2 ~ 1
))
# The coding got messed up in qualtrics. For the Trauma_condition variable, 3 = SV and 2 = car accident. For the
library(tidyr)
data <- data %>%
mutate(manip.check = replace_na(manip.check, 0)) # failed manipulation check = 0
table(data$manip.check) #7 people failed the manipulation check
##
## 0 1
## 7 909
# creating new dataframe with just the manipulation check info to verify that I did this correctly
library(dplyr)
manip.data<- data %>%
dplyr::select(Condition, Trauma_Condition, manip.check)
data <- data %>%
dplyr::filter(manip.check != 0) # removing the 7 people who failed the manipulation check from analyses
################## Likability ##################
# reverse code item 4
data <- data %>%
dplyr::mutate(Likability_4.r = (8 - Likability_4))
# avg score
data <- data %>%
rowwise() %>%
mutate(Likability = mean(c(Likability_1, Likability_2, Likability_3, Likability_4.r), na.rm = TRUE))%>%
ungroup()
######################## Blame #######################
# reverse scored items are 1, 5, 8; see Person & Dhingra, 2022
data <- data %>%
dplyr::mutate(Blame_1.r = (8 - Blame_1))
data <- data %>%
dplyr::mutate(Blame_3.r = (8 - Blame_3)) # 3 isn't reverse coded in the original scale but we added "not" to item
data <- data %>%
dplyr::mutate(Blame_5.r = (8 - Blame_5))
data <- data %>%
dplyr::mutate(Blame_8.r = (8 - Blame_8))
# Blame subscale
data <- data %>%
rowwise() %>%
mutate(Blame.subscale = mean(c(Blame_1.r, Blame_3.r, Blame_6, Blame_10), na.rm = TRUE))%>%
ungroup()
# Responsibility subscale
data <- data %>%
rowwise() %>%
mutate(Responsibility = mean(c(Blame_8.r, Blame_11, Blame_12), na.rm = TRUE))%>%
ungroup()
# Control subscale
data <- data %>%
rowwise() %>%
mutate(Control = mean(c(Blame_2, Blame_4, Blame_5.r, Blame_7, Blame_9), na.rm = TRUE))%>%
ungroup()
# Blame total score
data <- data %>%
rowwise() %>%
mutate(Blame = mean(c(Blame_1.r, Blame_3.r, Blame_6, Blame_10, Blame_8.r, Blame_11, Blame_12, Blame_2, Blame_4, Blame_5.r, Blame_7, Blame_9), na.rm = TRUE))%>%
ungroup()
##################### AAT ####################
# Warmth subscale
data <- data %>%
rowwise() %>%
mutate(AAS_warm = mean(c_across(AAS_1:AAS_5), na.rm = TRUE))%>%
ungroup()
# Competence subscale
data <- data %>%
rowwise() %>%
mutate(AAS_comp = mean(c_across(AAS_6:AAS_9), na.rm = TRUE))%>%
ungroup()
# SelfCentered subscale
data <- data %>%
rowwise() %>%
mutate(AAS_selfcent = mean(c_across(AAS_10:AAS_13), na.rm = TRUE))%>%
ungroup()
# Submissive subscale
data <- data %>%
rowwise() %>%
mutate(AAS_submiss = mean(c_across(AAS_14:AAS_16), na.rm = TRUE))%>%
ungroup()
data %>%
dplyr::select(Likability_1, Likability_2, Likability_3, Likability_4.r) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.84 0.85 0.84 0.58 5.5 0.0091 5.4 0.91 0.56
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.82 0.84 0.86
## Duhachek 0.82 0.84 0.86
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Likability_1 0.76 0.76 0.74 0.52 3.2 0.0148 0.0557 0.40
## Likability_2 0.73 0.74 0.70 0.49 2.8 0.0158 0.0371 0.39
## Likability_3 0.77 0.78 0.76 0.54 3.5 0.0142 0.0586 0.40
## Likability_4.r 0.91 0.91 0.88 0.77 10.1 0.0053 0.0031 0.79
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Likability_1 909 0.87 0.88 0.86 0.77 5.4 1.1
## Likability_2 909 0.90 0.91 0.91 0.82 5.3 1.1
## Likability_3 909 0.86 0.86 0.82 0.74 5.2 1.1
## Likability_4.r 909 0.67 0.65 0.44 0.42 5.9 1.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Likability_1 0 0.00 0.01 0.26 0.16 0.46 0.11 0
## Likability_2 0 0.00 0.02 0.28 0.17 0.43 0.11 0
## Likability_3 0 0.01 0.02 0.34 0.18 0.35 0.11 0
## Likability_4.r 0 0.02 0.01 0.13 0.08 0.39 0.37 0
data %>% # blame subscale
dplyr::select(Blame_1.r, Blame_3.r, Blame_6, Blame_10) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.77 0.78 0.74 0.46 3.5 0.012 1.6 0.83 0.46
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.75 0.77 0.8
## Duhachek 0.75 0.77 0.8
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Blame_1.r 0.73 0.73 0.66 0.48 2.7 0.016 0.0121 0.46
## Blame_3.r 0.72 0.73 0.66 0.47 2.7 0.016 0.0128 0.45
## Blame_6 0.73 0.73 0.65 0.48 2.8 0.015 0.0017 0.46
## Blame_10 0.69 0.69 0.61 0.42 2.2 0.018 0.0077 0.38
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Blame_1.r 909 0.76 0.76 0.63 0.55 1.6 1.08
## Blame_3.r 909 0.76 0.76 0.64 0.56 1.6 1.06
## Blame_6 909 0.77 0.76 0.65 0.55 1.7 1.17
## Blame_10 908 0.80 0.81 0.73 0.64 1.6 0.99
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Blame_1.r 0.58 0.31 0.05 0.02 0.01 0.01 0.01 0
## Blame_3.r 0.63 0.28 0.03 0.02 0.01 0.01 0.01 0
## Blame_6 0.62 0.26 0.05 0.03 0.02 0.02 0.01 0
## Blame_10 0.63 0.27 0.05 0.03 0.01 0.01 0.00 0
data %>% #responsibility subscale
dplyr::select(Blame_8.r, Blame_11, Blame_12) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.73 0.79 0.8 0.56 3.9 0.016 1.7 0.98 0.41
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.7 0.73 0.76
## Duhachek 0.7 0.73 0.76
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Blame_8.r 0.93 0.93 0.88 0.88 14.0 0.0044 NA 0.88
## Blame_11 0.52 0.57 0.40 0.40 1.3 0.0275 NA 0.40
## Blame_12 0.54 0.59 0.41 0.41 1.4 0.0267 NA 0.41
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Blame_8.r 909 0.81 0.72 0.44 0.42 2.1 1.59
## Blame_11 909 0.85 0.91 0.91 0.69 1.6 0.99
## Blame_12 909 0.84 0.90 0.91 0.69 1.5 0.96
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Blame_8.r 0.49 0.29 0.06 0.04 0.03 0.04 0.04 0
## Blame_11 0.64 0.27 0.04 0.03 0.02 0.01 0.00 0
## Blame_12 0.66 0.25 0.04 0.02 0.01 0.01 0.00 0
data %>% #control subscale
dplyr::select(Blame_2, Blame_4, Blame_5.r, Blame_7, Blame_9) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.79 0.79 0.77 0.43 3.8 0.011 2.4 1.1 0.46
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.77 0.79 0.81
## Duhachek 0.77 0.79 0.81
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Blame_2 0.72 0.72 0.67 0.39 2.6 0.015 0.0101 0.41
## Blame_4 0.76 0.76 0.72 0.44 3.1 0.013 0.0206 0.43
## Blame_5.r 0.81 0.81 0.77 0.51 4.2 0.010 0.0062 0.48
## Blame_7 0.71 0.71 0.66 0.38 2.5 0.015 0.0102 0.39
## Blame_9 0.76 0.75 0.72 0.43 3.0 0.013 0.0190 0.42
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Blame_2 909 0.81 0.80 0.76 0.67 2.6 1.6
## Blame_4 909 0.72 0.72 0.61 0.55 2.4 1.5
## Blame_5.r 909 0.60 0.61 0.44 0.40 2.2 1.5
## Blame_7 909 0.83 0.82 0.78 0.69 2.5 1.7
## Blame_9 909 0.72 0.74 0.64 0.57 2.0 1.4
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Blame_2 0.29 0.31 0.12 0.11 0.10 0.05 0.02 0
## Blame_4 0.33 0.35 0.12 0.09 0.05 0.04 0.02 0
## Blame_5.r 0.38 0.32 0.14 0.07 0.03 0.04 0.02 0
## Blame_7 0.38 0.24 0.10 0.12 0.10 0.05 0.01 0
## Blame_9 0.49 0.27 0.09 0.07 0.05 0.03 0.01 0
data %>% #control subscale
dplyr::select(Blame_1.r, Blame_3.r, Blame_6, Blame_10, Blame_8.r, Blame_11, Blame_12, Blame_2, Blame_4, Blame_5.r, Blame_7, Blame_9) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE) # Reliability of the scale is higher when not analyzing separartely by subscale
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.9 0.91 0.44 9.3 0.0053 1.9 0.88 0.41
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.88 0.89 0.9
## Duhachek 0.88 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Blame_1.r 0.88 0.90 0.91 0.44 8.7 0.0057 0.019 0.42
## Blame_3.r 0.88 0.90 0.91 0.44 8.8 0.0056 0.019 0.42
## Blame_6 0.88 0.89 0.91 0.43 8.5 0.0058 0.017 0.41
## Blame_10 0.88 0.89 0.90 0.42 7.9 0.0059 0.013 0.39
## Blame_8.r 0.89 0.90 0.91 0.45 9.1 0.0053 0.018 0.44
## Blame_11 0.88 0.89 0.89 0.41 7.8 0.0060 0.011 0.39
## Blame_12 0.88 0.89 0.90 0.42 7.9 0.0059 0.012 0.39
## Blame_2 0.88 0.90 0.90 0.44 8.6 0.0058 0.018 0.41
## Blame_4 0.88 0.90 0.91 0.45 8.8 0.0056 0.018 0.40
## Blame_5.r 0.89 0.90 0.91 0.46 9.4 0.0053 0.016 0.44
## Blame_7 0.88 0.89 0.90 0.43 8.4 0.0060 0.018 0.40
## Blame_9 0.88 0.89 0.90 0.43 8.2 0.0060 0.017 0.40
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Blame_1.r 909 0.64 0.66 0.61 0.58 1.6 1.08
## Blame_3.r 909 0.62 0.64 0.59 0.55 1.6 1.06
## Blame_6 909 0.68 0.70 0.66 0.62 1.7 1.17
## Blame_10 908 0.77 0.80 0.81 0.73 1.6 0.99
## Blame_8.r 909 0.60 0.59 0.52 0.50 2.1 1.59
## Blame_11 909 0.80 0.83 0.85 0.77 1.6 0.99
## Blame_12 909 0.77 0.81 0.82 0.73 1.5 0.96
## Blame_2 909 0.71 0.68 0.65 0.63 2.6 1.60
## Blame_4 909 0.65 0.63 0.58 0.56 2.4 1.47
## Blame_5.r 909 0.56 0.54 0.47 0.45 2.2 1.45
## Blame_7 909 0.75 0.71 0.69 0.66 2.5 1.65
## Blame_9 909 0.74 0.75 0.72 0.68 2.0 1.36
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Blame_1.r 0.58 0.31 0.05 0.02 0.01 0.01 0.01 0
## Blame_3.r 0.63 0.28 0.03 0.02 0.01 0.01 0.01 0
## Blame_6 0.62 0.26 0.05 0.03 0.02 0.02 0.01 0
## Blame_10 0.63 0.27 0.05 0.03 0.01 0.01 0.00 0
## Blame_8.r 0.49 0.29 0.06 0.04 0.03 0.04 0.04 0
## Blame_11 0.64 0.27 0.04 0.03 0.02 0.01 0.00 0
## Blame_12 0.66 0.25 0.04 0.02 0.01 0.01 0.00 0
## Blame_2 0.29 0.31 0.12 0.11 0.10 0.05 0.02 0
## Blame_4 0.33 0.35 0.12 0.09 0.05 0.04 0.02 0
## Blame_5.r 0.38 0.32 0.14 0.07 0.03 0.04 0.02 0
## Blame_7 0.38 0.24 0.10 0.12 0.10 0.05 0.01 0
## Blame_9 0.49 0.27 0.09 0.07 0.05 0.03 0.01 0
data %>% #AAS warmth
dplyr::select(AAS_1:AAS_5) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE) # AAS warmth
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.95 0.95 0.94 0.8 20 0.0025 6.2 1.6 0.8
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.95 0.95 0.96
## Duhachek 0.95 0.95 0.96
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## AAS_1 0.95 0.95 0.93 0.81 17 0.0030 0.00096 0.82
## AAS_2 0.94 0.94 0.93 0.81 17 0.0031 0.00053 0.80
## AAS_3 0.94 0.94 0.92 0.79 15 0.0033 0.00074 0.79
## AAS_4 0.94 0.94 0.92 0.79 15 0.0033 0.00044 0.80
## AAS_5 0.95 0.95 0.93 0.81 17 0.0029 0.00057 0.81
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## AAS_1 909 0.91 0.91 0.87 0.85 6.2 1.6
## AAS_2 909 0.92 0.92 0.89 0.87 6.1 1.7
## AAS_3 909 0.93 0.93 0.91 0.89 6.1 1.7
## AAS_4 909 0.93 0.93 0.91 0.89 6.2 1.7
## AAS_5 909 0.91 0.91 0.87 0.85 6.2 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 8 9 miss
## AAS_1 0.01 0.01 0.02 0.05 0.34 0.14 0.20 0.11 0.11 0
## AAS_2 0.00 0.01 0.03 0.07 0.32 0.13 0.19 0.12 0.12 0
## AAS_3 0.01 0.01 0.03 0.07 0.33 0.15 0.15 0.13 0.12 0
## AAS_4 0.00 0.01 0.03 0.07 0.30 0.15 0.18 0.12 0.12 0
## AAS_5 0.00 0.02 0.03 0.06 0.30 0.16 0.18 0.13 0.13 0
data %>% #AAS competence
dplyr::select(AAS_6:AAS_9) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.95 0.95 0.94 0.82 18 0.0028 7.3 1.4 0.83
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.94 0.95 0.95
## Duhachek 0.94 0.95 0.95
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## AAS_6 0.93 0.93 0.90 0.81 13 0.0043 0.00180 0.83
## AAS_7 0.93 0.93 0.91 0.83 14 0.0038 0.00139 0.83
## AAS_8 0.92 0.92 0.89 0.80 12 0.0045 0.00216 0.79
## AAS_9 0.95 0.95 0.92 0.85 17 0.0032 0.00015 0.85
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## AAS_6 909 0.94 0.94 0.92 0.89 7.4 1.5
## AAS_7 909 0.93 0.93 0.89 0.87 7.2 1.5
## AAS_8 909 0.95 0.95 0.93 0.91 7.4 1.5
## AAS_9 909 0.91 0.91 0.86 0.83 7.2 1.5
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 8 9 miss
## AAS_6 0 0 0.00 0.01 0.16 0.09 0.18 0.27 0.28 0
## AAS_7 0 0 0.01 0.01 0.17 0.12 0.19 0.25 0.25 0
## AAS_8 0 0 0.01 0.01 0.15 0.10 0.19 0.27 0.28 0
## AAS_9 0 0 0.00 0.02 0.17 0.11 0.22 0.23 0.24 0
data %>% #AAS self centeredness
dplyr::select(AAS_10:AAS_13) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.9 0.9 0.89 0.69 8.9 0.0057 4.2 1.6 0.7
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.89 0.9 0.91
## Duhachek 0.89 0.9 0.91
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## AAS_10 0.89 0.89 0.85 0.73 8.0 0.0065 0.0036 0.75
## AAS_11 0.85 0.85 0.81 0.66 5.7 0.0090 0.0123 0.63
## AAS_12 0.85 0.85 0.81 0.66 5.8 0.0085 0.0106 0.66
## AAS_13 0.88 0.88 0.84 0.71 7.5 0.0069 0.0052 0.75
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## AAS_10 909 0.85 0.84 0.77 0.72 4.6 2.0
## AAS_11 909 0.91 0.90 0.87 0.83 4.2 1.9
## AAS_12 909 0.90 0.90 0.87 0.81 3.9 1.9
## AAS_13 908 0.85 0.85 0.79 0.73 3.9 1.8
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 8 9 miss
## AAS_10 0.06 0.10 0.14 0.17 0.30 0.07 0.07 0.04 0.06 0
## AAS_11 0.08 0.12 0.15 0.18 0.29 0.08 0.05 0.03 0.03 0
## AAS_12 0.11 0.14 0.17 0.18 0.26 0.06 0.04 0.03 0.02 0
## AAS_13 0.11 0.14 0.19 0.15 0.29 0.06 0.04 0.02 0.01 0
data %>% #AAS submissive
dplyr::select(AAS_14:AAS_16) %>%
psych::alpha( ,check.keys = F, na.rm = TRUE)
##
## Reliability analysis
## Call: psych::alpha(x = ., na.rm = TRUE, check.keys = F)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.83 0.83 0.78 0.62 4.9 0.0097 5.3 1.6 0.65
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.81 0.83 0.85
## Duhachek 0.81 0.83 0.85
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## AAS_14 0.81 0.81 0.68 0.68 4.3 0.013 NA 0.68
## AAS_15 0.70 0.70 0.54 0.54 2.3 0.020 NA 0.54
## AAS_16 0.78 0.78 0.65 0.65 3.6 0.014 NA 0.65
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## AAS_14 909 0.84 0.84 0.71 0.65 5.5 1.8
## AAS_15 909 0.90 0.90 0.83 0.76 5.2 1.9
## AAS_16 909 0.86 0.86 0.75 0.68 5.1 1.9
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 8 9 miss
## AAS_14 0.03 0.03 0.06 0.08 0.33 0.18 0.17 0.08 0.04 0
## AAS_15 0.05 0.03 0.07 0.12 0.32 0.16 0.13 0.07 0.04 0
## AAS_16 0.05 0.05 0.09 0.11 0.36 0.12 0.12 0.06 0.04 0
par(mfrow=c(1, 2))
#likability
hist(data$Likability, main="Histogram of Likability", xlab="Likability", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$Likability, na.rm=TRUE), 2)))
qqnorm(data$Likability, pch = 1, frame = FALSE, main="QQ Plot of Likability")
qqline(data$Likability, col = "hotpink", lwd = 2)
# blame
hist(data$Blame, main="Histogram of Blame", xlab="Blame", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$Blame, na.rm=TRUE), 2)))
qqnorm(data$Blame, pch = 1, frame = FALSE, main="QQ Plot of Blame")
qqline(data$Blame, col = "hotpink", lwd = 2)
# Warmth
hist(data$Warmth, main="Histogram of Warmth", xlab="Warmth", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$Warmth, na.rm=TRUE), 2)))
qqnorm(data$Warmth, pch = 1, frame = FALSE, main="QQ Plot of Warmth")
qqline(data$Warmth, col = "hotpink", lwd = 2)
# Competence
hist(data$Competent, main="Histogram of Competence", xlab="Competence", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$Competent, na.rm=TRUE), 2)))
qqnorm(data$Competent, pch = 1, frame = FALSE, main="QQ Plot of Competence")
qqline(data$Competent, col = "hotpink", lwd = 2)
hist(data$AAS_warm, main="Histogram of AAS Warmth", xlab="AAS Warmth", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$AAS_warm, na.rm=TRUE), 2)))
hist(data$AAS_comp, main="Histogram of AAS Competence", xlab="AAS Competence", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$AAS_comp, na.rm=TRUE), 2)))
hist(data$AAS_selfcent, main="Histogram of AAS Self Centeredness", xlab="AAS Self Centeredness", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$AAS_selfcent, na.rm=TRUE), 2)))
hist(data$AAS_submiss, main="Histogram of AAS Submissiveness", xlab="AAS Submissiveness", col='hotpink', sub=paste("Skewness:",
round(e1071::skewness(data$AAS_submiss, na.rm=TRUE), 2)))
library(gtsummary)
data %>%
dplyr::select(Likability, Blame, Warmth, Competent, AAS_warm, AAS_comp, AAS_selfcent, AAS_submiss) %>%
tbl_summary(
type = list(Warmth ~ "continuous",
Competent ~ "continuous"
),
statistic = list(
all_continuous() ~ "{mean} ({sd}); Min: {min}, Max: {max}"
)
)
| Characteristic | N = 9091 |
|---|---|
| Likability | 5.44 (0.91); Min: 1.75, Max: 7.00 |
| Blame | 1.95 (0.88); Min: 1.00, Max: 6.25 |
| Warmth | 4.97 (1.09); Min: 1.00, Max: 7.00 |
| Unknown | 5 |
| Competent | 5.24 (1.15); Min: 1.00, Max: 7.00 |
| Unknown | 8 |
| AAS_warm | 6.19 (1.55); Min: 1.00, Max: 9.00 |
| AAS_comp | 7.28 (1.40); Min: 1.00, Max: 9.00 |
| AAS_selfcent | 4.16 (1.65); Min: 1.00, Max: 9.00 |
| AAS_submiss | 5.26 (1.58); Min: 1.00, Max: 9.00 |
| 1 Mean (SD); Min: Min, Max: Max | |
data %>% # means and SDs by condition
dplyr::select(Condition, Likability, Blame, Warmth, Competent) %>%
tbl_summary(
by = Condition,
type = list(Warmth ~ "continuous",
Competent ~ "continuous"
),
statistic = list(
all_continuous() ~ "{mean} ({sd}); Min: {min}, Max: {max}"
)
)
| Characteristic | AASV N = 2291 |
AAT N = 2181 |
WSV N = 2341 |
WT N = 2281 |
|---|---|---|---|---|
| Likability | 5.55 (0.88); Min: 2.75, Max: 7.00 | 5.49 (0.86); Min: 2.50, Max: 7.00 | 5.33 (0.99); Min: 1.75, Max: 7.00 | 5.42 (0.90); Min: 3.00, Max: 7.00 |
| Blame | 1.95 (0.94); Min: 1.00, Max: 5.25 | 1.88 (0.80); Min: 1.00, Max: 6.25 | 2.02 (0.96); Min: 1.00, Max: 5.42 | 1.93 (0.80); Min: 1.00, Max: 4.67 |
| Warmth | 4.99 (1.12); Min: 1.00, Max: 7.00 | 4.95 (1.03); Min: 2.00, Max: 7.00 | 4.94 (1.13); Min: 1.00, Max: 7.00 | 5.00 (1.07); Min: 2.00, Max: 7.00 |
| Unknown | 2 | 1 | 1 | 1 |
| Competent | 5.01 (1.24); Min: 1.00, Max: 7.00 | 5.49 (1.02); Min: 3.00, Max: 7.00 | 5.01 (1.15); Min: 1.00, Max: 7.00 | 5.49 (1.07); Min: 1.00, Max: 7.00 |
| Unknown | 2 | 2 | 1 | 3 |
| 1 Mean (SD); Min: Min, Max: Max | ||||
data$Education <- factor(data$Education,
levels=c(1, 2, 3, 4, 5, 6, 7, 8),
labels=c("Some high school", "High school degree", "Associate degree", "Some college", "Bachelor degree", "Some graduate school", "Masters degree", "Doctorate degree"))
data$Gender <- factor(data$Gender,
levels=c(1, 7, 2, 3, 4, 5, 6),
labels=c("Girl or woman", "Boy or man", "Nonbinary, genderfluid, or genderqueer", "Questioning", "I don't know what this question means", "Decline to answer", "Other"))
data$Sex <- factor(data$Sex,
levels=c(1, 2, 3),
labels=c("Male", "Female", "Decline to answer"))
data$SexualOrientation <- factor(data$SexualOrientation,
levels=c(1, 2, 4, 6, 3, 7, 8, 9, 10, 11, 12),
labels=c("Straight or heterosexual", "Gay", "Lesbian", "Bisexual", "Queer", "Pansexual", "Asexual", "I am not sure", "I don't know what this question means", "Decline to answer", "Other"))
data$Race <- factor(data$Race,
levels=c(1, 2, 3, 4, 5, 9, 8, 7),
labels=c("White", "Black", "Asian", "Native Hawaiian and Pacific Islander", "Native American/American Indian", "Two or more races", "Hispanic or Latinx", "Other"))
data$PoliticalIdentitiy <- factor(data$PoliticalIdentitiy,
levels=c(1, 2, 3, 4, 5, 6, 7),
labels=c("Strong democrat", "Weak democrat", "Independent/lean Democrat", "Independent", "Independent/lean Republican", "Weak Republican", "Strong Republican"))
data$Income <- factor(data$Income,
levels=c(1, 2, 3, 4, 5),
labels=c("Less than $15,000", "15000-34999", "35000-49999", "50000-74999", "75000 or more"))
library(gtsummary)
library(dplyr)
data %>%
dplyr::select(Education, Gender, Sex, SexualOrientation, Race, PoliticalIdentitiy, Income, Age_1) %>%
tbl_summary(
statistic = list(
all_continuous() ~ "{mean} ({sd}); Min: {min}, Max: {max}",
all_categorical() ~ "{n} ({p}%)"
)
)
| Characteristic | N = 9091 |
|---|---|
| Education | |
| Some high school | 11 (1.2%) |
| High school degree | 132 (15%) |
| Associate degree | 103 (11%) |
| Some college | 162 (18%) |
| Bachelor degree | 322 (35%) |
| Some graduate school | 20 (2.2%) |
| Masters degree | 133 (15%) |
| Doctorate degree | 26 (2.9%) |
| Gender | |
| Girl or woman | 527 (58%) |
| Boy or man | 346 (38%) |
| Nonbinary, genderfluid, or genderqueer | 22 (2.4%) |
| Questioning | 1 (0.1%) |
| I don't know what this question means | 0 (0%) |
| Decline to answer | 7 (0.8%) |
| Other | 6 (0.7%) |
| Sex | |
| Male | 351 (39%) |
| Female | 551 (61%) |
| Decline to answer | 7 (0.8%) |
| SexualOrientation | |
| Straight or heterosexual | 731 (80%) |
| Gay | 14 (1.5%) |
| Lesbian | 17 (1.9%) |
| Bisexual | 85 (9.4%) |
| Queer | 15 (1.7%) |
| Pansexual | 18 (2.0%) |
| Asexual | 15 (1.7%) |
| I am not sure | 2 (0.2%) |
| I don't know what this question means | 0 (0%) |
| Decline to answer | 8 (0.9%) |
| Other | 4 (0.4%) |
| Race | |
| White | 594 (65%) |
| Black | 147 (16%) |
| Asian | 59 (6.5%) |
| Native Hawaiian and Pacific Islander | 0 (0%) |
| Native American/American Indian | 10 (1.1%) |
| Two or more races | 47 (5.2%) |
| Hispanic or Latinx | 45 (5.0%) |
| Other | 7 (0.8%) |
| PoliticalIdentitiy | |
| Strong democrat | 200 (22%) |
| Weak democrat | 107 (12%) |
| Independent/lean Democrat | 124 (14%) |
| Independent | 187 (21%) |
| Independent/lean Republican | 64 (7.0%) |
| Weak Republican | 96 (11%) |
| Strong Republican | 130 (14%) |
| Unknown | 1 |
| Income | |
| Less than $15,000 | 79 (8.7%) |
| 15000-34999 | 144 (16%) |
| 35000-49999 | 127 (14%) |
| 50000-74999 | 203 (22%) |
| 75000 or more | 356 (39%) |
| Age_1 | 39 (13); Min: 18, Max: 87 |
| 1 n (%); Mean (SD); Min: Min, Max: Max | |
################# Now checking to see whether gender, race, political identity, and age were successfully randomized across conditions
# Create a summary table by Condition, treating Gender, Race, and PoliticalIdentity as factors
data %>%
dplyr::select(Condition, Gender, Race, PoliticalIdentitiy, Age_1) %>%
tbl_summary(
by = Condition, # Break down by the condition variable
statistic = list(
all_continuous() ~ "{mean} ({sd}); Min: {min}, Max: {max}",
all_categorical() ~ "{n} ({p}%)"
)
) %>%
add_p(
test = list(
all_continuous() ~ "t.test", # t-test for continuous variables
all_categorical() ~ "chisq.test" # Chi-squared test for categorical variables
)
)
## The following errors were returned during `add_p()`:
## ✖ For variable `Age_1` (`Condition`) and "estimate", "statistic", "p.value",
## "parameter", "conf.low", and "conf.high" statistics: grouping factor must
## have exactly 2 levels
## The following warnings were returned during `add_p()`:
## ! For variable `Gender` (`Condition`) and "statistic", "p.value", and
## "parameter" statistics: Chi-squared approximation may be incorrect
## ! For variable `Race` (`Condition`) and "statistic", "p.value", and "parameter"
## statistics: Chi-squared approximation may be incorrect
| Characteristic | AASV N = 2291 |
AAT N = 2181 |
WSV N = 2341 |
WT N = 2281 |
p-value2 |
|---|---|---|---|---|---|
| Gender | 0.8 | ||||
| Girl or woman | 133 (58%) | 125 (57%) | 135 (58%) | 134 (59%) | |
| Boy or man | 88 (38%) | 81 (37%) | 92 (39%) | 85 (37%) | |
| Nonbinary, genderfluid, or genderqueer | 6 (2.6%) | 6 (2.8%) | 5 (2.1%) | 5 (2.2%) | |
| Questioning | 0 (0%) | 0 (0%) | 1 (0.4%) | 0 (0%) | |
| I don't know what this question means | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | |
| Decline to answer | 0 (0%) | 3 (1.4%) | 1 (0.4%) | 3 (1.3%) | |
| Other | 2 (0.9%) | 3 (1.4%) | 0 (0%) | 1 (0.4%) | |
| Race | 0.5 | ||||
| White | 152 (66%) | 145 (67%) | 149 (64%) | 148 (65%) | |
| Black | 32 (14%) | 32 (15%) | 43 (18%) | 40 (18%) | |
| Asian | 16 (7.0%) | 14 (6.4%) | 18 (7.7%) | 11 (4.8%) | |
| Native Hawaiian and Pacific Islander | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | |
| Native American/American Indian | 1 (0.4%) | 4 (1.8%) | 4 (1.7%) | 1 (0.4%) | |
| Two or more races | 13 (5.7%) | 13 (6.0%) | 8 (3.4%) | 13 (5.7%) | |
| Hispanic or Latinx | 15 (6.6%) | 7 (3.2%) | 9 (3.8%) | 14 (6.1%) | |
| Other | 0 (0%) | 3 (1.4%) | 3 (1.3%) | 1 (0.4%) | |
| PoliticalIdentitiy | 0.6 | ||||
| Strong democrat | 42 (18%) | 57 (26%) | 54 (23%) | 47 (21%) | |
| Weak democrat | 33 (14%) | 19 (8.7%) | 28 (12%) | 27 (12%) | |
| Independent/lean Democrat | 33 (14%) | 24 (11%) | 40 (17%) | 27 (12%) | |
| Independent | 51 (22%) | 49 (22%) | 44 (19%) | 43 (19%) | |
| Independent/lean Republican | 17 (7.4%) | 15 (6.9%) | 15 (6.4%) | 17 (7.5%) | |
| Weak Republican | 22 (9.6%) | 24 (11%) | 25 (11%) | 25 (11%) | |
| Strong Republican | 31 (14%) | 30 (14%) | 28 (12%) | 41 (18%) | |
| Unknown | 0 | 0 | 0 | 1 | |
| Age_1 | 39 (13); Min: 18, Max: 74 | 40 (14); Min: 18, Max: 87 | 39 (14); Min: 18, Max: 77 | 39 (13); Min: 18, Max: 77 | |
| 1 n (%); Mean (SD); Min: Min, Max: Max | |||||
| 2 Pearson’s Chi-squared test | |||||
# ANOVA to see whether age varies by condition
age.ran <- aov(Age_1 ~ Condition, data = data)
# Display the ANOVA table
summary(age.ran)
## Df Sum Sq Mean Sq F value Pr(>F)
## Condition 3 227 75.62 0.43 0.731
## Residuals 905 159072 175.77
# so age, political identity, gender, and participant race were successfully randomized (p values > .05)
# creating a binary variable for gender to examine correlations and because there are too few gender conforming individuals across conditions to separately analyze them
data<- data %>% #creating a condition variable
mutate(Gender.bin = case_when(
data$Gender=="Girl or woman" ~ -1,
data$Gender=="Boy or man" ~ 1,
TRUE ~ NA
))
library(Hmisc)
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
cor<- data %>%
dplyr::select(Likability, Blame, Warmth, Competent, AAS_warm, AAS_comp, AAS_selfcent, AAS_submiss, Sex, Gender.bin, Age_1, PoliticalIdentitiy)
cor$Sex[cor$Sex == "Decline to answer"] <- NA #making decline to answer missing for the sex variable
cor$PoliticalIdentitiy<- as.numeric(cor$PoliticalIdentitiy)
cor$Sex<- as.numeric(cor$Sex)
(Study.corr<- rcorr(as.matrix(cor)))
## Likability Blame Warmth Competent AAS_warm AAS_comp
## Likability 1.00 -0.29 0.60 0.49 0.38 0.33
## Blame -0.29 1.00 -0.07 -0.24 -0.11 -0.14
## Warmth 0.60 -0.07 1.00 0.61 0.33 0.23
## Competent 0.49 -0.24 0.61 1.00 0.29 0.29
## AAS_warm 0.38 -0.11 0.33 0.29 1.00 0.56
## AAS_comp 0.33 -0.14 0.23 0.29 0.56 1.00
## AAS_selfcent -0.20 0.19 -0.13 -0.15 -0.15 -0.10
## AAS_submiss -0.06 0.08 -0.03 0.00 0.04 0.19
## Sex 0.09 -0.11 0.07 0.07 0.06 0.05
## Gender.bin -0.09 0.10 -0.07 -0.06 -0.06 -0.07
## Age_1 0.05 -0.04 0.02 -0.01 0.07 0.04
## PoliticalIdentitiy 0.00 0.18 0.05 0.00 0.00 0.04
## AAS_selfcent AAS_submiss Sex Gender.bin Age_1
## Likability -0.20 -0.06 0.09 -0.09 0.05
## Blame 0.19 0.08 -0.11 0.10 -0.04
## Warmth -0.13 -0.03 0.07 -0.07 0.02
## Competent -0.15 0.00 0.07 -0.06 -0.01
## AAS_warm -0.15 0.04 0.06 -0.06 0.07
## AAS_comp -0.10 0.19 0.05 -0.07 0.04
## AAS_selfcent 1.00 0.32 -0.08 0.09 -0.13
## AAS_submiss 0.32 1.00 -0.04 0.03 -0.01
## Sex -0.08 -0.04 1.00 -0.98 0.09
## Gender.bin 0.09 0.03 -0.98 1.00 -0.12
## Age_1 -0.13 -0.01 0.09 -0.12 1.00
## PoliticalIdentitiy 0.04 0.02 -0.07 0.05 -0.03
## PoliticalIdentitiy
## Likability 0.00
## Blame 0.18
## Warmth 0.05
## Competent 0.00
## AAS_warm 0.00
## AAS_comp 0.04
## AAS_selfcent 0.04
## AAS_submiss 0.02
## Sex -0.07
## Gender.bin 0.05
## Age_1 -0.03
## PoliticalIdentitiy 1.00
##
## n
## Likability Blame Warmth Competent AAS_warm AAS_comp
## Likability 909 909 904 901 909 909
## Blame 909 909 904 901 909 909
## Warmth 904 904 904 901 904 904
## Competent 901 901 901 901 901 901
## AAS_warm 909 909 904 901 909 909
## AAS_comp 909 909 904 901 909 909
## AAS_selfcent 909 909 904 901 909 909
## AAS_submiss 909 909 904 901 909 909
## Sex 902 902 897 894 902 902
## Gender.bin 873 873 868 865 873 873
## Age_1 909 909 904 901 909 909
## PoliticalIdentitiy 908 908 903 900 908 908
## AAS_selfcent AAS_submiss Sex Gender.bin Age_1
## Likability 909 909 902 873 909
## Blame 909 909 902 873 909
## Warmth 904 904 897 868 904
## Competent 901 901 894 865 901
## AAS_warm 909 909 902 873 909
## AAS_comp 909 909 902 873 909
## AAS_selfcent 909 909 902 873 909
## AAS_submiss 909 909 902 873 909
## Sex 902 902 902 873 902
## Gender.bin 873 873 873 873 873
## Age_1 909 909 902 873 909
## PoliticalIdentitiy 908 908 901 872 908
## PoliticalIdentitiy
## Likability 908
## Blame 908
## Warmth 903
## Competent 900
## AAS_warm 908
## AAS_comp 908
## AAS_selfcent 908
## AAS_submiss 908
## Sex 901
## Gender.bin 872
## Age_1 908
## PoliticalIdentitiy 908
##
## P
## Likability Blame Warmth Competent AAS_warm AAS_comp
## Likability 0.0000 0.0000 0.0000 0.0000 0.0000
## Blame 0.0000 0.0307 0.0000 0.0009 0.0000
## Warmth 0.0000 0.0307 0.0000 0.0000 0.0000
## Competent 0.0000 0.0000 0.0000 0.0000 0.0000
## AAS_warm 0.0000 0.0009 0.0000 0.0000 0.0000
## AAS_comp 0.0000 0.0000 0.0000 0.0000 0.0000
## AAS_selfcent 0.0000 0.0000 0.0000 0.0000 0.0000 0.0030
## AAS_submiss 0.0760 0.0187 0.3528 0.9712 0.2454 0.0000
## Sex 0.0100 0.0015 0.0286 0.0302 0.0737 0.1287
## Gender.bin 0.0096 0.0035 0.0501 0.0734 0.0757 0.0518
## Age_1 0.1009 0.2056 0.6475 0.6549 0.0262 0.2216
## PoliticalIdentitiy 0.9263 0.0000 0.1391 0.9204 0.9271 0.2312
## AAS_selfcent AAS_submiss Sex Gender.bin Age_1
## Likability 0.0000 0.0760 0.0100 0.0096 0.1009
## Blame 0.0000 0.0187 0.0015 0.0035 0.2056
## Warmth 0.0000 0.3528 0.0286 0.0501 0.6475
## Competent 0.0000 0.9712 0.0302 0.0734 0.6549
## AAS_warm 0.0000 0.2454 0.0737 0.0757 0.0262
## AAS_comp 0.0030 0.0000 0.1287 0.0518 0.2216
## AAS_selfcent 0.0000 0.0162 0.0092 0.0000
## AAS_submiss 0.0000 0.1898 0.3112 0.8663
## Sex 0.0162 0.1898 0.0000 0.0050
## Gender.bin 0.0092 0.3112 0.0000 0.0004
## Age_1 0.0000 0.8663 0.0050 0.0004
## PoliticalIdentitiy 0.2701 0.4577 0.0329 0.1466 0.3987
## PoliticalIdentitiy
## Likability 0.9263
## Blame 0.0000
## Warmth 0.1391
## Competent 0.9204
## AAS_warm 0.9271
## AAS_comp 0.2312
## AAS_selfcent 0.2701
## AAS_submiss 0.4577
## Sex 0.0329
## Gender.bin 0.1466
## Age_1 0.3987
## PoliticalIdentitiy
print(Study.corr$r, digits=2)
## Likability Blame Warmth Competent AAS_warm AAS_comp
## Likability 1.0000 -0.293 0.596 0.4943 0.379 0.330
## Blame -0.2926 1.000 -0.072 -0.2390 -0.110 -0.141
## Warmth 0.5963 -0.072 1.000 0.6066 0.328 0.228
## Competent 0.4943 -0.239 0.607 1.0000 0.292 0.290
## AAS_warm 0.3793 -0.110 0.328 0.2920 1.000 0.559
## AAS_comp 0.3303 -0.141 0.228 0.2897 0.559 1.000
## AAS_selfcent -0.2048 0.189 -0.131 -0.1468 -0.146 -0.098
## AAS_submiss -0.0589 0.078 -0.031 -0.0012 0.039 0.189
## Sex 0.0857 -0.106 0.073 0.0725 0.060 0.051
## Gender.bin -0.0876 0.099 -0.067 -0.0609 -0.060 -0.066
## Age_1 0.0544 -0.042 0.015 -0.0149 0.074 0.041
## PoliticalIdentitiy 0.0031 0.185 0.049 0.0033 0.003 0.040
## AAS_selfcent AAS_submiss Sex Gender.bin Age_1
## Likability -0.205 -0.0589 0.086 -0.088 0.0544
## Blame 0.189 0.0780 -0.106 0.099 -0.0420
## Warmth -0.131 -0.0309 0.073 -0.067 0.0152
## Competent -0.147 -0.0012 0.073 -0.061 -0.0149
## AAS_warm -0.146 0.0386 0.060 -0.060 0.0737
## AAS_comp -0.098 0.1888 0.051 -0.066 0.0406
## AAS_selfcent 1.000 0.3203 -0.080 0.088 -0.1301
## AAS_submiss 0.320 1.0000 -0.044 0.034 -0.0056
## Sex -0.080 -0.0437 1.000 -0.983 0.0934
## Gender.bin 0.088 0.0343 -0.983 1.000 -0.1187
## Age_1 -0.130 -0.0056 0.093 -0.119 1.0000
## PoliticalIdentitiy 0.037 0.0247 -0.071 0.049 -0.0280
## PoliticalIdentitiy
## Likability 0.0031
## Blame 0.1846
## Warmth 0.0493
## Competent 0.0033
## AAS_warm 0.0030
## AAS_comp 0.0398
## AAS_selfcent 0.0366
## AAS_submiss 0.0247
## Sex -0.0711
## Gender.bin 0.0492
## Age_1 -0.0280
## PoliticalIdentitiy 1.0000
# largest correlation between DVs is .61 suggesting that multicollinearity is not an issue
# Now using a MANOVA to see whether race is related to outcome variables
data<- data %>% #creating a condition variable
mutate(Race.cat = case_when(
data$Race=="White" ~ -1, # creating new categorical variable with levels White, Asian, and other or -1, 0, 1 respectively
data$Race=="Asian" ~ 0,
TRUE ~ 1
))
race.manova <- manova(cbind(Likability, Warmth, Blame, Competent) ~ Race.cat, data = data)
# I'm using Pillai's trace because it's more robust to violations
summary(race.manova, test = "Pillai") # race is not related to the outcome variables
## Df Pillai approx F num Df den Df Pr(>F)
## Race.cat 1 0.0028891 0.64903 4 896 0.6277
## Residuals 899
# DVs
dv_vars <- c("Likability", "Blame", "Warmth", "Competent")
dv_data <- data[dv_vars]
# Compute Mahalanobis distance which assesses multivariate outliers
mahal_dist <- mahalanobis(dv_data,
colMeans(dv_data, na.rm = TRUE),
cov(dv_data, use = "complete.obs"))
# Add distances back to your dataframe
data$mahalanobis <- mahal_dist
# calculate p value to determine which variables are outliers
cutoff <- qchisq(0.975, df = length(dv_vars))
data$outlier <- mahal_dist > cutoff
# count outliers
table(data$outlier) # there are 43 multivariate outliers
##
## FALSE TRUE
## 858 43
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
library(rstatix)
##
## Attaching package: 'rstatix'
## The following object is masked from 'package:stats':
##
## filter
data %>%
dplyr::select(Likability, Blame, Warmth, Competent) %>%
mshapiro_test()
## # A tibble: 1 × 2
## statistic p.value
## <dbl> <dbl>
## 1 0.933 1.05e-19
# our pvalue is smaller than .05, meaning that the assumption of mulitivariate normality is NOT met
library(biotools)
## Loading required package: MASS
##
## Attaching package: 'MASS'
## The following object is masked from 'package:rstatix':
##
## select
## The following object is masked from 'package:gtsummary':
##
## select
## The following object is masked from 'package:dplyr':
##
## select
## ---
## biotools version 4.3
data_noMiss <- na.omit(data[, c("Likability", "Blame", "Warmth", "Competent", "Condition")]) #this function can't handle missing values so I'm creating copy of dataset without missing data to check this assumption
data_noMiss$Condition <- as.factor(data_noMiss$Condition)
boxM(data_noMiss[, c("Likability", "Blame", "Warmth", "Competent")], grouping=data_noMiss$Condition)
##
## Box's M-test for Homogeneity of Covariance Matrices
##
## data: data_noMiss[, c("Likability", "Blame", "Warmth", "Competent")]
## Chi-Sq (approx.) = 62.127, df = 30, p-value = 0.000505
# p = .001. This is a sensitive test so recommended pvalue cutoff is .001, where p < .001 indicates that this assumption is not met. MANOVAs are robust to violations of this assumption when the groups are similar in n (which they are in this case), so should be ok
library(ggplot2)
ggplot(data, aes(Condition, Likability)) +
geom_boxplot(fill = "lightpink", color = "hotpink") +
labs(x="Condition", y="Likability") +
theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
ggplot(data, aes(Condition, Competent)) +
geom_boxplot(fill = "lightpink", color = "hotpink") +
labs(x="Condition", y="Competent") +
theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
## Warning: Removed 8 rows containing non-finite outside the scale range
## (`stat_boxplot()`).
ggplot(data, aes(Condition, Warmth)) +
geom_boxplot(fill = "lightpink", color = "hotpink") +
labs(x="Condition", y="Warmth") +
theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
## Warning: Removed 5 rows containing non-finite outside the scale range
## (`stat_boxplot()`).
ggplot(data, aes(Condition, Blame)) +
geom_boxplot(fill = "lightpink", color = "hotpink") +
labs(x="Condition", y="Blame") +
theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
# visually inspecting boxplots suggests that this assumption seems to be met
# I'm using Fligner-Killeen test because this is an alternative to Levene's test that's more robust to non-normally distributed data
fligner.test(data_noMiss$Likability ~ data_noMiss$Condition)
##
## Fligner-Killeen test of homogeneity of variances
##
## data: data_noMiss$Likability by data_noMiss$Condition
## Fligner-Killeen:med chi-squared = 8.8213, df = 3, p-value = 0.03176
fligner.test(data_noMiss$Blame ~ data_noMiss$Condition)
##
## Fligner-Killeen test of homogeneity of variances
##
## data: data_noMiss$Blame by data_noMiss$Condition
## Fligner-Killeen:med chi-squared = 6.2321, df = 3, p-value = 0.1008
fligner.test(data_noMiss$Warmth ~ data_noMiss$Condition)
##
## Fligner-Killeen test of homogeneity of variances
##
## data: data_noMiss$Warmth by data_noMiss$Condition
## Fligner-Killeen:med chi-squared = 1.9768, df = 3, p-value = 0.5772
fligner.test(data_noMiss$Competent ~ data_noMiss$Condition)
##
## Fligner-Killeen test of homogeneity of variances
##
## data: data_noMiss$Competent by data_noMiss$Condition
## Fligner-Killeen:med chi-squared = 0.90794, df = 3, p-value = 0.8235
#With the exception of likability, all pvalues > .05 indicating that the assumption of homogenity was met
data$Sex<- as.character(data$Sex)
data$Sex[data$Sex == "Decline to answer"] <- NA
data$Sex<- as.factor(data$Sex) # turning sex to factor variable for analyses
data$PoliticalIdentitiy<- as.numeric(data$PoliticalIdentitiy) #turning political identity to numeric variable
# creating new condition variable to indicate target race
data <- data %>%
mutate(Cond_Race = case_when(
Condition %in% c("AASV", "AAT") ~ "-1", # AASV and AAT become -1
Condition %in% c("WSV", "WT") ~ "1", # WSV and WT become 1
TRUE ~ NA_character_ # For any other conditions, set as NA (optional)
))
data <- data %>%
mutate(Cond_Trauma = case_when(
Condition %in% c("AASV", "WSV") ~ "-1", # SV = -1
Condition %in% c("AAT", "WT") ~ "1", # T = 1
TRUE ~ NA_character_ # For any other conditions, set as NA (optional)
))
data$Gender.bin<- as.factor(data$Gender.bin)
data$Cond_Race<- as.factor(data$Cond_Race)
data$Cond_Trauma<- as.factor(data$Cond_Trauma)
# Run the MANOVA. The order matters for Type I Sums of squares which is default in manova package, so putting control variables first
manova <- manova(cbind(Likability, Warmth, Blame, Competent) ~ PoliticalIdentitiy + Gender.bin + Cond_Race*Cond_Trauma, data = data)
# I'm using Pillai's trace because it's more robust to violations
summary(manova, test = "Pillai")
## Df Pillai approx F num Df den Df Pr(>F)
## PoliticalIdentitiy 1 0.039002 8.6750 4 855 0.00000072638158 ***
## Gender.bin 1 0.013055 2.8275 4 855 0.02391 *
## Cond_Race 1 0.008521 1.8369 4 855 0.11969
## Cond_Trauma 1 0.064469 14.7299 4 855 0.00000000001211 ***
## Cond_Race:Cond_Trauma 1 0.001868 0.4001 4 855 0.80868
## Residuals 858
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
library(effectsize)
##
## Attaching package: 'effectsize'
## The following objects are masked from 'package:rstatix':
##
## cohens_d, eta_squared
eta_squared(manova, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -----------------------------------------------------
## PoliticalIdentitiy | 0.04 | [0.02, 1.00]
## Gender.bin | 0.01 | [0.00, 1.00]
## Cond_Race | 8.52e-03 | [0.00, 1.00]
## Cond_Trauma | 0.06 | [0.04, 1.00]
## Cond_Race:Cond_Trauma | 1.87e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(manova)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ---------------------------------------------------------
## PoliticalIdentitiy | 0.20 | [0.13, Inf]
## Gender.bin | 0.12 | [0.03, Inf]
## Cond_Race | 0.09 | [0.00, Inf]
## Cond_Trauma | 0.26 | [0.20, Inf]
## Cond_Race:Cond_Trauma | 0.04 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
############################### FOLLOW_UP ANOVAS #######################
# trauma type (SV vs car accident) was the only sig term, so I'm doing follow-up anovas for each dependent variable
like.aov <- lm(Likability ~ PoliticalIdentitiy + Gender.bin + Cond_Race*Cond_Trauma,
data = data)
summary(aov(like.aov))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.0 0.033 0.041 0.83955
## Gender.bin 1 5.5 5.520 6.780 0.00938 **
## Cond_Race 1 4.6 4.620 5.674 0.01743 *
## Cond_Trauma 1 0.2 0.200 0.245 0.62068
## Cond_Race:Cond_Trauma 1 0.8 0.756 0.929 0.33538
## Residuals 866 705.0 0.814
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
eta_squared(like.aov, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -----------------------------------------------------
## PoliticalIdentitiy | 4.74e-05 | [0.00, 1.00]
## Gender.bin | 7.77e-03 | [0.00, 1.00]
## Cond_Race | 6.51e-03 | [0.00, 1.00]
## Cond_Trauma | 2.83e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.07e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(like.aov)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ---------------------------------------------------------
## PoliticalIdentitiy | 6.88e-03 | [0.00, Inf]
## Gender.bin | 0.09 | [0.03, Inf]
## Cond_Race | 0.08 | [0.02, Inf]
## Cond_Trauma | 0.02 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.03 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
warm.aov <- lm(Warmth ~ PoliticalIdentitiy + Gender.bin + Cond_Race*Cond_Trauma,
data = data)
summary(aov(warm.aov))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 3.1 3.075 2.590 0.1079
## Gender.bin 1 4.8 4.821 4.061 0.0442 *
## Cond_Race 1 0.0 0.032 0.027 0.8703
## Cond_Trauma 1 0.2 0.238 0.201 0.6543
## Cond_Race:Cond_Trauma 1 0.2 0.157 0.132 0.7162
## Residuals 861 1022.3 1.187
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 42 observations deleted due to missingness
eta_squared(warm.aov, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -----------------------------------------------------
## PoliticalIdentitiy | 3.00e-03 | [0.00, 1.00]
## Gender.bin | 4.69e-03 | [0.00, 1.00]
## Cond_Race | 3.10e-05 | [0.00, 1.00]
## Cond_Trauma | 2.33e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.54e-04 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(warm.aov)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ---------------------------------------------------------
## PoliticalIdentitiy | 0.05 | [0.00, Inf]
## Gender.bin | 0.07 | [0.01, Inf]
## Cond_Race | 5.56e-03 | [0.00, Inf]
## Cond_Trauma | 0.02 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.01 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
blame.aov <- lm(Blame ~ PoliticalIdentitiy + Gender.bin + Cond_Race*Cond_Trauma,
data = data)
summary(aov(blame.aov))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 22.3 22.299 29.679 0.0000000665 ***
## Gender.bin 1 5.4 5.425 7.221 0.00734 **
## Cond_Race 1 0.5 0.456 0.606 0.43636
## Cond_Trauma 1 1.8 1.829 2.435 0.11904
## Cond_Race:Cond_Trauma 1 0.1 0.082 0.109 0.74095
## Residuals 866 650.7 0.751
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
summary(blame.aov)
##
## Call:
## lm(formula = Blame ~ PoliticalIdentitiy + Gender.bin + Cond_Race *
## Cond_Trauma, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3110 -0.6500 -0.1777 0.4820 4.1710
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.61961 0.08138 19.902 < 0.0000000000000002 ***
## PoliticalIdentitiy 0.07590 0.01418 5.351 0.000000112 ***
## Gender.bin1 0.16009 0.06008 2.665 0.00785 **
## Cond_Race1 0.06528 0.08194 0.797 0.42588
## Cond_Trauma1 -0.07186 0.08396 -0.856 0.39231
## Cond_Race1:Cond_Trauma1 -0.03890 0.11763 -0.331 0.74095
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8668 on 866 degrees of freedom
## (37 observations deleted due to missingness)
## Multiple R-squared: 0.0442, Adjusted R-squared: 0.03868
## F-statistic: 8.01 on 5 and 866 DF, p-value: 0.0000002145
eta_squared(blame.aov, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -----------------------------------------------------
## PoliticalIdentitiy | 0.03 | [0.02, 1.00]
## Gender.bin | 8.27e-03 | [0.00, 1.00]
## Cond_Race | 7.00e-04 | [0.00, 1.00]
## Cond_Trauma | 2.80e-03 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.26e-04 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(blame.aov)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ---------------------------------------------------------
## PoliticalIdentitiy | 0.19 | [0.13, Inf]
## Gender.bin | 0.09 | [0.04, Inf]
## Cond_Race | 0.03 | [0.00, Inf]
## Cond_Trauma | 0.05 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.01 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
comp.aov <- lm(Competent ~ PoliticalIdentitiy + Gender.bin + Cond_Race*Cond_Trauma,
data = data)
summary(aov(comp.aov))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.1 0.07 0.056 0.8129
## Gender.bin 1 4.2 4.18 3.325 0.0686 .
## Cond_Race 1 0.0 0.02 0.012 0.9121
## Cond_Trauma 1 49.3 49.31 39.216 0.000000000599 ***
## Cond_Race:Cond_Trauma 1 0.0 0.00 0.001 0.9719
## Residuals 858 1078.9 1.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 45 observations deleted due to missingness
eta_squared(comp.aov, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -----------------------------------------------------
## PoliticalIdentitiy | 6.53e-05 | [0.00, 1.00]
## Gender.bin | 3.86e-03 | [0.00, 1.00]
## Cond_Race | 1.42e-05 | [0.00, 1.00]
## Cond_Trauma | 0.04 | [0.02, 1.00]
## Cond_Race:Cond_Trauma | 1.44e-06 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(comp.aov)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ---------------------------------------------------------
## PoliticalIdentitiy | 8.08e-03 | [0.00, Inf]
## Gender.bin | 0.06 | [0.00, Inf]
## Cond_Race | 3.77e-03 | [0.00, Inf]
## Cond_Trauma | 0.21 | [0.16, Inf]
## Cond_Race:Cond_Trauma | 1.20e-03 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
# In our preregistered analyses we controlled for gender and political identity across both levels of the conditions. In these exploratory analyses we are looking at gender and political identity across levels of conditions to see whether this pattern is driven by, for instance, men blaming SV victims particularly.
manova.ex <- manova(cbind(Likability, Warmth, Blame, Competent) ~ PoliticalIdentitiy + Gender.bin + PoliticalIdentitiy*Cond_Race + PoliticalIdentitiy*Cond_Trauma + Gender.bin*Cond_Race + Gender.bin*Cond_Trauma + Cond_Race*Cond_Trauma, data = data)
# I'm using Pillai's trace because it's more robust to violations
summary(manova.ex, test = "Pillai")
## Df Pillai approx F num Df den Df
## PoliticalIdentitiy 1 0.039149 8.6682 4 851
## Gender.bin 1 0.013094 2.8227 4 851
## Cond_Race 1 0.008564 1.8378 4 851
## Cond_Trauma 1 0.065308 14.8652 4 851
## PoliticalIdentitiy:Cond_Race 1 0.001590 0.3388 4 851
## PoliticalIdentitiy:Cond_Trauma 1 0.008755 1.8792 4 851
## Gender.bin:Cond_Race 1 0.015331 3.3124 4 851
## Gender.bin:Cond_Trauma 1 0.003067 0.6545 4 851
## Cond_Race:Cond_Trauma 1 0.001879 0.4005 4 851
## Residuals 854
## Pr(>F)
## PoliticalIdentitiy 0.00000073643697 ***
## Gender.bin 0.02410 *
## Cond_Race 0.11953
## Cond_Trauma 0.00000000000952 ***
## PoliticalIdentitiy:Cond_Race 0.85184
## PoliticalIdentitiy:Cond_Trauma 0.11205
## Gender.bin:Cond_Race 0.01051 *
## Gender.bin:Cond_Trauma 0.62380
## Cond_Race:Cond_Trauma 0.80836
## Residuals
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
eta_squared(manova.ex, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## --------------------------------------------------------------
## PoliticalIdentitiy | 0.04 | [0.02, 1.00]
## Gender.bin | 0.01 | [0.00, 1.00]
## Cond_Race | 8.56e-03 | [0.00, 1.00]
## Cond_Trauma | 0.07 | [0.04, 1.00]
## PoliticalIdentitiy:Cond_Race | 1.59e-03 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Trauma | 8.76e-03 | [0.00, 1.00]
## Gender.bin:Cond_Race | 0.02 | [0.00, 1.00]
## Gender.bin:Cond_Trauma | 3.07e-03 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.88e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(manova.ex)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ------------------------------------------------------------------
## PoliticalIdentitiy | 0.20 | [0.13, Inf]
## Gender.bin | 0.12 | [0.03, Inf]
## Cond_Race | 0.09 | [0.00, Inf]
## Cond_Trauma | 0.26 | [0.20, Inf]
## PoliticalIdentitiy:Cond_Race | 0.04 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Trauma | 0.09 | [0.00, Inf]
## Gender.bin:Cond_Race | 0.12 | [0.05, Inf]
## Gender.bin:Cond_Trauma | 0.06 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.04 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
# The only new sig. interaction was gender*cond_race. So now I'm doing follow-up tests to see which DV this is related to
like.aov.ex <- lm(Likability ~ PoliticalIdentitiy + Gender.bin + PoliticalIdentitiy*Cond_Race + PoliticalIdentitiy*Cond_Trauma + Gender.bin*Cond_Race + Gender.bin*Cond_Trauma + Cond_Race*Cond_Trauma,
data = data)
summary(aov(like.aov.ex))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.0 0.033 0.041 0.83917
## Gender.bin 1 5.5 5.520 6.813 0.00921 **
## Cond_Race 1 4.6 4.620 5.701 0.01717 *
## Cond_Trauma 1 0.2 0.200 0.246 0.61984
## PoliticalIdentitiy:Cond_Race 1 0.0 0.032 0.039 0.84289
## PoliticalIdentitiy:Cond_Trauma 1 0.6 0.555 0.685 0.40822
## Gender.bin:Cond_Race 1 5.5 5.508 6.798 0.00928 **
## Gender.bin:Cond_Trauma 1 0.4 0.446 0.551 0.45811
## Cond_Race:Cond_Trauma 1 0.8 0.816 1.007 0.31585
## Residuals 862 698.4 0.810
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
eta_squared(like.aov.ex, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## --------------------------------------------------------------
## PoliticalIdentitiy | 4.78e-05 | [0.00, 1.00]
## Gender.bin | 7.84e-03 | [0.00, 1.00]
## Cond_Race | 6.57e-03 | [0.00, 1.00]
## Cond_Trauma | 2.86e-04 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Race | 4.56e-05 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Trauma | 7.94e-04 | [0.00, 1.00]
## Gender.bin:Cond_Race | 7.82e-03 | [0.00, 1.00]
## Gender.bin:Cond_Trauma | 6.39e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.17e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(like.aov.ex)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ------------------------------------------------------------------
## PoliticalIdentitiy | 6.91e-03 | [0.00, Inf]
## Gender.bin | 0.09 | [0.03, Inf]
## Cond_Race | 0.08 | [0.02, Inf]
## Cond_Trauma | 0.02 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Race | 6.75e-03 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Trauma | 0.03 | [0.00, Inf]
## Gender.bin:Cond_Race | 0.09 | [0.03, Inf]
## Gender.bin:Cond_Trauma | 0.03 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.03 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
library(emmeans)
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
like.genderxrace <- emmeans(like.aov.ex, ~ Gender.bin*Cond_Race) #calculate predicted means for gender by target race
contrast(like.genderxrace, "revpairwise",by="Gender.bin") # simple slopes, -1 is woman, 1 is man
## Gender.bin = -1:
## contrast estimate SE df t.ratio p.value
## Cond_Race1 - (Cond_Race-1) -0.2719 0.0786 862 -3.457 0.0006
##
## Gender.bin = 1:
## contrast estimate SE df t.ratio p.value
## Cond_Race1 - (Cond_Race-1) 0.0555 0.0970 862 0.572 0.5672
##
## Results are averaged over the levels of: Cond_Trauma
warm.aov.ex <- lm(Warmth ~ PoliticalIdentitiy + Gender.bin + PoliticalIdentitiy*Cond_Race + PoliticalIdentitiy*Cond_Trauma + Gender.bin*Cond_Race + Gender.bin*Cond_Trauma + Cond_Race*Cond_Trauma,
data = data)
summary(aov(warm.aov.ex)) # -1 is woman, 1 is man
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 3.1 3.075 2.583 0.1084
## Gender.bin 1 4.8 4.821 4.050 0.0445 *
## Cond_Race 1 0.0 0.032 0.027 0.8705
## Cond_Trauma 1 0.2 0.238 0.200 0.6548
## PoliticalIdentitiy:Cond_Race 1 0.2 0.200 0.168 0.6821
## PoliticalIdentitiy:Cond_Trauma 1 0.0 0.001 0.001 0.9791
## Gender.bin:Cond_Race 1 1.6 1.624 1.364 0.2432
## Gender.bin:Cond_Trauma 1 0.2 0.157 0.132 0.7166
## Cond_Race:Cond_Trauma 1 0.2 0.162 0.136 0.7126
## Residuals 857 1020.3 1.191
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 42 observations deleted due to missingness
eta_squared(warm.aov.ex, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## --------------------------------------------------------------
## PoliticalIdentitiy | 3.00e-03 | [0.00, 1.00]
## Gender.bin | 4.70e-03 | [0.00, 1.00]
## Cond_Race | 3.10e-05 | [0.00, 1.00]
## Cond_Trauma | 2.33e-04 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Race | 1.96e-04 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Trauma | 7.98e-07 | [0.00, 1.00]
## Gender.bin:Cond_Race | 1.59e-03 | [0.00, 1.00]
## Gender.bin:Cond_Trauma | 1.54e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.58e-04 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(warm.aov.ex, partial=TRUE) # partial = true is default for this function
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ------------------------------------------------------------------
## PoliticalIdentitiy | 0.05 | [0.00, Inf]
## Gender.bin | 0.07 | [0.01, Inf]
## Cond_Race | 5.57e-03 | [0.00, Inf]
## Cond_Trauma | 0.02 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Race | 0.01 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Trauma | 8.93e-04 | [0.00, Inf]
## Gender.bin:Cond_Race | 0.04 | [0.00, Inf]
## Gender.bin:Cond_Trauma | 0.01 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.01 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
blame.aov.ex <- lm(Blame ~PoliticalIdentitiy + Gender.bin + PoliticalIdentitiy*Cond_Race + PoliticalIdentitiy*Cond_Trauma + Gender.bin*Cond_Race + Gender.bin*Cond_Trauma+ Cond_Race*Cond_Trauma,
data = data)
summary(aov(blame.aov.ex))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 22.3 22.299 29.592 0.0000000695 ***
## Gender.bin 1 5.4 5.425 7.200 0.00743 **
## Cond_Race 1 0.5 0.456 0.605 0.43703
## Cond_Trauma 1 1.8 1.829 2.428 0.11958
## PoliticalIdentitiy:Cond_Race 1 0.0 0.001 0.001 0.97191
## PoliticalIdentitiy:Cond_Trauma 1 0.5 0.487 0.646 0.42168
## Gender.bin:Cond_Race 1 0.1 0.090 0.119 0.72995
## Gender.bin:Cond_Trauma 1 0.5 0.541 0.718 0.39719
## Cond_Race:Cond_Trauma 1 0.1 0.079 0.105 0.74626
## Residuals 862 649.5 0.754
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
eta_squared(blame.aov.ex, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## --------------------------------------------------------------
## PoliticalIdentitiy | 0.03 | [0.02, 1.00]
## Gender.bin | 8.28e-03 | [0.00, 1.00]
## Cond_Race | 7.01e-04 | [0.00, 1.00]
## Cond_Trauma | 2.81e-03 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Race | 1.44e-06 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Trauma | 7.49e-04 | [0.00, 1.00]
## Gender.bin:Cond_Race | 1.38e-04 | [0.00, 1.00]
## Gender.bin:Cond_Trauma | 8.32e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.22e-04 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(blame.aov.ex)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ------------------------------------------------------------------
## PoliticalIdentitiy | 0.19 | [0.13, Inf]
## Gender.bin | 0.09 | [0.04, Inf]
## Cond_Race | 0.03 | [0.00, Inf]
## Cond_Trauma | 0.05 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Race | 1.20e-03 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Trauma | 0.03 | [0.00, Inf]
## Gender.bin:Cond_Race | 0.01 | [0.00, Inf]
## Gender.bin:Cond_Trauma | 0.03 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 0.01 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
comp.aov.ex <- lm(Competent ~ PoliticalIdentitiy + Gender.bin + PoliticalIdentitiy*Cond_Race + PoliticalIdentitiy*Cond_Trauma + Gender.bin*Cond_Race + Gender.bin*Cond_Trauma+ Cond_Race*Cond_Trauma,
data = data)
summary(aov(comp.aov.ex))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.1 0.07 0.057 0.8121
## Gender.bin 1 4.2 4.18 3.355 0.0673 .
## Cond_Race 1 0.0 0.02 0.012 0.9117
## Cond_Trauma 1 49.3 49.31 39.570 0.000000000505 ***
## PoliticalIdentitiy:Cond_Race 1 0.3 0.32 0.255 0.6135
## PoliticalIdentitiy:Cond_Trauma 1 3.2 3.22 2.581 0.1085
## Gender.bin:Cond_Race 1 11.0 10.96 8.796 0.0031 **
## Gender.bin:Cond_Trauma 1 0.1 0.15 0.117 0.7322
## Cond_Race:Cond_Trauma 1 0.0 0.00 0.001 0.9698
## Residuals 854 1064.2 1.25
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 45 observations deleted due to missingness
eta_squared(comp.aov.ex, partial = TRUE) # partial η²
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## --------------------------------------------------------------
## PoliticalIdentitiy | 6.62e-05 | [0.00, 1.00]
## Gender.bin | 3.91e-03 | [0.00, 1.00]
## Cond_Race | 1.44e-05 | [0.00, 1.00]
## Cond_Trauma | 0.04 | [0.02, 1.00]
## PoliticalIdentitiy:Cond_Race | 2.99e-04 | [0.00, 1.00]
## PoliticalIdentitiy:Cond_Trauma | 3.01e-03 | [0.00, 1.00]
## Gender.bin:Cond_Race | 0.01 | [0.00, 1.00]
## Gender.bin:Cond_Trauma | 1.37e-04 | [0.00, 1.00]
## Cond_Race:Cond_Trauma | 1.68e-06 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cohens_f(comp.aov.ex)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Cohen's f (partial) | 95% CI
## ------------------------------------------------------------------
## PoliticalIdentitiy | 8.14e-03 | [0.00, Inf]
## Gender.bin | 0.06 | [0.00, Inf]
## Cond_Race | 3.80e-03 | [0.00, Inf]
## Cond_Trauma | 0.22 | [0.16, Inf]
## PoliticalIdentitiy:Cond_Race | 0.02 | [0.00, Inf]
## PoliticalIdentitiy:Cond_Trauma | 0.05 | [0.00, Inf]
## Gender.bin:Cond_Race | 0.10 | [0.05, Inf]
## Gender.bin:Cond_Trauma | 0.01 | [0.00, Inf]
## Cond_Race:Cond_Trauma | 1.30e-03 | [0.00, Inf]
##
## - One-sided CIs: upper bound fixed at [Inf].
comp.genderxrace <- emmeans(comp.aov.ex, ~ Gender.bin*Cond_Race) #calculate predicted means for gender by target race
contrast(comp.genderxrace, "revpairwise",by="Gender.bin")
## Gender.bin = -1:
## contrast estimate SE df t.ratio p.value
## Cond_Race1 - (Cond_Race-1) -0.188 0.0981 854 -1.919 0.0553
##
## Gender.bin = 1:
## contrast estimate SE df t.ratio p.value
## Cond_Race1 - (Cond_Race-1) 0.273 0.1210 854 2.260 0.0240
##
## Results are averaged over the levels of: Cond_Trauma
data %>% # Since there were several interactions between target race and participant gender, looking at mean scores across dependent variables
filter(!is.na(Gender.bin)) %>%
group_by(Gender.bin, Cond_Race) %>%
summarise(
blame_m = mean(Blame, na.rm = TRUE),
warmth_m = mean(Warmth, na.rm = TRUE),
competence_m = mean(Competent, na.rm = TRUE),
likability_m = mean(Likability, na.rm = TRUE),
.groups = "drop"
)
## # A tibble: 4 × 6
## Gender.bin Cond_Race blame_m warmth_m competence_m likability_m
## <fct> <fct> <dbl> <dbl> <dbl> <dbl>
## 1 -1 -1 1.85 5.08 5.39 5.66
## 2 -1 1 1.91 5 5.21 5.39
## 3 1 -1 2.05 4.84 5.02 5.33
## 4 1 1 2.07 4.94 5.29 5.38
data %>% # SDs
filter(!is.na(Gender.bin)) %>%
group_by(Gender.bin, Cond_Race) %>%
summarise(
blame_sd = sd(Blame, na.rm = TRUE),
warmth_sd = sd(Warmth, na.rm = TRUE),
competence_sd = sd(Competent, na.rm = TRUE),
likability_sd = sd(Likability, na.rm = TRUE),
.groups = "drop"
)
## # A tibble: 4 × 6
## Gender.bin Cond_Race blame_sd warmth_sd competence_sd likability_sd
## <fct> <fct> <dbl> <dbl> <dbl> <dbl>
## 1 -1 -1 0.866 1.06 1.13 0.835
## 2 -1 1 0.892 1.08 1.17 0.939
## 3 1 -1 0.896 1.09 1.14 0.867
## 4 1 1 0.870 1.14 1.09 0.950
# -1 is woman; 1 is man
manova.2 <- manova(cbind(Likability, Warmth, Blame, Competent) ~ Cond_Race * Cond_Trauma, data = data)
summary(manova.2, test = "Pillai")
## Df Pillai approx F num Df den Df Pr(>F)
## Cond_Race 1 0.008907 2.0087 4 894 0.09129 .
## Cond_Trauma 1 0.068391 16.4076 4 894 0.000000000000558 ***
## Cond_Race:Cond_Trauma 1 0.002694 0.6038 4 894 0.65997
## Residuals 897
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
like.aov.2 <- lm(Likability ~ Cond_Race * Cond_Trauma,
data = data)
summary(aov(like.aov.2))
## Df Sum Sq Mean Sq F value Pr(>F)
## Cond_Race 1 4.7 4.672 5.627 0.0179 *
## Cond_Trauma 1 0.0 0.045 0.055 0.8151
## Cond_Race:Cond_Trauma 1 1.3 1.269 1.528 0.2167
## Residuals 905 751.4 0.830
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
warm.aov.2 <- lm(Warmth ~ Cond_Race * Cond_Trauma,
data = data)
summary(aov(warm.aov.2))
## Df Sum Sq Mean Sq F value Pr(>F)
## Cond_Race 1 0.0 0.0003 0.000 0.987
## Cond_Trauma 1 0.0 0.0227 0.019 0.890
## Cond_Race:Cond_Trauma 1 0.6 0.5871 0.495 0.482
## Residuals 900 1067.6 1.1862
## 5 observations deleted due to missingness
blame.aov.2 <- lm(Blame ~ Cond_Race * Cond_Trauma,
data = data)
summary(aov(blame.aov.2))
## Df Sum Sq Mean Sq F value Pr(>F)
## Cond_Race 1 0.8 0.7972 1.029 0.311
## Cond_Trauma 1 1.4 1.3548 1.748 0.186
## Cond_Race:Cond_Trauma 1 0.0 0.0193 0.025 0.875
## Residuals 905 701.4 0.7750
comp.aov.2 <- lm(Competent ~ Cond_Race * Cond_Trauma,
data = data)
summary(aov(comp.aov.2))
## Df Sum Sq Mean Sq F value Pr(>F)
## Cond_Race 1 0.0 0.00 0.000 0.992
## Cond_Trauma 1 51.2 51.15 40.567 0.000000000303 ***
## Cond_Race:Cond_Trauma 1 0.0 0.00 0.002 0.961
## Residuals 897 1131.1 1.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 8 observations deleted due to missingness
# So conducting the same analyses without including the covariates did not change the pattern of results
# Earlier we used Maholanobis distance to identify 43 multivariate outliers. For this sensitivity analysis we are removing the outliers.
data.noOut <- data %>%
dplyr::filter(outlier== FALSE) # creating new copy of dataframe that removed outliers
manova.3 <- manova(cbind(Likability, Warmth, Blame, Competent) ~ PoliticalIdentitiy + Gender.bin + Cond_Race * Cond_Trauma, data = data.noOut)
summary(manova.3, test = "Pillai")
## Df Pillai approx F num Df den Df Pr(>F)
## PoliticalIdentitiy 1 0.051227 10.9605 4 812 0.0000000116507 ***
## Gender.bin 1 0.015529 3.2021 4 812 0.01271 *
## Cond_Race 1 0.009786 2.0062 4 812 0.09176 .
## Cond_Trauma 1 0.061843 13.3817 4 812 0.0000000001447 ***
## Cond_Race:Cond_Trauma 1 0.002240 0.4556 4 812 0.76831
## Residuals 815
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
like.aov.3 <- lm(Likability ~ PoliticalIdentitiy + Gender.bin + Cond_Race * Cond_Trauma,
data = data.noOut)
summary(aov(like.aov.3))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.4 0.401 0.550 0.4583
## Gender.bin 1 3.2 3.228 4.436 0.0355 *
## Cond_Race 1 3.9 3.855 5.297 0.0216 *
## Cond_Trauma 1 0.0 0.020 0.027 0.8693
## Cond_Race:Cond_Trauma 1 0.8 0.790 1.086 0.2977
## Residuals 815 593.1 0.728
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
warm.aov.3 <- lm(Warmth ~ PoliticalIdentitiy + Gender.bin + Cond_Race * Cond_Trauma,
data = data.noOut)
summary(aov(warm.aov.3))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 8.4 8.400 7.875 0.00513 **
## Gender.bin 1 2.5 2.506 2.349 0.12572
## Cond_Race 1 0.2 0.178 0.166 0.68335
## Cond_Trauma 1 0.2 0.244 0.229 0.63274
## Cond_Race:Cond_Trauma 1 0.2 0.233 0.218 0.64058
## Residuals 815 869.3 1.067
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
summary(warm.aov.3)
##
## Call:
## lm(formula = Warmth ~ PoliticalIdentitiy + Gender.bin + Cond_Race *
## Cond_Trauma, data = data.noOut)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.06256 -0.91953 -0.03643 0.93226 2.25997
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.8649547 0.1000477 48.626 < 0.0000000000000002 ***
## PoliticalIdentitiy 0.0494009 0.0174163 2.836 0.00467 **
## Gender.bin1 -0.1115425 0.0738036 -1.511 0.13109
## Cond_Race1 -0.0627849 0.1013180 -0.620 0.53564
## Cond_Trauma1 0.0005202 0.1024185 0.005 0.99595
## Cond_Race1:Cond_Trauma1 0.0674425 0.1443982 0.467 0.64058
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.033 on 815 degrees of freedom
## (37 observations deleted due to missingness)
## Multiple R-squared: 0.01312, Adjusted R-squared: 0.007069
## F-statistic: 2.168 on 5 and 815 DF, p-value: 0.05579
blame.aov.3 <- lm(Blame ~ PoliticalIdentitiy + Gender.bin + Cond_Race * Cond_Trauma,
data = data.noOut)
summary(aov(blame.aov.3))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 19.4 19.400 32.393 0.0000000176 ***
## Gender.bin 1 6.1 6.106 10.195 0.00146 **
## Cond_Race 1 0.2 0.179 0.299 0.58460
## Cond_Trauma 1 0.4 0.450 0.751 0.38647
## Cond_Race:Cond_Trauma 1 0.0 0.000 0.000 0.98724
## Residuals 815 488.1 0.599
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
comp.aov.3 <- lm(Competent ~ PoliticalIdentitiy + Gender.bin + Cond_Race * Cond_Trauma,
data = data.noOut)
summary(aov(comp.aov.3))
## Df Sum Sq Mean Sq F value Pr(>F)
## PoliticalIdentitiy 1 0.7 0.73 0.669 0.4137
## Gender.bin 1 4.9 4.88 4.486 0.0345 *
## Cond_Race 1 0.0 0.00 0.000 0.9971
## Cond_Trauma 1 31.8 31.79 29.217 0.000000085 ***
## Cond_Race:Cond_Trauma 1 0.0 0.01 0.008 0.9308
## Residuals 815 886.8 1.09
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 37 observations deleted due to missingness
data$Qual.AASV<- data$`FL_100_DO_AA-SV`
data$Qual.AAT<- data$`FL_100_DO_AA-T`
data$Qual.WSV<- data$`FL_100_DO_W-SV`
data$Qual.WT<- data$`FL_100_DO_W-T`
cond.checks<- data %>%
dplyr::select(Condition, Cond_Race, Cond_Trauma, Qual.AASV, Qual.AAT, Qual.WSV, Qual.WT, AASV_Likability_1, AAT_Likability_1, WSV_Likability_1, WT_Likability_1)
write.csv(cond.checks,"~/Downloads/CondChecks.csv", row.names = FALSE)
sessionInfo()
## R version 4.4.3 (2025-02-28)
## Platform: x86_64-apple-darwin20
## Running under: macOS Monterey 12.6.7
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## time zone: America/Chicago
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] emmeans_1.11.0 effectsize_1.0.0 ggplot2_3.5.2 biotools_4.3
## [5] MASS_7.3-65 rstatix_0.7.2 car_3.1-3 carData_3.0-5
## [9] Hmisc_5.2-3 gtsummary_2.2.0 tidyr_1.3.1 dplyr_1.1.4
## [13] readr_2.1.5
##
## loaded via a namespace (and not attached):
## [1] tidyselect_1.2.1 psych_2.5.3 farver_2.1.1 fastmap_1.2.0
## [5] TH.data_1.1-2 bayestestR_0.15.0 digest_0.6.35 rpart_4.1.24
## [9] estimability_1.5.1 lifecycle_1.0.4 cluster_2.1.8 survival_3.8-3
## [13] magrittr_2.0.3 compiler_4.4.3 rlang_1.1.5 sass_0.4.9
## [17] tools_4.4.3 utf8_1.2.4 yaml_2.3.8 gt_0.11.1
## [21] data.table_1.15.4 knitr_1.50 labeling_0.4.3 htmlwidgets_1.6.4
## [25] bit_4.0.5 mnormt_2.1.1 xml2_1.3.6 multcomp_1.4-25
## [29] abind_1.4-5 withr_3.0.0 foreign_0.8-90 purrr_1.0.2
## [33] nnet_7.3-20 grid_4.4.3 datawizard_1.0.2 fansi_1.0.6
## [37] xtable_1.8-4 e1071_1.7-16 colorspace_2.1-0 scales_1.3.0
## [41] insight_1.1.0 mvtnorm_1.2-4 cli_3.6.4 rmarkdown_2.29
## [45] crayon_1.5.2 generics_0.1.3 rstudioapi_0.16.0 tzdb_0.4.0
## [49] parameters_0.24.0 commonmark_1.9.1 cachem_1.1.0 proxy_0.4-27
## [53] stringr_1.5.1 splines_4.4.3 parallel_4.4.3 base64enc_0.1-3
## [57] vctrs_0.6.5 Matrix_1.7-2 sandwich_3.1-0 boot_1.3-31
## [61] jsonlite_1.9.1 hms_1.1.3 bit64_4.0.5 Formula_1.2-5
## [65] htmlTable_2.4.2 jquerylib_0.1.4 glue_1.8.0 codetools_0.2-20
## [69] stringi_1.8.4 gtable_0.3.5 munsell_0.5.1 tibble_3.2.1
## [73] pillar_1.9.0 htmltools_0.5.8.1 R6_2.5.1 vroom_1.6.5
## [77] evaluate_0.23 lattice_0.22-6 markdown_1.13 backports_1.4.1
## [81] cards_0.6.0 broom_1.0.8 bslib_0.7.0 class_7.3-23
## [85] cardx_0.2.4 coda_0.19-4.1 gridExtra_2.3 nlme_3.1-168
## [89] checkmate_2.3.1 xfun_0.52 zoo_1.8-12 pkgconfig_2.0.3