#Loading and installing packages
pacman::p_load(tidyverse, MASS,
               magrittr, robustHD,
               tibble, psych,
               kableExtra, e1071,
               knitr, tidyr,
               lavaan, semPlot,
               jtools, car,
               lmtest, ggpubr,
               FSA, rstatix,
               writexl, readxl, 
               rcompanion, coin, lm.beta, 
               rstatix, Hmisc, pwr)
#Making these data numeric so they filter correctly
mergedData$`Duration (in seconds).x`<- as.numeric(mergedData$`Duration (in seconds).x`)
mergedData$Consent.x<- as.numeric(mergedData$Consent.x)
mergedData$Q_RelevantIDDuplicateScore.x<- as.numeric(mergedData$Q_RelevantIDDuplicateScore.x)
mergedData$Relationship_length_1<- as.numeric(mergedData$Relationship_length_1)
mergedData$Q_RelevantIDFraudScore.x<- as.numeric(mergedData$Q_RelevantIDFraudScore.x)

median(mergedData$`Duration (in seconds).x`) - (3*(sd(mergedData$`Duration (in seconds).x`, na.rm=T))) #median response time is 529 (or 8.82 minutes)
## [1] -15909.42
sd(mergedData$`Duration (in seconds).x`)
## [1] 5479.475
length(which(mergedData$Consent.x==2))
## [1] 0
length(which(mergedData$Q_RelevantIDDuplicateScore.x>=75))
## [1] 2
length(which(mergedData$Relationship_length_1 < 1))
## [1] 5
length(which(mergedData$Q_RelevantIDFraudScore.x>=30))
## [1] 14
length(which(mergedData$`Duration (in seconds).x` <180))
## [1] 13
clean.merged.data <- mergedData %>%
  dplyr::filter(Consent.x == 1, #(n=0) 
                `Duration (in seconds).x`>=180, #participants that took survey in less than 3 minutes are removed (n=13)
                Q_RelevantIDDuplicateScore.x<75, #getting rid of duplicate participants (n=2)
                Relationship_length_1>0,#getting rid of participants that have been in relationship under 1 year (n=5)
                Q_RelevantIDFraudScore.x< 30) #A score greater than or equal to 30 means the response is likely fraudulent and a bot (n=13)

             
data<- clean.merged.data %>%
  dplyr::filter(!is.na(SV_1.x),
                !is.na(SV_2.x),
                !is.na(SV_3),
                !is.na(SV_4.x),
                !is.na(ACE_1.x),
                !is.na(ACE_2),
                !is.na(ACE_3)) #getting rid of people who didn't complete all the asa/csa items (n=50)


data %<>% dplyr::mutate_if(is.factor,as.character)

which(colnames(data)=="SV_perp_8") # identifies the column number of different variables
## [1] 127
data[,c(13:15, 42:127, 148:154)] %<>% dplyr::mutate_if(is.character,as.numeric) #making only select columns numeric

Sexual Violence Variables

data <- data %>% 
  rename(SV_1 = SV_1.x,#renaming the SV variables
         SV_2 = SV_2.x,
         SV_4=SV_4.x,
         SV_1.pre=SV_1.y,
         SV_2.pre=SV_2.y,
         SV_3.pre=SV_4.y,
         SV_4.pre=SV_5,
         ACE.pre=ACE_1.y,
         ACE_1=ACE_1.x)

data[,c(131:133)] %<>% dplyr::mutate_if(is.character,as.numeric) #making only select columns numeric



# First creating true false variables for each ASA item
data$SV_1_log<- data$SV_1==1 | data$SV_1==2 | data$SV_1==3 | data$SV_1==4
data$SV_2_log<- data$SV_2==1 | data$SV_2==2 | data$SV_2==3 | data$SV_2==4
data$SV_3_log<- data$SV_3==1 | data$SV_3==2 | data$SV_3==3 | data$SV_3==4
data$SV_4_log<- data$SV_4==1 | data$SV_4==2 | data$SV_4==3 | data$SV_4==4

# ASA item 
data$someASA<- data$SV_1_log==TRUE | data$SV_2_log==TRUE | data$SV_3_log==TRUE | data$SV_4_log==TRUE


# CSA items
data$someCSA<- data$ACE_1==1 | data$ACE_1==2 | data$ACE_2==1 | data$ACE_2==2 |data$ACE_3==1 | data$ACE_3==2

# ASA ONLY item
data$ASAonly<- data$someASA==TRUE & data$someCSA==FALSE

# CSA Only item
data$CSAonly<- data$someASA==FALSE & data$someCSA==TRUE

# Revictimized
data$revictimized<- data$someASA==TRUE & data$someCSA==TRUE

#Neither ASA nor CSA
data$NeitherASAnorCSA<- data$someASA==FALSE & data$someCSA==FALSE

################################# getting rid of CSA only group (n=27)##########################
data <- data %>%
  dplyr::filter(CSAonly==FALSE)

# SV 1 
kableExtra::kable(table(data$SV_1), booktabs = TRUE, col.names = c("Rape: Physical Force", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Rape: Physical Force Frequency
0 340
1 102
2 65
3 27
4 32
# SV 2
kableExtra::kable(table(data$SV_2), booktabs = TRUE, col.names = c("Attempted Rape: Physical Force", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Attempted Rape: Physical Force Frequency
0 358
1 105
2 58
3 13
4 32
# SV 3
kableExtra::kable(table(data$SV_3), booktabs = TRUE, col.names = c("Rape: Drugs or alcohol", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Rape: Drugs or alcohol Frequency
0 374
1 108
2 46
3 11
4 27
# SV 4 
kableExtra::kable(table(data$SV_4), booktabs = TRUE, col.names = c("Attempted Rape: Drugs or alcohol", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Attempted Rape: Drugs or alcohol Frequency
0 412
1 90
2 39
3 9
4 16
# SV 5
kableExtra::kable(table(data$SV_Rape), booktabs = TRUE, col.names = c("Self-Reported Rape", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Self-Reported Rape Frequency
0 361
1 205
# ACE 1
# This question reads, "How often did anyone at least 5 years older than you or an adult ever touch you sexually?
kableExtra::kable(table(data$ACE_1), booktabs = TRUE, col.names = c("CSA 1", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
CSA 1 Frequency
0 417
1 48
2 101
# ACE 2
# "How often did anyone at least 5 years older than you or an adult try to make you touch them sexually?"
kableExtra::kable(table(data$ACE_2), booktabs = TRUE, col.names = c("CSA 2", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
CSA 2 Frequency
0 442
1 41
2 83
# ACE 3
#"How often did anyone at least 5 years older than you or an adult force you to have sex?"
kableExtra::kable(table(data$ACE_3), booktabs = TRUE, col.names = c("CSA 3", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
CSA 3 Frequency
0 491
1 31
2 44
# ASA Only
kableExtra::kable(table(data$ASAonly), booktabs = TRUE, col.names = c("ASA Only", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
ASA Only Frequency
FALSE 368
TRUE 198
# Revictimized Group
kableExtra::kable(table(data$revictimized), booktabs = TRUE, col.names = c("Revictimized", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Revictimized Frequency
FALSE 413
TRUE 153
# Neither ASA nor CSA
kableExtra::kable(table(data$NeitherASAnorCSA), booktabs = TRUE, col.names = c("Neither ASA nor CSA", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE)
Neither ASA nor CSA Frequency
FALSE 351
TRUE 215
# Assault timing variables
data <- data %>%
dplyr::mutate(SV_1_timing = (SV_1_timing_1 + (SV_1_timing_2/12))) #creating timing variables

data <- data %>%
dplyr::mutate(SV_2_timing = (SV_2_timing_1 + (SV_2_timing_2/12)))

data <- data %>%
dplyr::mutate(SV_3_timing = (SV_3_timing_1 + (SV_3_timing_2/12)))

data <- data %>%
dplyr::mutate(SV_4_timing = (SV_4_timing_1 + (SV_4_timing_2/12)))

data %>%
  dplyr::select(SV_1_timing, SV_2_timing, SV_3_timing, SV_4_timing)%>%
  psych::describe(na.rm=TRUE) %>%
  as.data.frame() %>% 
  dplyr::select("n", "mean", "sd", "median", "min", "max", "range", "skew", "kurtosis") %>%
  kableExtra::kable(caption= "Descriptive Statistics for ASA Timing", digits = 2) %>%
  kable_styling(bootstrap_options = "striped", full_width = TRUE)
Descriptive Statistics for ASA Timing
n mean sd median min max range skew kurtosis
SV_1_timing 225 13.34 11.03 10.00 0 56.33 56.33 1.40 1.87
SV_2_timing 207 12.31 10.07 9.83 0 56.17 56.17 1.46 2.33
SV_3_timing 189 11.74 9.23 9.00 0 56.17 56.17 1.46 3.02
SV_4_timing 153 12.38 10.16 10.00 0 56.17 56.17 1.61 3.13
# Perp gender
length(which(data$SV_gender_1==1)) # cis men (n = 346)
## [1] 346
length(which(data$SV_gender_2==1)) # cis women (n = 17)
## [1] 17
length(which(data$SV_gender_3==1)) # non-binary, genderqueer, agender, or gend fluid (n=3)
## [1] 3
length(which(data$SV_gender_4==1)) # trans man (n=0)
## [1] 0
length(which(data$SV_gender_5==1)) # trans woman (n=4)
## [1] 4
length(which(data$SV_gender_6==1)) #gender not listed above (n = 1)
## [1] 1
# Perp relationship 
#see "other" responses coding doc

######acknowledged victims 
data$RapeItems<- data$SV_1_log==TRUE | data$SV_3_log==TRUE | data$ACE_3==1 | data$ACE_3==2 #creating variable such that if they experienced completed rape or forced sex in ACE item then they were considered rape victim
data<- data %>%
  mutate(unacknowledged = case_when(
    data$RapeItems==TRUE & data$SV_Rape==0 ~ 0,
    data$RapeItems==TRUE & data$SV_Rape==1 ~ 1,
    data$RapeItems==FALSE & data$SV_Rape==0 ~ 3 # this number includes people who experienced ASA just not completed rape
  ))
table(data$unacknowledged)
## 
##   0   1   3 
## 108 192 253

Demographics

# Relationship length variable
data <- data %>%
dplyr::mutate(relLength = (Relationship_length_1 + (Relationship_length_2/12))) #creating relationship length variable
data$relLength<- round(data$relLength, 2)
data$relLength<- as.numeric(data$relLength)
data$Age_1<- as.numeric(data$Age_1)



# relationship length and age descriptives
data %>%
  dplyr::select(relLength, Age_1)%>%
  psych::describe(na.rm=TRUE) %>%
  as.data.frame() %>% 
  dplyr::select("n", "mean", "sd", "median", "min", "max", "range", "skew", "kurtosis") %>%
  kableExtra::kable(caption= "Age and Relationship Length Descriptives", digits = 2) %>%
  kable_styling(bootstrap_options = "striped", full_width = TRUE)
Age and Relationship Length Descriptives
n mean sd median min max range skew kurtosis
relLength 565 8.05 7.91 5.33 1 48.92 47.92 2.24 5.94
Age_1 566 35.31 12.50 32.00 18 78.00 60.00 1.00 0.39
# Relationship status
data$Relationship_type<-as.numeric(data$Relationship_type)
data$Relationship_type <- factor(data$Relationship_type,
                                levels=c(1, 2, 3, 4, 5, 6),
                                labels=c("Friends with benefits", "Casually dating", "Seriously dating", "Living together", "Engaged", "Married"))
table(data$Relationship_type)
## 
## Friends with benefits       Casually dating      Seriously dating 
##                     4                     9                   150 
##       Living together               Engaged               Married 
##                   262                    21                   120
prop.table(table(data$Relationship_type))
## 
## Friends with benefits       Casually dating      Seriously dating 
##           0.007067138           0.015901060           0.265017668 
##       Living together               Engaged               Married 
##           0.462897527           0.037102473           0.212014134
#Sexual Orientation
data$Orientation<-as.numeric(data$Orientation)
data$Orientation <- factor(data$Orientation,
                                levels=c(1, 2, 3, 4),
                                labels=c("Lesbian or gay", "Bisexual or pansexual", "Sexual or heterosexual", "Other"))
table(data$Orientation)
## 
##         Lesbian or gay  Bisexual or pansexual Sexual or heterosexual 
##                     35                    161                    356 
##                  Other 
##                     14
#see other responses coding for frequencies, one person recoded from 'other' to 'bisexual or panromantic' (so 1 more in that category and 1 less in other in final table) 

#Education
data$Education<-as.numeric(data$Education)
data$Education<- factor(data$Education,
                        levels=c(1.0, 2.0, 6.0, 3.0, 4.0, 7.0, 8.0, 9.0),
                        labels=c("Some high school", "High school degree", "Associate's degree", "Some college", "Bachelor's degree", "Some graduate school", "Master's degree", "Doctorate degree"))
table(data$Education)
## 
##     Some high school   High school degree   Associate's degree 
##                    5                   78                   47 
##         Some college    Bachelor's degree Some graduate school 
##                  141                  202                    9 
##      Master's degree     Doctorate degree 
##                   63                   21
prop.table(table(data$Education))
## 
##     Some high school   High school degree   Associate's degree 
##          0.008833922          0.137809187          0.083038869 
##         Some college    Bachelor's degree Some graduate school 
##          0.249116608          0.356890459          0.015901060 
##      Master's degree     Doctorate degree 
##          0.111307420          0.037102473
#Household Income
data$Income<-as.numeric(data$Income)
data$Income<- factor(data$Income,
                        levels=c(1, 2, 3, 4, 5),
                        labels=c("Less than $15,000", "$15,000-34,999", "$35,000-49,999", "$50,000-74,999", "$75,000 or more"))
table(data$Income)
## 
## Less than $15,000    $15,000-34,999    $35,000-49,999    $50,000-74,999 
##                47                98                94               127 
##   $75,000 or more 
##               200
prop.table(table(data$Income))
## 
## Less than $15,000    $15,000-34,999    $35,000-49,999    $50,000-74,999 
##        0.08303887        0.17314488        0.16607774        0.22438163 
##   $75,000 or more 
##        0.35335689
# Gender
Gender<- c("Cisgender woman", "Nonbinary, genderqueer, agender, or genderfluid", "Transgender man", "Transgender woman", "Questioning", "Other")
#See other responses coding for frequencies

# Race (!!!!!!!!!UPDATE!!!!!!!!!!)
length(which(data$Race_1==1))
## [1] 3
length(which(data$Race_2==1))
## [1] 39
length(which(data$Race_3==1))
## [1] 53
length(which(data$Race_4==1))
## [1] 55
length(which(data$Race_5==1))
## [1] 4
length(which(data$Race_6==1))
## [1] 8
length(which(data$Race_7==1))
## [1] 469
length(which(data$Race_8==1))
## [1] 0
#1 and 6 accidentally repeated, fixing it
length(which(data$Race_1==1 & data$Race_6==1)) #so only 1 person aid yes to option 1 and 6
## [1] 1
#8 people said yes to 6 and 3 to q1, so 8+3=11-1=10 because removing repeat

Race<- c("Asian American or Asian", "Black or African American", "Latinx or Hispanic", "Middle Eastern or North African", "Native American, Hawaiian Native/Pacific Islander, or Alaskan Native", "White or European American", "Other")
RaceFrequency<- c(39, 53, 55, 4, 10, 469, 0)
Racedata<- cbind(Race, RaceFrequency)
kableExtra::kable(Racedata, booktabs = TRUE, col.names = c("Race", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE) 
Race Frequency
Asian American or Asian 39
Black or African American 53
Latinx or Hispanic 55
Middle Eastern or North African 4
Native American, Hawaiian Native/Pacific Islander, or Alaskan Native 10
White or European American 469
Other 0
# Employment (!!!!!!!!!UPDATE!!!!!!!!!!)
length(which(data$Employment_1==1))
## [1] 83
length(which(data$Employment_2==1))
## [1] 315
length(which(data$Employment_3==1))
## [1] 120
length(which(data$Employment_4==1))
## [1] 89
length(which(data$Employment_5==1))
## [1] 14
length(which(data$Employment_6==1))
## [1] 3
Employment<- c("Student", "Full-time employed", "Part-time employed", "Not employed", "Retired", "Temporarily laid off")
Employmentfrequency<- c(83, 315, 120, 89, 14, 3)
Employmentdata<- cbind(Employment, Employmentfrequency)
kableExtra::kable(Employmentdata, booktabs = TRUE, col.names = c("Employment", "Frequency")) %>%
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE) 
Employment Frequency
Student 83
Full-time employed 315
Part-time employed 120
Not employed 89
Retired 14
Temporarily laid off 3

Scale creation

#################PRQC Scale and Subscales#######################
data <- data %>%
  rowwise() %>%
  mutate(PRQC    = mean(c(PRQC_1, PRQC_2, PRQC_3, PRQC_4, PRQC_5, PRQC_6, PRQC_7, PRQC_8, PRQC_9, PRQC_10, PRQC_11, PRQC_12, PRQC_13, PRQC_14, PRQC_15, PRQC_16, PRQC_17, PRQC_18), na.rm = TRUE),
         Satisfaction = mean(c(PRQC_1, PRQC_2, PRQC_3), na.rm = TRUE),
         Commitment      = mean(c(PRQC_4, PRQC_5, PRQC_6), na.rm = TRUE),
         Intimacy   = mean(c(PRQC_7, PRQC_8, PRQC_9), na.rm = TRUE),
         Trust = mean(c(PRQC_10, PRQC_11, PRQC_12), na.rm = TRUE),
         Passion = mean(c(PRQC_13, PRQC_14, PRQC_15), na.rm = TRUE),
         Love = mean(c(PRQC_16, PRQC_17, PRQC_18), na.rm = TRUE))%>%
  ungroup()

#################### Attachment################### 
#Reverse coding
data <- data %>%
  dplyr::mutate(AAQ_1.r = (8 - AAQ_1))
data <- data %>%
  dplyr::mutate(AAQ_3.r = (8 - AAQ_3))
data <- data %>%
  dplyr::mutate(AAQ_4.r = (8 - AAQ_4))
data <- data %>%
  dplyr::mutate(AAQ_12.r = (8 - AAQ_12))
data <- data %>%
  dplyr::mutate(AAQ_14.r = (8 - AAQ_14))
data <- data %>%
  dplyr::mutate(AAQ_16.r = (8 - AAQ_16))
data <- data %>%
  dplyr::mutate(AAQ_17.r = (8 - AAQ_17))
#Anxiety subscale
data <- data %>%
  rowwise() %>%
  mutate(AAQ.ANX    = mean(c(AAQ_4.r, AAQ_10, AAQ_11, AAQ_12.r, AAQ_13, AAQ_14.r, AAQ_15, AAQ_16.r, AAQ_17.r), na.rm = TRUE))%>%
  ungroup()
#Avoidance subscale
data <- data %>%
  rowwise() %>%
  mutate(AAQ.AV    = mean(c(AAQ_1.r, AAQ_2, AAQ_3.r, AAQ_5, AAQ_6, AAQ_7, AAQ_8, AAQ_9), na.rm = TRUE))%>%
  ungroup()


############### NSSS-S Scale######################
# No reverse-coded items
data <- data %>%
  rowwise() %>%
  mutate(NSSS    = mean(c(`NSSS-S_1`, `NSSS-S_2`, `NSSS-S_3`, `NSSS-S_4`, `NSSS-S_5`,  `NSSS-S_6`, `NSSS-S_7`, `NSSS-S_8`, `NSSS-S_9`, `NSSS-S_10`, `NSSS-S_11`, `NSSS-S_12`), na.rm = TRUE))%>%
  ungroup()

############################ Brief PRI-8###########################################
# There was issue with coding in qualtrics where participants saw 0-5 scale but 
#coding was as follows (what participants should of seen, what they actually saw): 
# 0=1, 1=2, 2=3, 3=4, 4=5, 5=7, need to fix
#Recoding values
data <- data %>%
  mutate(
    PRI_1  = dplyr::recode(`Brief PRI-8_1`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_2  = dplyr::recode(`Brief PRI-8_2`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_3  = dplyr::recode(`Brief PRI-8_3`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_4  = dplyr::recode(`Brief PRI-8_4`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_5  = dplyr::recode(`Brief PRI-8_5`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_6  = dplyr::recode(`Brief PRI-8_6`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_7  = dplyr::recode(`Brief PRI-8_7`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))

data <- data %>%
  mutate(
    PRI_8  = dplyr::recode(`Brief PRI-8_8`, "1"=0, "2"=1, "3"=2, "4"=3, "5"=4, "7"=5))


# Partner responsiveness
data <- data %>%
  rowwise() %>%
  mutate(PRI_R    = mean(c(PRI_1, PRI_2, PRI_3, PRI_4), na.rm = TRUE))%>%
  ungroup()

# Partner Insensitivity
data <- data %>%
  rowwise() %>%
  mutate(PRI_I    = mean(c(PRI_5, PRI_6, PRI_7, PRI_8), na.rm = TRUE))%>%
  ungroup()

# Recoding insensitivity items
data <- data %>%
  dplyr::mutate(PRI_5.r = (5 - PRI_5))
data <- data %>%
  dplyr::mutate(PRI_6.r = (5 - PRI_6))
data <- data %>%
  dplyr::mutate(PRI_7.r = (5 - PRI_7))
data <- data %>%
  dplyr::mutate(PRI_8.r = (5 - PRI_8))

data <- data %>%
  rowwise() %>%
  mutate(PRI_total    = mean(c(PRI_1, PRI_2, PRI_3, PRI_4, PRI_5.r, PRI_6.r, PRI_7.r, PRI_8.r), na.rm = TRUE))%>%
  ungroup()

Scale reliabilities

#PRQC
data %>%
  select(PRQC_1:PRQC_18) %>%
  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.96      0.97    0.99      0.63  31 0.0022  5.8 1.1     0.64
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.96  0.96  0.97
## Duhachek  0.96  0.96  0.97
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## PRQC_1       0.96      0.97    0.98      0.62  28   0.0024 0.018  0.63
## PRQC_2       0.96      0.97    0.98      0.63  28   0.0024 0.018  0.62
## PRQC_3       0.96      0.97    0.98      0.62  28   0.0024 0.018  0.62
## PRQC_4       0.96      0.97    0.98      0.64  30   0.0023 0.017  0.65
## PRQC_5       0.96      0.97    0.98      0.63  29   0.0023 0.017  0.65
## PRQC_6       0.96      0.97    0.98      0.63  29   0.0023 0.017  0.65
## PRQC_7       0.96      0.97    0.99      0.64  30   0.0023 0.018  0.65
## PRQC_8       0.96      0.97    0.98      0.63  29   0.0024 0.019  0.63
## PRQC_9       0.96      0.97    0.98      0.63  28   0.0024 0.019  0.62
## PRQC_10      0.96      0.97    0.99      0.64  30   0.0023 0.018  0.65
## PRQC_11      0.96      0.97    0.98      0.63  29   0.0023 0.018  0.65
## PRQC_12      0.96      0.97    0.98      0.64  30   0.0023 0.018  0.65
## PRQC_13      0.96      0.97    0.98      0.63  29   0.0023 0.018  0.65
## PRQC_14      0.96      0.97    0.98      0.65  31   0.0022 0.015  0.66
## PRQC_15      0.97      0.97    0.98      0.65  31   0.0021 0.014  0.66
## PRQC_16      0.96      0.97    0.99      0.64  30   0.0023 0.018  0.65
## PRQC_17      0.96      0.97    0.98      0.63  29   0.0023 0.019  0.64
## PRQC_18      0.96      0.97    0.98      0.63  29   0.0023 0.018  0.63
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean   sd
## PRQC_1  566  0.89  0.89  0.89   0.87  5.7 1.34
## PRQC_2  566  0.88  0.88  0.88   0.86  5.8 1.35
## PRQC_3  566  0.89  0.90  0.90   0.88  5.7 1.35
## PRQC_4  566  0.73  0.76  0.76   0.71  6.5 0.99
## PRQC_5  566  0.77  0.80  0.80   0.75  6.4 1.03
## PRQC_6  566  0.77  0.80  0.80   0.75  6.4 1.07
## PRQC_7  566  0.81  0.79  0.77   0.78  5.3 1.57
## PRQC_8  566  0.86  0.86  0.85   0.84  6.0 1.33
## PRQC_9  566  0.88  0.88  0.87   0.87  5.9 1.38
## PRQC_10 566  0.77  0.77  0.76   0.74  5.9 1.52
## PRQC_11 566  0.80  0.81  0.81   0.77  6.0 1.39
## PRQC_12 566  0.78  0.79  0.78   0.75  5.9 1.41
## PRQC_13 566  0.83  0.80  0.79   0.80  4.9 1.76
## PRQC_14 566  0.73  0.69  0.69   0.68  4.4 1.90
## PRQC_15 566  0.71  0.67  0.66   0.66  4.3 1.92
## PRQC_16 566  0.76  0.79  0.78   0.74  6.5 0.98
## PRQC_17 566  0.83  0.84  0.83   0.80  6.0 1.41
## PRQC_18 566  0.81  0.83  0.83   0.79  6.2 1.29
## 
## Non missing response frequency for each item
##            1    2    3    4    5    6    7 miss
## PRQC_1  0.01 0.02 0.05 0.09 0.19 0.33 0.32    0
## PRQC_2  0.01 0.02 0.04 0.08 0.15 0.33 0.37    0
## PRQC_3  0.01 0.03 0.04 0.10 0.16 0.30 0.37    0
## PRQC_4  0.00 0.00 0.01 0.04 0.07 0.15 0.71    0
## PRQC_5  0.01 0.00 0.02 0.04 0.08 0.18 0.67    0
## PRQC_6  0.01 0.00 0.02 0.05 0.08 0.17 0.67    0
## PRQC_7  0.02 0.05 0.07 0.12 0.20 0.25 0.29    0
## PRQC_8  0.01 0.02 0.04 0.06 0.14 0.25 0.47    0
## PRQC_9  0.01 0.03 0.04 0.08 0.14 0.26 0.43    0
## PRQC_10 0.03 0.03 0.02 0.07 0.11 0.24 0.50    0
## PRQC_11 0.01 0.03 0.04 0.05 0.13 0.24 0.50    0
## PRQC_12 0.01 0.03 0.04 0.05 0.12 0.28 0.46    0
## PRQC_13 0.05 0.07 0.10 0.11 0.22 0.22 0.22    0
## PRQC_14 0.10 0.10 0.12 0.15 0.20 0.16 0.17    0
## PRQC_15 0.10 0.11 0.12 0.14 0.20 0.15 0.16    0
## PRQC_16 0.00 0.01 0.01 0.04 0.07 0.18 0.69    0
## PRQC_17 0.02 0.02 0.03 0.07 0.11 0.19 0.56    0
## PRQC_18 0.01 0.02 0.02 0.05 0.10 0.16 0.63    0
# Trust
data %>%
  select(PRQC_10:PRQC_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.93      0.94    0.92      0.83  15 0.0051  5.9 1.4     0.81
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.92  0.93  0.94
## Duhachek  0.92  0.93  0.94
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
## PRQC_10      0.96      0.96    0.92      0.92 23.5   0.0034    NA  0.92
## PRQC_11      0.86      0.86    0.76      0.76  6.3   0.0116    NA  0.76
## PRQC_12      0.89      0.89    0.81      0.81  8.3   0.0091    NA  0.81
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## PRQC_10 566  0.91  0.91  0.82   0.80  5.9 1.5
## PRQC_11 566  0.96  0.97  0.96   0.92  6.0 1.4
## PRQC_12 566  0.95  0.95  0.93   0.88  5.9 1.4
## 
## Non missing response frequency for each item
##            1    2    3    4    5    6    7 miss
## PRQC_10 0.03 0.03 0.02 0.07 0.11 0.24 0.50    0
## PRQC_11 0.01 0.03 0.04 0.05 0.13 0.24 0.50    0
## PRQC_12 0.01 0.03 0.04 0.05 0.12 0.28 0.46    0
# Attachment Avoidance
data %>%
  select(AAQ_1.r, AAQ_2, AAQ_3.r, AAQ_5:AAQ_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.88      0.88    0.89      0.48 7.5 0.0073  3.8 1.3     0.48
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.87  0.88   0.9
## Duhachek  0.87  0.88   0.9
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## AAQ_1.r      0.87      0.87    0.88      0.50 6.9   0.0079 0.035  0.49
## AAQ_2        0.88      0.88    0.89      0.51 7.3   0.0077 0.030  0.52
## AAQ_3.r      0.90      0.90    0.90      0.55 8.5   0.0067 0.017  0.52
## AAQ_5        0.86      0.86    0.86      0.46 6.0   0.0089 0.025  0.48
## AAQ_6        0.85      0.85    0.85      0.45 5.6   0.0095 0.022  0.45
## AAQ_7        0.86      0.86    0.87      0.47 6.2   0.0088 0.031  0.45
## AAQ_8        0.85      0.85    0.85      0.45 5.7   0.0095 0.022  0.45
## AAQ_9        0.87      0.87    0.88      0.49 6.7   0.0081 0.031  0.48
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## AAQ_1.r 566  0.70  0.70  0.63   0.59  4.0 1.8
## AAQ_2   566  0.65  0.65  0.57   0.54  4.8 1.8
## AAQ_3.r 566  0.50  0.51  0.40   0.37  3.4 1.7
## AAQ_5   566  0.82  0.82  0.81   0.75  3.4 1.7
## AAQ_6   566  0.87  0.87  0.89   0.82  3.5 1.8
## AAQ_7   566  0.80  0.79  0.76   0.71  4.6 1.9
## AAQ_8   566  0.87  0.87  0.87   0.81  3.7 1.9
## AAQ_9   566  0.72  0.72  0.66   0.62  3.4 1.8
## 
## Non missing response frequency for each item
##            1    2    3    4    5    6    7 miss
## AAQ_1.r 0.10 0.14 0.19 0.18 0.15 0.14 0.11    0
## AAQ_2   0.07 0.07 0.10 0.13 0.21 0.23 0.19    0
## AAQ_3.r 0.16 0.19 0.22 0.18 0.11 0.10 0.06    0
## AAQ_5   0.16 0.20 0.17 0.18 0.15 0.08 0.05    0
## AAQ_6   0.16 0.21 0.14 0.16 0.19 0.08 0.06    0
## AAQ_7   0.09 0.09 0.11 0.13 0.20 0.21 0.17    0
## AAQ_8   0.16 0.18 0.13 0.15 0.18 0.11 0.08    0
## AAQ_9   0.20 0.18 0.18 0.16 0.14 0.08 0.07    0
# Attachment Anxiety
data %>%
  select(AAQ_4.r, AAQ_10, AAQ_11, AAQ_12.r, AAQ_13, AAQ_14.r, AAQ_15, AAQ_16.r, AAQ_17.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.83      0.82    0.85      0.34 4.6 0.011  3.4 1.2     0.36
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt      0.8  0.83  0.85
## Duhachek   0.8  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
## AAQ_4.r       0.80      0.80    0.83      0.34 4.0    0.012 0.031  0.35
## AAQ_10        0.82      0.82    0.84      0.36 4.6    0.011 0.029  0.39
## AAQ_11        0.78      0.78    0.81      0.31 3.6    0.014 0.029  0.24
## AAQ_12.r      0.81      0.81    0.84      0.35 4.2    0.012 0.031  0.34
## AAQ_13        0.82      0.82    0.83      0.36 4.4    0.011 0.029  0.39
## AAQ_14.r      0.80      0.80    0.83      0.33 4.0    0.012 0.026  0.34
## AAQ_15        0.82      0.82    0.83      0.36 4.4    0.011 0.029  0.39
## AAQ_16.r      0.79      0.79    0.81      0.31 3.7    0.013 0.025  0.34
## AAQ_17.r      0.80      0.80    0.82      0.33 3.9    0.013 0.027  0.35
## 
##  Item statistics 
##            n raw.r std.r r.cor r.drop mean  sd
## AAQ_4.r  566  0.67  0.66  0.60   0.55  4.3 2.0
## AAQ_10   566  0.48  0.52  0.43   0.36  2.7 1.5
## AAQ_11   566  0.79  0.79  0.78   0.71  3.1 2.0
## AAQ_12.r 566  0.63  0.60  0.52   0.48  3.6 2.1
## AAQ_13   566  0.52  0.55  0.49   0.40  2.4 1.6
## AAQ_14.r 566  0.68  0.66  0.61   0.56  4.4 1.9
## AAQ_15   566  0.52  0.55  0.49   0.39  3.1 1.7
## AAQ_16.r 566  0.78  0.76  0.74   0.68  4.3 2.0
## AAQ_17.r 566  0.70  0.69  0.66   0.60  2.7 1.8
## 
## Non missing response frequency for each item
##             1    2    3    4    5    6    7 miss
## AAQ_4.r  0.12 0.11 0.12 0.13 0.18 0.17 0.16    0
## AAQ_10   0.25 0.27 0.22 0.13 0.07 0.04 0.02    0
## AAQ_11   0.31 0.19 0.12 0.11 0.10 0.08 0.09    0
## AAQ_12.r 0.21 0.18 0.15 0.08 0.12 0.11 0.14    0
## AAQ_13   0.40 0.22 0.13 0.13 0.07 0.03 0.02    0
## AAQ_14.r 0.08 0.13 0.11 0.18 0.14 0.16 0.20    0
## AAQ_15   0.21 0.22 0.20 0.14 0.13 0.07 0.04    0
## AAQ_16.r 0.11 0.13 0.11 0.12 0.17 0.18 0.17    0
## AAQ_17.r 0.34 0.21 0.15 0.12 0.08 0.06 0.05    0
# NSSS
data %>%
  select(`NSSS-S_1`:`NSSS-S_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.96      0.96    0.96      0.64  21 0.0028  3.4  1     0.64
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.95  0.96  0.96
## Duhachek  0.95  0.96  0.96
## 
##  Reliability if an item is dropped:
##           raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## NSSS-S_1       0.95      0.95    0.96      0.64  19   0.0031 0.0074  0.63
## NSSS-S_2       0.95      0.95    0.96      0.64  19   0.0031 0.0067  0.64
## NSSS-S_3       0.95      0.95    0.96      0.63  19   0.0032 0.0067  0.63
## NSSS-S_4       0.95      0.95    0.96      0.65  21   0.0029 0.0053  0.65
## NSSS-S_5       0.95      0.95    0.96      0.64  20   0.0030 0.0077  0.64
## NSSS-S_6       0.95      0.95    0.96      0.64  20   0.0030 0.0076  0.65
## NSSS-S_7       0.95      0.95    0.96      0.63  19   0.0031 0.0076  0.63
## NSSS-S_8       0.95      0.95    0.96      0.64  20   0.0031 0.0076  0.65
## NSSS-S_9       0.95      0.95    0.96      0.65  21   0.0029 0.0058  0.65
## NSSS-S_10      0.95      0.95    0.96      0.64  19   0.0031 0.0064  0.64
## NSSS-S_11      0.95      0.95    0.96      0.63  19   0.0031 0.0064  0.63
## NSSS-S_12      0.95      0.95    0.96      0.64  20   0.0030 0.0073  0.65
## 
##  Item statistics 
##             n raw.r std.r r.cor r.drop mean  sd
## NSSS-S_1  566  0.83  0.83  0.81   0.79  3.4 1.3
## NSSS-S_2  566  0.85  0.85  0.84   0.81  3.1 1.3
## NSSS-S_3  566  0.88  0.88  0.87   0.85  3.3 1.3
## NSSS-S_4  566  0.74  0.74  0.72   0.69  3.2 1.3
## NSSS-S_5  566  0.81  0.82  0.79   0.78  3.6 1.2
## NSSS-S_6  566  0.81  0.81  0.80   0.77  3.7 1.2
## NSSS-S_7  566  0.85  0.85  0.84   0.82  3.4 1.3
## NSSS-S_8  566  0.82  0.82  0.80   0.78  3.4 1.3
## NSSS-S_9  566  0.74  0.75  0.72   0.69  4.0 1.2
## NSSS-S_10 566  0.85  0.85  0.84   0.81  3.3 1.3
## NSSS-S_11 566  0.85  0.85  0.85   0.82  3.2 1.3
## NSSS-S_12 566  0.80  0.79  0.77   0.75  3.0 1.4
## 
## Non missing response frequency for each item
##              1    2    3    4    5 miss
## NSSS-S_1  0.11 0.12 0.23 0.31 0.22    0
## NSSS-S_2  0.17 0.16 0.26 0.23 0.19    0
## NSSS-S_3  0.12 0.14 0.25 0.26 0.23    0
## NSSS-S_4  0.14 0.15 0.26 0.25 0.19    0
## NSSS-S_5  0.07 0.09 0.23 0.34 0.27    0
## NSSS-S_6  0.07 0.07 0.21 0.35 0.29    0
## NSSS-S_7  0.13 0.11 0.26 0.25 0.25    0
## NSSS-S_8  0.11 0.11 0.27 0.27 0.23    0
## NSSS-S_9  0.07 0.04 0.15 0.32 0.41    0
## NSSS-S_10 0.13 0.15 0.25 0.25 0.22    0
## NSSS-S_11 0.15 0.15 0.26 0.25 0.19    0
## NSSS-S_12 0.18 0.18 0.23 0.24 0.17    0
#PRI-R
data %>%
  select(PRI_1:PRI_4) %>%
  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.83  19 0.0035  3.9 1.2     0.82
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.94  0.95  0.96
## Duhachek  0.94  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
## PRI_1      0.94      0.94    0.91      0.83  15   0.0047 0.00031  0.82
## PRI_2      0.93      0.93    0.90      0.81  13   0.0052 0.00104  0.80
## PRI_3      0.93      0.94    0.91      0.83  14   0.0048 0.00152  0.82
## PRI_4      0.94      0.94    0.91      0.83  15   0.0047 0.00140  0.82
## 
##  Item statistics 
##         n raw.r std.r r.cor r.drop mean  sd
## PRI_1 566  0.93  0.93  0.90   0.87  3.8 1.2
## PRI_2 566  0.94  0.94  0.92   0.89  3.9 1.3
## PRI_3 566  0.93  0.93  0.90   0.88  4.0 1.2
## PRI_4 566  0.93  0.93  0.90   0.87  3.9 1.3
## 
## Non missing response frequency for each item
##          0    1    2    3    4    5 miss
## PRI_1 0.02 0.05 0.07 0.20 0.33 0.33    0
## PRI_2 0.03 0.04 0.07 0.16 0.27 0.43    0
## PRI_3 0.02 0.04 0.05 0.13 0.29 0.46    0
## PRI_4 0.02 0.04 0.07 0.16 0.26 0.44    0
#PRI-I
data %>%
  select(PRI_5.r: PRI_8.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.96      0.96    0.95      0.85  22 0.003    4 1.3     0.85
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.95  0.96  0.96
## Duhachek  0.95  0.96  0.96
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se   var.r med.r
## PRI_5.r      0.95      0.95    0.93      0.86  18   0.0038 0.00033  0.87
## PRI_6.r      0.94      0.94    0.91      0.84  16   0.0044 0.00070  0.84
## PRI_7.r      0.94      0.94    0.91      0.84  16   0.0045 0.00063  0.84
## PRI_8.r      0.95      0.95    0.92      0.86  18   0.0039 0.00041  0.86
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## PRI_5.r 566  0.93  0.93  0.90   0.88  4.1 1.4
## PRI_6.r 566  0.95  0.95  0.93   0.91  4.1 1.3
## PRI_7.r 566  0.95  0.95  0.93   0.91  3.9 1.5
## PRI_8.r 566  0.94  0.93  0.90   0.88  3.9 1.5
## 
## Non missing response frequency for each item
##            0    1    2    3    4    5 miss
## PRI_5.r 0.03 0.06 0.06 0.07 0.18 0.60    0
## PRI_6.r 0.03 0.04 0.07 0.10 0.17 0.59    0
## PRI_7.r 0.04 0.06 0.07 0.12 0.19 0.52    0
## PRI_8.r 0.04 0.06 0.09 0.10 0.16 0.56    0
#PRI Total
data %>%
  select(PRI_1:PRI_4,PRI_5.r: PRI_8.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.96      0.96    0.97      0.75  24 0.0027    4 1.2     0.71
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.95  0.96  0.96
## Duhachek  0.95  0.96  0.96
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## PRI_1        0.96      0.96    0.96      0.76  22   0.0029 0.0063  0.71
## PRI_2        0.95      0.95    0.96      0.75  21   0.0030 0.0069  0.71
## PRI_3        0.95      0.95    0.96      0.75  20   0.0031 0.0078  0.70
## PRI_4        0.95      0.95    0.96      0.75  21   0.0030 0.0073  0.71
## PRI_5.r      0.95      0.96    0.96      0.75  21   0.0031 0.0063  0.71
## PRI_6.r      0.95      0.95    0.96      0.74  20   0.0032 0.0064  0.70
## PRI_7.r      0.95      0.95    0.96      0.74  20   0.0032 0.0066  0.70
## PRI_8.r      0.95      0.95    0.96      0.75  21   0.0031 0.0069  0.71
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## PRI_1   566  0.85  0.86  0.84   0.81  3.8 1.2
## PRI_2   566  0.88  0.88  0.87   0.84  3.9 1.3
## PRI_3   566  0.89  0.89  0.88   0.85  4.0 1.2
## PRI_4   566  0.87  0.88  0.86   0.83  3.9 1.3
## PRI_5.r 566  0.88  0.87  0.86   0.84  4.1 1.4
## PRI_6.r 566  0.90  0.90  0.89   0.87  4.1 1.3
## PRI_7.r 566  0.91  0.90  0.89   0.87  3.9 1.5
## PRI_8.r 566  0.89  0.88  0.87   0.85  3.9 1.5
## 
## Non missing response frequency for each item
##            0    1    2    3    4    5 miss
## PRI_1   0.02 0.05 0.07 0.20 0.33 0.33    0
## PRI_2   0.03 0.04 0.07 0.16 0.27 0.43    0
## PRI_3   0.02 0.04 0.05 0.13 0.29 0.46    0
## PRI_4   0.02 0.04 0.07 0.16 0.26 0.44    0
## PRI_5.r 0.03 0.06 0.06 0.07 0.18 0.60    0
## PRI_6.r 0.03 0.04 0.07 0.10 0.17 0.59    0
## PRI_7.r 0.04 0.06 0.07 0.12 0.19 0.52    0
## PRI_8.r 0.04 0.06 0.09 0.10 0.16 0.56    0

Histograms and QQ Plots

par(mfrow=c(1, 2))

#PRQC
hist(data$PRQC, main="Histogram of PRQC", xlab="PRQC", col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(data$PRQC, na.rm=TRUE), 2)))
qqnorm(data$PRQC, pch = 1, frame = FALSE, main="QQ Plot of PRQC")
qqline(data$PRQC, col = "hotpink", lwd = 2)

#PRQC Trust
hist(data$Trust, main="Histogram of PRQC Trust", xlab="Trust", 
     col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(data$Trust, na.rm=TRUE), 2)))
qqnorm(data$Trust, pch = 1, frame = FALSE, main="QQ Plot of PRQC Trust")
qqline(data$Trust, col = "hotpink", lwd = 2)

# Attachment Avoidance
hist(data$AAQ.AV, main="Histogram of Attachment Avoidance", xlab="Avoidance", 
     col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(data$AAQ.AV, na.rm=TRUE), 2)))
qqnorm(data$AAQ.AV, pch = 1, frame = FALSE, main="QQ Plot of Attachment Avoidance")
qqline(data$AAQ.AV, col = "hotpink", lwd = 2)

# Attachment Anxiety
hist(data$AAQ.ANX, main="Histogram of Attachment Anxiety", xlab="Anxiety", 
     col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(data$AAQ.ANX, na.rm=TRUE), 2)))
qqnorm(data$AAQ.ANX, pch = 1, frame = FALSE, main="QQ Plot of Attachment Anxiety")
qqline(data$AAQ.ANX, col = "hotpink", lwd = 2)

# NSSS
hist(data$NSSS, main="Histogram of Sexual Satisfaction", xlab="NSSS", col='hotpink', 
     sub=paste("Skewness:", 
               round(e1071::skewness(data$NSSS, na.rm=TRUE), 2)))
qqnorm(data$NSSS, pch = 1, frame = FALSE, main="QQ Plot of Sexual Satisfaction")
qqline(data$NSSS, col = "hotpink", lwd = 2)

# Perceived Partner Responsiveness
hist(data$PRI_R, main="Histogram of Responsiveness", xlab="Responsiveness", 
     col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(data$PRI_R, na.rm=TRUE), 2)))
qqnorm(data$PRI_R, pch = 1, frame = FALSE, main="QQ Plot of Partner Responsiveness")
qqline(data$PRI_R, col = "hotpink", lwd = 2)

# Perceived Partner Insensitivity
hist(data$PRI_I, main="Histogram of Insensitivity", xlab="Insensitivity", col='hotpink', 
     sub=paste("Skewness:", 
               round(e1071::skewness(data$PRI_I, na.rm=TRUE), 2)))
qqnorm(data$PRI_I, pch = 1, frame = FALSE, main="QQ Plot of Partner Insensitivity")
qqline(data$PRI_I, col = "hotpink", lwd = 2)

Descriptive Statistics

data %>%
  dplyr::select(AAQ.ANX, AAQ.AV, PRQC, Trust, NSSS, PRI_total)%>%
  psych::describe(na.rm=TRUE) %>%
  as.data.frame() %>% 
  dplyr::select("n", "mean", "sd", "median", "min", "max", "range", "skew", "kurtosis") %>%
  kableExtra::kable(caption= "Descriptive Statistics for Study Variables", digits = 2) %>%
  kable_styling(bootstrap_options = "striped", full_width = TRUE)
Descriptive Statistics for Study Variables
n mean sd median min max range skew kurtosis
AAQ.ANX 566 3.42 1.20 3.44 1.00 7 6.00 0.12 -0.41
AAQ.AV 566 3.84 1.34 3.88 1.00 7 6.00 -0.15 -0.56
PRQC 566 5.77 1.12 6.06 1.61 7 5.39 -1.29 1.32
Trust 566 5.94 1.35 6.33 1.00 7 6.00 -1.64 2.29
NSSS 566 3.39 1.04 3.58 1.00 5 4.00 -0.44 -0.49
PRI_total 566 3.96 1.18 4.44 0.00 5 5.00 -1.30 0.98
sum(data$AAQ.ANX>3.5)/length(data$AAQ.ANX) #percentage of people above midpoints
## [1] 0.4734982
sum(data$AAQ.AV>3.5)/length(data$AAQ.AV)
## [1] 0.5812721
sum(data$PRQC>3.5)/length(data$PRQC)
## [1] 0.9381625
sum(data$Trust>3.5)/length(data$Trust)
## [1] 0.9204947
sum(data$NSSS>2.5)/length(data$NSSS)
## [1] 0.7932862
sum(data$PRI_total>2.5)/length(data$PRI_total)
## [1] 0.8586572

Correlations

which(colnames(data)=="someASA") # identifies the column number of different variables
## [1] 159
data[,c(49:103)] %<>% dplyr::mutate_if(is.character,as.numeric) #making only select columns numeric

corrdata<- data %>%
  select(someASA, PRQC, Trust, NSSS, PRI_total, AAQ.ANX, AAQ.AV)
cor<- cor(corrdata, use= "everything", method=c("spearman"))
round(cor,2)
##           someASA  PRQC Trust  NSSS PRI_total AAQ.ANX AAQ.AV
## someASA      1.00 -0.13 -0.09 -0.03     -0.16    0.09   0.14
## PRQC        -0.13  1.00  0.78  0.68      0.72   -0.33  -0.28
## Trust       -0.09  0.78  1.00  0.44      0.69   -0.40  -0.28
## NSSS        -0.03  0.68  0.44  1.00      0.46   -0.29  -0.28
## PRI_total   -0.16  0.72  0.69  0.46      1.00   -0.36  -0.25
## AAQ.ANX      0.09 -0.33 -0.40 -0.29     -0.36    1.00   0.36
## AAQ.AV       0.14 -0.28 -0.28 -0.28     -0.25    0.36   1.00
rcorr(as.matrix(corrdata), type = c("spearman"))
##           someASA  PRQC Trust  NSSS PRI_total AAQ.ANX AAQ.AV
## someASA      1.00 -0.13 -0.09 -0.03     -0.16    0.09   0.14
## PRQC        -0.13  1.00  0.78  0.68      0.72   -0.33  -0.28
## Trust       -0.09  0.78  1.00  0.44      0.69   -0.40  -0.28
## NSSS        -0.03  0.68  0.44  1.00      0.46   -0.29  -0.28
## PRI_total   -0.16  0.72  0.69  0.46      1.00   -0.36  -0.25
## AAQ.ANX      0.09 -0.33 -0.40 -0.29     -0.36    1.00   0.36
## AAQ.AV       0.14 -0.28 -0.28 -0.28     -0.25    0.36   1.00
## 
## n= 566 
## 
## 
## P
##           someASA PRQC   Trust  NSSS   PRI_total AAQ.ANX AAQ.AV
## someASA           0.0019 0.0430 0.4835 0.0000    0.0307  0.0012
## PRQC      0.0019         0.0000 0.0000 0.0000    0.0000  0.0000
## Trust     0.0430  0.0000        0.0000 0.0000    0.0000  0.0000
## NSSS      0.4835  0.0000 0.0000        0.0000    0.0000  0.0000
## PRI_total 0.0000  0.0000 0.0000 0.0000           0.0000  0.0000
## AAQ.ANX   0.0307  0.0000 0.0000 0.0000 0.0000            0.0000
## AAQ.AV    0.0012  0.0000 0.0000 0.0000 0.0000    0.0000
mean(corrdata$someASA)
## [1] 0.6201413
sd(corrdata$someASA)
## [1] 0.4857808

Mean Centering

data$cPRI_total<- data$PRI_total - mean(data$PRI_total, na.rm=TRUE)
data$cANX<- data$AAQ.ANX - mean(data$AAQ.ANX, na.rm=TRUE)
data$cAV<- data$AAQ.AV - mean(data$AAQ.AV, na.rm=TRUE)

Detecting Outliers

## PRQC
PRQCmin <- mean(data$PRQC, na.rm=T) - (3*(sd(data$PRQC, na.rm=T)))
PRQCmax <- mean(data$PRQC, na.rm=T) + (3*(sd(data$PRQC, na.rm=T)))
data$PRQC[which(data$PRQC < PRQCmin | data$PRQC > PRQCmax)] # 8 outliers
## [1] 2.111111 2.277778 2.166667 2.277778 2.277778 1.944444 1.611111 1.777778
# Sexual Satisfaction 
NSSSmin <- mean(data$NSSS, na.rm=T) - (3*(sd(data$NSSS, na.rm=T)))
NSSSmax <- mean(data$NSSS, na.rm=T) + (3*(sd(data$NSSS, na.rm=T)))
data$NSSS[which(data$NSSS< NSSSmin | data$NSSS > NSSSmax)] #  0 outliers
## numeric(0)
#Trust
Trustmin <- mean(data$Trust, na.rm=T) - (3*(sd(data$Trust, na.rm=T)))
Trustmax <- mean(data$Trust, na.rm=T) + (3*(sd(data$Trust, na.rm=T)))
data$Trust[which(data$Trust< Trustmin | data$Trust > Trustmax)] #  11 outliers
##  [1] 1.333333 1.666667 1.000000 1.666667 1.666667 1.000000 1.666667 1.666667
##  [9] 1.000000 1.333333 1.000000
# Perceived partner responsiveness
cPRI_totalmin <- mean(data$cPRI_total, na.rm=T) - (3*(sd(data$cPRI_total, na.rm=T)))
cPRI_totalmax <- mean(data$cPRI_total, na.rm=T) + (3*(sd(data$cPRI_total, na.rm=T)))
data$cPRI_total[which(data$cPRI_total< cPRI_totalmin | data$cPRI_total > cPRI_totalmax)] # 7 outliers
## [1] -3.958922 -3.958922 -3.958922 -3.958922 -3.708922 -3.708922 -3.958922
# Anxiety
cANXmin <- mean(data$cANX, na.rm=T) - (3*(sd(data$cANX, na.rm=T)))
cANXmax <- mean(data$cANX, na.rm=T) + (3*(sd(data$cANX, na.rm=T)))
data$cANX[which(data$cANX< cANXmin | data$cANX > cANXmax)] #0 outliers
## numeric(0)
# Avoidance
cAVmin <- mean(data$cAV, na.rm=T) - (3*(sd(data$cAV, na.rm=T)))
cAVmax <- mean(data$cAV, na.rm=T) + (3*(sd(data$cAV, na.rm=T)))
data$cAV[which(data$cAV< cAVmin | data$cAV > cAVmax)] # 0 outliers
## numeric(0)

Hypothesis 1 & 2

Hypothesis 1 and 2: Having experienced adult sexual assault will be associated with poorer (a1) romantic relationship quality, (a2) partner trust, and (b) poorer sexual satisfaction in participants’ current romantic relationship. The association between experiencing adult sexual assault and (a1) romantic relationship quality, (a2) partner trust, and (b) sexual satisfaction will be moderated by perceived partner responsiveness, such that individuals who have experienced ASA and perceive their partners as being less responsive will report worse relationship quality and lower partner trust and sexual satisfaction than individuals who have experienced ASA and perceive their partners as more responsive.

PRQC

logPRQC<- log(data$PRQC) #log transform did not improve distribution
prqc2<- (data$PRQC)^2 #exponential transform did not improve distribution

# Effect coding 
data<- data %>%
  mutate(AnyASA = case_when(
    data$ASAonly==TRUE ~ 1,
    data$revictimized==TRUE ~ 1,
    data$NeitherASAnorCSA==TRUE ~ -1
  ))

data$AnyASA<- as.factor(data$AnyASA) # converting to factor

data$InversePRQC<- 8-data$PRQC ### Reverse scoring PRQC so it fits gamma distribution

# descriptives
group_by(data, AnyASA) %>%
  summarise(
    count = n(),
    mean = mean(PRQC, na.rm = TRUE),
    sd = sd(PRQC, na.rm = TRUE),
    median = median(PRQC, na.rm = TRUE),
    IQR = IQR(PRQC, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   AnyASA count  mean    sd median   IQR
##   <fct>  <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1       215  5.93  1.08   6.28  1.28
## 2 1        351  5.68  1.13   6     1.39
Prqc.step1<- glm(formula= InversePRQC ~ AnyASA, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
prqc.step2<- glm(formula= InversePRQC ~ AnyASA+cPRI_total, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
prqc.step3<- glm(formula= InversePRQC ~ AnyASA*cPRI_total, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)


data$PRQC.win<- winsorize(data$PRQC, method="zscore", 
                                 threshold=3, robust=FALSE) #removing outliers +-3 sds from mean
data$cPRI.win<- winsorize(data$cPRI_total, method="zscore", 
                                 threshold=3, robust=FALSE) 

PRQC.gamma.noOutliers<- glm(formula= InversePRQC ~ AnyASA*cPRI.win, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)


#Trying linear model
prqc.lin.mod1<- lm(PRQC.win ~ AnyASA, data=data)
prqc.lin.mod2<- lm(PRQC.win ~ AnyASA+cPRI.win, data=data)
prqc.lin.mod3<- lm(PRQC.win ~ AnyASA*cPRI.win, data=data)


# Non-parametric t-test
wilcox.test(PRQC ~ AnyASA, data=data, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  PRQC by AnyASA
## W = 43574, p-value = 0.001967
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  0.05556703 0.38882948
## sample estimates:
## difference in location 
##              0.2221814
wilcoxonRG(x = data$PRQC, g = data$AnyASA)
##    rg 
## 0.155
wilcox_effsize(PRQC ~ AnyASA, data=data)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 PRQC  -1     1        0.130   215   351 small
wilcox_test(PRQC ~ AnyASA, data=data, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  PRQC by AnyASA (-1, 1)
## Z = 3.0954, p-value = 0.001966
## alternative hypothesis: true mu is not equal to 0
#### Results
summary(prqc.lin.mod1)
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7785 -0.5775  0.2130  0.7130  1.2130 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.02194    0.05985 100.621  < 2e-16 ***
## AnyASA1     -0.23492    0.07600  -3.091  0.00209 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8775 on 564 degrees of freedom
## Multiple R-squared:  0.01666,    Adjusted R-squared:  0.01492 
## F-statistic: 9.555 on 1 and 564 DF,  p-value: 0.002093
lm.beta(prqc.lin.mod1) # standardized beta
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1 
##          NA  -0.1290706
summary(prqc.lin.mod2)
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA + cPRI.win, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.21204 -0.44572  0.06546  0.41477  2.15758 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.76254    0.04337 132.863   <2e-16 ***
## AnyASA1     -0.02041    0.05409  -0.377    0.706    
## cPRI.win     0.75647    0.03138  24.110   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6161 on 563 degrees of freedom
## Multiple R-squared:  0.5162, Adjusted R-squared:  0.5145 
## F-statistic: 300.3 on 2 and 563 DF,  p-value: < 2.2e-16
lm.beta(prqc.lin.mod2) #stan beta
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA + cPRI.win, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1    cPRI.win 
##          NA -0.01121495  0.71653193
summary(prqc.lin.mod3)
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA * cPRI.win, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.21003 -0.44503  0.06508  0.41221  2.15972 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       5.763742   0.046064 125.124   <2e-16 ***
## AnyASA1          -0.021714   0.056660  -0.383    0.702    
## cPRI.win          0.752972   0.054824  13.734   <2e-16 ***
## AnyASA1:cPRI.win  0.005212   0.066884   0.078    0.938    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6166 on 562 degrees of freedom
## Multiple R-squared:  0.5162, Adjusted R-squared:  0.5136 
## F-statistic: 199.9 on 3 and 562 DF,  p-value: < 2.2e-16
lm.beta(prqc.lin.mod3)#stan beta
## 
## Call:
## lm(formula = PRQC.win ~ AnyASA * cPRI.win, data = data)
## 
## Standardized Coefficients::
##      (Intercept)          AnyASA1         cPRI.win AnyASA1:cPRI.win 
##               NA     -0.011930466      0.713214889      0.003995239
confint(prqc.lin.mod3, level=0.95)
##                       2.5 %     97.5 %
## (Intercept)       5.6732634 5.85422113
## AnyASA1          -0.1330054 0.08957667
## cPRI.win          0.6452884 0.86065652
## AnyASA1:cPRI.win -0.1261605 0.13658486
#### AIC values
AIC(prqc.lin.mod1, prqc.lin.mod2, prqc.lin.mod3)
##               df      AIC
## prqc.lin.mod1  3 1462.358
## prqc.lin.mod2  4 1062.918
## prqc.lin.mod3  5 1064.912
stepAIC(prqc.lin.mod3, direction="both", trace=F) #this means that best fitting model is one that ONLY has perceived partner responsiveness
## 
## Call:
## lm(formula = PRQC.win ~ cPRI.win, data = data)
## 
## Coefficients:
## (Intercept)     cPRI.win  
##      5.7496       0.7584

Mean relationship quality is slightly higher in the AnyASA group than the neither group. Regression results indicate that ASA, conditioned on perceived partner responsiveness, does not predict relationship quality. When only ASA is in the model, it is sig but with an Adjusted \(R^2\) of .02. The AIC values also suggest that it is not a good fit to the data. The AIC value of the model that only contains perceived partner responsiveness is extremely similar to our full model, which basically means that ASA and the interaction adds almost no information to our model.

Trust

########### Trust  ####################
data$InverseTrust<- 8-data$Trust ### Reverse scoring Trust so it fits gamma distribution

group_by(data, AnyASA) %>%
  summarise(
    count = n(),
    mean = mean(Trust, na.rm = TRUE),
    sd = sd(Trust, na.rm = TRUE),
    median = median(Trust, na.rm = TRUE),
    IQR = IQR(Trust, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   AnyASA count  mean    sd median   IQR
##   <fct>  <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1       215  6.11  1.22   6.67  1   
## 2 1        351  5.84  1.42   6.33  1.67
trust.step1<- glm(formula= InverseTrust ~ AnyASA, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
trust.step2<- glm(formula= InverseTrust ~ AnyASA + cPRI_total, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
trust.step3<- glm(formula= InverseTrust ~ AnyASA * cPRI_total, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)


#Winorizing outliers
data$InverseTrust.win<- winsorize(data$InverseTrust, method="zscore", 
                                 threshold=3, robust=FALSE) 
data$Trust.win<- winsorize(data$Trust, method="zscore", 
                                 threshold=3, robust=FALSE)

trust.h1.noOutliers<- glm(formula= InverseTrust.win ~ AnyASA * cPRI.win, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)


#lin models
trust.lin.mod1<- lm(Trust.win ~ AnyASA, data=data)
trust.lin.mod2<- lm(Trust.win ~ AnyASA+cPRI.win, data=data)
trust.lin.mod3<- lm(Trust.win ~ AnyASA*cPRI.win, data=data)

#non-parametric ttest
wilcox.test(Trust ~ AnyASA, data=data, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  Trust by AnyASA
## W = 41445, p-value = 0.04308
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  1.629236e-06 3.332659e-01
## sample estimates:
## difference in location 
##            4.06057e-05
wilcoxonRG(x = data$Trust, g = data$AnyASA)
##     rg 
## 0.0984
wilcox_effsize(Trust ~ AnyASA, data=data)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 Trust -1     1       0.0850   215   351 small
wilcox_test(Trust ~ AnyASA, data=data, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  Trust by AnyASA (-1, 1)
## Z = 2.0232, p-value = 0.04306
## alternative hypothesis: true mu is not equal to 0
### Results
summary(trust.lin.mod1)
## 
## Call:
## lm(formula = Trust.win ~ AnyASA, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8842 -0.7026  0.2974  0.7593  0.9641 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.24070    0.06382  97.782   <2e-16 ***
## AnyASA1     -0.20478    0.08105  -2.527   0.0118 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9358 on 564 degrees of freedom
## Multiple R-squared:  0.01119,    Adjusted R-squared:  0.00944 
## F-statistic: 6.384 on 1 and 564 DF,  p-value: 0.01179
lm.beta(trust.lin.mod1) #stan beta
## 
## Call:
## lm(formula = Trust.win ~ AnyASA, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1 
##          NA  -0.1057965
summary(trust.lin.mod2)
## 
## Call:
## lm(formula = Trust.win ~ AnyASA + cPRI.win, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.2436 -0.4894  0.2071  0.3999  1.9407 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.97631    0.04827  123.80   <2e-16 ***
## AnyASA1      0.01386    0.06020    0.23    0.818    
## cPRI.win     0.77104    0.03492   22.08   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6857 on 563 degrees of freedom
## Multiple R-squared:  0.4701, Adjusted R-squared:  0.4682 
## F-statistic: 249.7 on 2 and 563 DF,  p-value: < 2.2e-16
lm.beta(trust.lin.mod2) #stan beta
## 
## Call:
## lm(formula = Trust.win ~ AnyASA + cPRI.win, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1    cPRI.win 
##          NA 0.007159769 0.686745086
summary(trust.lin.mod3)
## 
## Call:
## lm(formula = Trust.win ~ AnyASA * cPRI.win, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.2553 -0.4783  0.1915  0.3872  1.9468 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      5.987501   0.051251 116.827   <2e-16 ***
## AnyASA1          0.001726   0.063040   0.027    0.978    
## cPRI.win         0.738414   0.060997  12.106   <2e-16 ***
## AnyASA1:cPRI.win 0.048559   0.074415   0.653    0.514    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6861 on 562 degrees of freedom
## Multiple R-squared:  0.4705, Adjusted R-squared:  0.4676 
## F-statistic: 166.4 on 3 and 562 DF,  p-value: < 2.2e-16
lm.beta(trust.lin.mod3) #stan beta
## 
## Call:
## lm(formula = Trust.win ~ AnyASA * cPRI.win, data = data)
## 
## Standardized Coefficients::
##      (Intercept)          AnyASA1         cPRI.win AnyASA1:cPRI.win 
##               NA     0.0008914872     0.6576861165     0.0350002737
confint(trust.lin.mod3, level=0.95)
##                        2.5 %    97.5 %
## (Intercept)       5.88683447 6.0881675
## AnyASA1          -0.12209652 0.1255476
## cPRI.win          0.61860454 0.8582225
## AnyASA1:cPRI.win -0.09760601 0.1947237
#Model comparison
AIC(trust.lin.mod1)
## [1] 1535.148
AIC(trust.lin.mod2)
## [1] 1184.121
AIC(trust.lin.mod3)
## [1] 1185.693
stepAIC(trust.lin.mod3, direction="both", trace=FALSE)
## 
## Call:
## lm(formula = Trust.win ~ cPRI.win, data = data)
## 
## Coefficients:
## (Intercept)     cPRI.win  
##      5.9851       0.7697

When ASA is the only predictor in the model, it significantly predicts worse relationship quality with an Adjusted \(R^2\) of .01. The AIC values suggest that this is not a good fit for the data (supporting that ASA is not very useful predictor). When perceived partner responsiveness is added to the model, it is no longer significant. The Adjusted \(R^2\) of the full model is .46.

Sexual Satisfaction

######### NSSS-S ########################
group_by(data, AnyASA) %>%
  summarise(
    count = n(),
    mean = mean(NSSS, na.rm = TRUE),
    sd = sd(NSSS, na.rm = TRUE),
    median = median(NSSS, na.rm = TRUE),
    IQR = IQR(NSSS, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   AnyASA count  mean    sd median   IQR
##   <fct>  <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1       215  3.45 0.979   3.5   1.25
## 2 1        351  3.35 1.08    3.58  1.58
sex.sat.step1<- lm(NSSS ~ AnyASA, data=data)
sex.sat.step2<- lm(NSSS ~ AnyASA + cPRI.win, data=data)
sex.sat.step3<- lm(NSSS ~ AnyASA*cPRI.win, data=data)

#### Results
summary(sex.sat.step1)
## 
## Call:
## lm(formula = NSSS ~ AnyASA, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4461 -0.6961  0.1455  0.7268  1.6455 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.44612    0.07118  48.412   <2e-16 ***
## AnyASA1     -0.09166    0.09039  -1.014    0.311    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.044 on 564 degrees of freedom
## Multiple R-squared:  0.00182,    Adjusted R-squared:  5.001e-05 
## F-statistic: 1.028 on 1 and 564 DF,  p-value: 0.311
lm.beta(sex.sat.step1) #stan beta
## 
## Call:
## lm(formula = NSSS ~ AnyASA, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1 
##          NA -0.04265956
summary(sex.sat.step2)
## 
## Call:
## lm(formula = NSSS ~ AnyASA + cPRI.win, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.91327 -0.62973  0.08673  0.65558  2.42603 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.25095    0.06564  49.523   <2e-16 ***
## AnyASA1      0.06974    0.08187   0.852    0.395    
## cPRI.win     0.56920    0.04749  11.986   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9325 on 563 degrees of freedom
## Multiple R-squared:  0.2047, Adjusted R-squared:  0.2019 
## F-statistic: 72.48 on 2 and 563 DF,  p-value: < 2.2e-16
lm.beta(sex.sat.step2) #stan beta
## 
## Call:
## lm(formula = NSSS ~ AnyASA + cPRI.win, data = data)
## 
## Standardized Coefficients::
## (Intercept)     AnyASA1    cPRI.win 
##          NA  0.03245832  0.45669726
summary(sex.sat.step3)
## 
## Call:
## lm(formula = NSSS ~ AnyASA * cPRI.win, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.8886 -0.6338  0.1087  0.6417  2.5048 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       3.23331    0.06968  46.400  < 2e-16 ***
## AnyASA1           0.08887    0.08571   1.037     0.30    
## cPRI.win          0.62063    0.08294   7.483 2.81e-13 ***
## AnyASA1:cPRI.win -0.07655    0.10118  -0.757     0.45    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9328 on 562 degrees of freedom
## Multiple R-squared:  0.2056, Adjusted R-squared:  0.2013 
## F-statistic: 48.47 on 3 and 562 DF,  p-value: < 2.2e-16
lm.beta(sex.sat.step3)#stan beta
## 
## Call:
## lm(formula = NSSS ~ AnyASA * cPRI.win, data = data)
## 
## Standardized Coefficients::
##      (Intercept)          AnyASA1         cPRI.win AnyASA1:cPRI.win 
##               NA       0.04135951       0.49796209      -0.04970170
confint(sex.sat.step3, level=.95)
##                        2.5 %    97.5 %
## (Intercept)       3.09643810 3.3701846
## AnyASA1          -0.07948988 0.2572244
## cPRI.win          0.45772783 0.7835291
## AnyASA1:cPRI.win -0.27528203 0.1221899
# non-parametric ttest
wilcox.test(NSSS ~ AnyASA, data=data, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  NSSS by AnyASA
## W = 39056, p-value = 0.4831
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  -0.08339813  0.24999952
## sample estimates:
## difference in location 
##              0.0832895
wilcoxonRG(x = data$NSSS, g = data$AnyASA)
##     rg 
## 0.0351
wilcox_effsize(NSSS ~ AnyASA, data=data)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 NSSS  -1     1       0.0295   215   351 small
wilcox_test(NSSS ~ AnyASA, data=data, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  NSSS by AnyASA (-1, 1)
## Z = 0.70154, p-value = 0.483
## alternative hypothesis: true mu is not equal to 0
#### AIC
AIC(sex.sat.step1)
## [1] 1658.705
AIC(sex.sat.step2)
## [1] 1532.067
AIC(sex.sat.step3)
## [1] 1533.491
stepAIC(sex.sat.step3, direction="both", trace=FALSE)
## 
## Call:
## lm(formula = NSSS ~ cPRI.win, data = data)
## 
## Coefficients:
## (Intercept)     cPRI.win  
##      3.2953       0.5625

Sexual assault does not predict sexual satisfaction. The Adjustwed \(R^2\) of the full model is .20.

EQ: Responsiveness

group_by(data, AnyASA) %>%
  summarise(
    count = n(),
    mean = mean(PRI_total, na.rm = TRUE),
    sd = sd(PRI_total, na.rm = TRUE),
    median = median(PRI_total, na.rm = TRUE),
    IQR = IQR(PRI_total, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   AnyASA count  mean    sd median   IQR
##   <fct>  <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1       215  4.20  1.02   4.62  1.19
## 2 1        351  3.81  1.25   4.25  1.81
# non-parametric ttest
wilcox.test(PRI_total ~ AnyASA, data=data, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  PRI_total by AnyASA
## W = 45043, p-value = 9.617e-05
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  0.1249420 0.3749968
## sample estimates:
## difference in location 
##               0.249997
wilcoxonRG(x = data$PRI_total, g = data$AnyASA)
##    rg 
## 0.194
wilcox_effsize(PRI_total ~ AnyASA, data=data)
## # A tibble: 1 × 7
##   .y.       group1 group2 effsize    n1    n2 magnitude
## * <chr>     <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 PRI_total -1     1        0.164   215   351 small
wilcox_test(PRI_total ~ AnyASA, data=data, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  PRI_total by AnyASA (-1, 1)
## Z = 3.9003, p-value = 9.606e-05
## alternative hypothesis: true mu is not equal to 0

Hypothesis 3

Revictimization (Child Sexual Assault and ASA) will be associated with poorer (a1) romantic relationship quality, (a2) partner trust, and (b) lower sexual satisfaction.

3.A1: PRQC

# Effect coding 
data<- data %>%
  mutate(SVGroup = case_when(
    data$ASAonly==TRUE ~ 0,
    data$revictimized==TRUE ~ 1,
    data$NeitherASAnorCSA==TRUE ~ -1
  ))

data$SVGroup<- as.factor(data$SVGroup)
contrasts(data$SVGroup) <- contr.sum(3)
contrasts(data$SVGroup)
##    [,1] [,2]
## -1    1    0
## 0     0    1
## 1    -1   -1
group_by(data, SVGroup) %>%
  summarise(
    count = n(),
    mean = mean(PRQC, na.rm = TRUE),
    sd = sd(PRQC, na.rm = TRUE),
    median = median(PRQC, na.rm = TRUE),
    IQR = IQR(PRQC, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  5.93  1.08   6.28  1.28
## 2 0         198  5.68  1.11   5.94  1.33
## 3 1         153  5.67  1.17   6     1.33
ggplot(data, aes(SVGroup, PRQC)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="PRQC") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

PRQC.kruskal<- kruskal.test(PRQC ~ SVGroup, data = data)
PRQC.kruskal
## 
##  Kruskal-Wallis rank sum test
## 
## data:  PRQC by SVGroup
## Kruskal-Wallis chi-squared = 9.6284, df = 2, p-value = 0.008114
dunnTest(PRQC ~ SVGroup, data=data, method="bh")
## Dunn (1964) Kruskal-Wallis multiple comparison
##   p-values adjusted with the Benjamini-Hochberg method.
##   Comparison          Z     P.unadj      P.adj
## 1     -1 - 0  2.8249725 0.004728467 0.01418540
## 2     -1 - 1  2.4099025 0.015956783 0.02393518
## 3      0 - 1 -0.2170016 0.828207122 0.82820712
data %>% kruskal_effsize(PRQC ~ SVGroup)
## # A tibble: 1 × 5
##   .y.       n effsize method  magnitude
## * <chr> <int>   <dbl> <chr>   <ord>    
## 1 PRQC    566  0.0135 eta2[H] small

Conclusion: There are significant group differences. Specifically, those who have not been assaulted report better relationship quality than those who have experience ASA and who have experienced revictimization. There are no significant group differences comparing ASA Only and revictimized group.

3.A2: Trust

group_by(data, SVGroup) %>%
  summarise(
    count = n(),
    mean = mean(Trust, na.rm = TRUE),
    sd = sd(Trust, na.rm = TRUE),
    median = median(Trust, na.rm = TRUE),
    IQR = IQR(Trust, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  6.11  1.22   6.67  1   
## 2 0         198  5.95  1.35   6.33  1.67
## 3 1         153  5.70  1.50   6     2
ggplot(data, aes(SVGroup, Trust)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="Trust") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

kruskal.test(Trust ~ SVGroup, data = data)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Trust by SVGroup
## Kruskal-Wallis chi-squared = 6.3711, df = 2, p-value = 0.04136
dunnTest(Trust ~ SVGroup, data=data, method="bh")
## Dunn (1964) Kruskal-Wallis multiple comparison
##   p-values adjusted with the Benjamini-Hochberg method.
##   Comparison        Z    P.unadj      P.adj
## 1     -1 - 0 1.059915 0.28918340 0.28918340
## 2     -1 - 1 2.523008 0.01163559 0.03490677
## 3      0 - 1 1.509265 0.13123107 0.19684661
data %>% kruskal_effsize(Trust ~ SVGroup)
## # A tibble: 1 × 5
##   .y.       n effsize method  magnitude
## * <chr> <int>   <dbl> <chr>   <ord>    
## 1 Trust   566 0.00776 eta2[H] small

Conclusion: There is a significant difference comparing those who have never been assaulted and revictimized individuals.

3.A3: Sexual Satisfaction

group_by(data, SVGroup) %>%
  summarise(
    count = n(),
    mean = mean(NSSS, na.rm = TRUE),
    sd = sd(NSSS, na.rm = TRUE),
    median = median(NSSS, na.rm = TRUE),
    IQR = IQR(NSSS, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  3.45 0.979   3.5   1.25
## 2 0         198  3.39 1.01    3.54  1.25
## 3 1         153  3.31 1.17    3.58  1.75
shapiro.test(data$NSSS) #data is not normally distributed
## 
##  Shapiro-Wilk normality test
## 
## data:  data$NSSS
## W = 0.96429, p-value = 1.703e-10
car::leveneTest(NSSS ~ SVGroup, center = median, data = data) #variances are equal
## Levene's Test for Homogeneity of Variance (center = median)
##        Df F value  Pr(>F)  
## group   2  3.6411 0.02684 *
##       563                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(data, aes(SVGroup, NSSS)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="Sexual Satisfaction") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

kruskal.test(NSSS ~ SVGroup, data = data) #Not significant
## 
##  Kruskal-Wallis rank sum test
## 
## data:  NSSS by SVGroup
## Kruskal-Wallis chi-squared = 0.51117, df = 2, p-value = 0.7745
data %>% kruskal_effsize(NSSS ~ SVGroup)
## # A tibble: 1 × 5
##   .y.       n  effsize method  magnitude
## * <chr> <int>    <dbl> <chr>   <ord>    
## 1 NSSS    566 -0.00264 eta2[H] small

Conclusion:There are no significant differences in sexual satisfaction based on sexual assault history.

EQ: PRI

Are there significant group differences in perceived partner responsiveness?

group_by(data, SVGroup) %>%
  summarise(
    count = n(),
    mean = mean(PRI_total, na.rm = TRUE),
    sd = sd(PRI_total, na.rm = TRUE),
    median = median(PRI_total, na.rm = TRUE),
    IQR = IQR(PRI_total, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  4.20  1.02   4.62  1.19
## 2 0         198  3.85  1.20   4.25  1.5 
## 3 1         153  3.76  1.31   4.25  2
ggplot(data, aes(SVGroup, PRI_total)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="Partner responsiveness") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

kruskal.test(PRI_total ~ SVGroup, data = data) #significant
## 
##  Kruskal-Wallis rank sum test
## 
## data:  PRI_total by SVGroup
## Kruskal-Wallis chi-squared = 15.258, df = 2, p-value = 0.0004861
dunnTest(PRI_total ~ SVGroup, data=data, method="bh")
## Dunn (1964) Kruskal-Wallis multiple comparison
##   p-values adjusted with the Benjamini-Hochberg method.
##   Comparison         Z      P.unadj       P.adj
## 1     -1 - 0 3.3276881 0.0008756984 0.002627095
## 2     -1 - 1 3.3161116 0.0009127936 0.001369190
## 3      0 - 1 0.2134405 0.8309833740 0.830983374
data %>% kruskal_effsize(PRI_total ~ SVGroup)
## # A tibble: 1 × 5
##   .y.           n effsize method  magnitude
## * <chr>     <int>   <dbl> <chr>   <ord>    
## 1 PRI_total   566  0.0235 eta2[H] small

Both individuals in the ASA only group and the revictimized group perceive their partners as being less responsive than individuals in the no ASA group. There are no significant differences between individuals in the ASA only and the revictimized groups.

Hypothesis 4

Multiple victimizations (i.e., more than one ASA experience) will be associated with poorer (a1) romantic relationship quality, (a2) partner trust, and (b) lower sexual satisfaction.

data$multvic<- data$SV_1 + data$SV_2 + data$SV_3 + data$SV_4
SAdata<- subset(data, AnyASA==1)

# Effect coding 
SAdata<- SAdata %>%
  mutate(multvic.log = case_when(
    SAdata$multvic==1 ~ -1,
    SAdata$multvic>1 ~ 1
  ))
SAdata$multvic.log<- as.factor(SAdata$multvic.log)

ggplot(SAdata, aes(multvic.log, PRQC)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Multiple victimizations", y="PRQC") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

ggplot(SAdata, aes(multvic.log, NSSS)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Multiple victimizations", y="NSSS") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

ggplot(SAdata, aes(multvic.log, Trust)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Multiple victimizations", y="Trust") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

ggplot(SAdata, aes(multvic.log, PRI_total)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Multiple victimizations", y="PRI") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

#Mean differences
group_by(SAdata, multvic.log) %>%
  summarise(
    count = n(),
    mean = mean(PRQC, na.rm = TRUE),
    sd = sd(PRQC, na.rm = TRUE),
    median = median(PRQC, na.rm = TRUE),
    IQR = IQR(PRQC, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   multvic.log count  mean    sd median   IQR
##   <fct>       <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1             85  5.70  1.14   5.89  1.28
## 2 1             266  5.67  1.13   6     1.38
group_by(SAdata, multvic.log) %>%
  summarise(
    count = n(),
    mean = mean(NSSS, na.rm = TRUE),
    sd = sd(NSSS, na.rm = TRUE),
    median = median(NSSS, na.rm = TRUE),
    IQR = IQR(NSSS, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   multvic.log count  mean    sd median   IQR
##   <fct>       <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1             85  3.35  1.06   3.42  1.5 
## 2 1             266  3.36  1.09   3.58  1.58
group_by(SAdata, multvic.log) %>%
  summarise(
    count = n(),
    mean = mean(Trust, na.rm = TRUE),
    sd = sd(Trust, na.rm = TRUE),
    median = median(Trust, na.rm = TRUE),
    IQR = IQR(Trust, na.rm = TRUE)
  )
## # A tibble: 2 × 6
##   multvic.log count  mean    sd median   IQR
##   <fct>       <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1             85  6.07  1.28   6.33  1.33
## 2 1             266  5.76  1.46   6.33  1.67
## Non-parametric ttests
#PRQC
wilcox_effsize(PRQC ~ multvic.log, data=SAdata)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 PRQC  -1     1       0.0136    85   266 small
wilcox_test(PRQC ~ multvic.log, data=SAdata, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  PRQC by multvic.log (-1, 1)
## Z = 0.25489, p-value = 0.7988
## alternative hypothesis: true mu is not equal to 0
wilcox.test(PRQC ~ multvic.log, data=SAdata, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  PRQC by multvic.log
## W = 11512, p-value = 0.7993
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  -0.1666737  0.2777265
## sample estimates:
## difference in location 
##           4.806546e-05
# Trust
wilcox_effsize(Trust ~ multvic.log, data=SAdata)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 Trust -1     1       0.0934    85   266 small
wilcox_test(Trust ~ multvic.log, data=SAdata, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  Trust by multvic.log (-1, 1)
## Z = 1.7505, p-value = 0.08003
## alternative hypothesis: true mu is not equal to 0
wilcox.test(Trust ~ multvic.log, data=SAdata, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  Trust by multvic.log
## W = 12695, p-value = 0.08014
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  -9.392948e-06  3.334085e-01
## sample estimates:
## difference in location 
##           1.858111e-05
# Sexual Satisfaction
wilcox_effsize(NSSS ~ multvic.log, data=SAdata)
## # A tibble: 1 × 7
##   .y.   group1 group2 effsize    n1    n2 magnitude
## * <chr> <chr>  <chr>    <dbl> <int> <int> <ord>    
## 1 NSSS  -1     1      0.00774    85   266 small
wilcox_test(NSSS ~ multvic.log, data=SAdata, conf.level=.95)
## 
##  Asymptotic Wilcoxon-Mann-Whitney Test
## 
## data:  NSSS by multvic.log (-1, 1)
## Z = -0.14497, p-value = 0.8847
## alternative hypothesis: true mu is not equal to 0
wilcox.test(NSSS ~ multvic.log, data=SAdata, alternative=c("two.sided"), conf.int=T, conf.level=.95)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  NSSS by multvic.log
## W = 11187, p-value = 0.8852
## alternative hypothesis: true location shift is not equal to 0
## 95 percent confidence interval:
##  -0.3332543  0.2499712
## sample estimates:
## difference in location 
##          -2.580545e-05
#Correlations dont' really make sense here because we don't know exactly how many incidents each person experience (e.g., if they say more than 4, we don't know how many more than 4), but I wanted to do a sanity check here to make sure we're seeing similar patterns of results using the continuous-ish variable vs. the dichotomized variable
cor.test(SAdata$multvic, SAdata$Trust, method="spearman")
## Warning in cor.test.default(SAdata$multvic, SAdata$Trust, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  SAdata$multvic and SAdata$Trust
## S = 7702145, p-value = 0.1993
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##         rho 
## -0.06867367
cor.test(SAdata$multvic, SAdata$PRQC, method="spearman")
## Warning in cor.test.default(SAdata$multvic, SAdata$PRQC, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  SAdata$multvic and SAdata$PRQC
## S = 6998467, p-value = 0.5887
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## 0.02896168
cor.test(SAdata$multvic, SAdata$NSSS, method="spearman")
## Warning in cor.test.default(SAdata$multvic, SAdata$NSSS, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  SAdata$multvic and SAdata$NSSS
## S = 6909446, p-value = 0.4404
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## 0.04131336
cor.test(SAdata$multvic, SAdata$PRI_total, method="spearman")
## Warning in cor.test.default(SAdata$multvic, SAdata$PRI_total, method =
## "spearman"): Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  SAdata$multvic and SAdata$PRI_total
## S = 7362997, p-value = 0.6865
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.0216169

I created a binary variable where someone can be in either the one ASA experience bin or more than once bin (I excluded participants with no history of assault). There were no significant differences between groups in any of the dependent variables.

Hypothesis 5

Time since sexual assault will be associated with (a1) romantic relationship quality, (a2) partner trust, and (b) sexual satisfaction, such that participants who report more recent sexual assault experiences will report poorer romantic relationship quality and partner trust and lower sexual satisfaction.

summary(SAdata$min_t)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    5.00    9.00   11.72   15.50   56.17       1
sd(SAdata$min_t, na.rm=T)
## [1] 10.12415
hist(SAdata$min_t, main="Histogram of SV Timing", xlab="Most recent SV experience", 
     col='hotpink', sub=paste("Skewness:", 
               round(e1071::skewness(SAdata$min_t, na.rm=TRUE), 2)))

#plots
ggplot(SAdata, aes(x = min_t, y = PRQC)) +
geom_point(alpha = 0.6, aes(color = "hotpink")) +
ggtitle("SV timing vs PRQC") +
xlab("SV timing") +
ylab("PRQC")
## Warning: Removed 1 rows containing missing values (`geom_point()`).

ggplot(SAdata, aes(x = min_t, y = NSSS)) +
geom_point(alpha = 0.6, aes(color = "hotpink")) +
ggtitle("SV timing vs NSSS") +
xlab("SV timing") +
ylab("NSSS")
## Warning: Removed 1 rows containing missing values (`geom_point()`).

ggplot(SAdata, aes(x = min_t, y = PRI_total)) +
geom_point(alpha = 0.6, aes(color = "hotpink")) +
ggtitle("SV timing vs PRI") +
xlab("SV timing") +
ylab("PRI_total")
## Warning: Removed 1 rows containing missing values (`geom_point()`).

ggplot(SAdata, aes(x = min_t, y = Trust)) +
geom_point(alpha = 0.6, aes(color = "hotpink")) +
ggtitle("SV timing vs Trust") +
xlab("SV timing") +
ylab("Trust")
## Warning: Removed 1 rows containing missing values (`geom_point()`).

#Correlations
timingdata<- SAdata %>%
  select(min_t, PRQC, Trust, NSSS, PRI_total, AAQ.AV, AAQ.ANX, relLength, Age_1)
timingdata <- timingdata[complete.cases(timingdata), ]

rcorr(as.matrix(timingdata), type = c("spearman"))
##           min_t  PRQC Trust  NSSS PRI_total AAQ.AV AAQ.ANX relLength Age_1
## min_t      1.00 -0.11  0.00 -0.07     -0.08  -0.04   -0.23      0.64  0.74
## PRQC      -0.11  1.00  0.78  0.71      0.74  -0.22   -0.35     -0.15 -0.15
## Trust      0.00  0.78  1.00  0.45      0.71  -0.25   -0.39     -0.02 -0.06
## NSSS      -0.07  0.71  0.45  1.00      0.46  -0.21   -0.29     -0.10 -0.07
## PRI_total -0.08  0.74  0.71  0.46      1.00  -0.23   -0.40     -0.15 -0.13
## AAQ.AV    -0.04 -0.22 -0.25 -0.21     -0.23   1.00    0.34      0.04 -0.10
## AAQ.ANX   -0.23 -0.35 -0.39 -0.29     -0.40   0.34    1.00     -0.22 -0.20
## relLength  0.64 -0.15 -0.02 -0.10     -0.15   0.04   -0.22      1.00  0.51
## Age_1      0.74 -0.15 -0.06 -0.07     -0.13  -0.10   -0.20      0.51  1.00
## 
## n= 350 
## 
## 
## P
##           min_t  PRQC   Trust  NSSS   PRI_total AAQ.AV AAQ.ANX relLength Age_1 
## min_t            0.0413 0.9455 0.1655 0.1136    0.4683 0.0000  0.0000    0.0000
## PRQC      0.0413        0.0000 0.0000 0.0000    0.0000 0.0000  0.0049    0.0054
## Trust     0.9455 0.0000        0.0000 0.0000    0.0000 0.0000  0.6929    0.2840
## NSSS      0.1655 0.0000 0.0000        0.0000    0.0001 0.0000  0.0686    0.1674
## PRI_total 0.1136 0.0000 0.0000 0.0000           0.0000 0.0000  0.0063    0.0133
## AAQ.AV    0.4683 0.0000 0.0000 0.0001 0.0000           0.0000  0.4809    0.0650
## AAQ.ANX   0.0000 0.0000 0.0000 0.0000 0.0000    0.0000         0.0000    0.0001
## relLength 0.0000 0.0049 0.6929 0.0686 0.0063    0.4809 0.0000            0.0000
## Age_1     0.0000 0.0054 0.2840 0.1674 0.0133    0.0650 0.0001  0.0000
# exploratory regressions conditioning on relationship length
timeNSSS<- lm(NSSS ~ Age_1 + relLength + min_t, data=SAdata)
summary(timeNSSS)
## 
## Call:
## lm(formula = NSSS ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4625 -0.7239  0.1922  0.8411  1.9464 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.554604   0.225387  15.771   <2e-16 ***
## Age_1       -0.003824   0.008068  -0.474    0.636    
## relLength   -0.013322   0.010350  -1.287    0.199    
## min_t        0.003970   0.010235   0.388    0.698    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.083 on 346 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.008574,   Adjusted R-squared:  -2.2e-05 
## F-statistic: 0.9974 on 3 and 346 DF,  p-value: 0.3941
lm.beta(timeNSSS)
## 
## Call:
## lm(formula = NSSS ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Standardized Coefficients::
## (Intercept)       Age_1   relLength       min_t 
##          NA -0.04197067 -0.08943191  0.03711582
confint(timeNSSS, level=.95)
##                   2.5 %      97.5 %
## (Intercept)  3.11130275 3.997905768
## Age_1       -0.01969217 0.012044038
## relLength   -0.03367951 0.007034979
## min_t       -0.01616032 0.024101263
timePRQC<- lm(PRQC.win ~ Age_1 + relLength + min_t, data=SAdata)
summary(timePRQC)
## 
## Call:
## lm(formula = PRQC.win ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7345 -0.6126  0.1288  0.7576  1.4859 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.213540   0.185566  33.484   <2e-16 ***
## Age_1       -0.013572   0.006642  -2.043   0.0418 *  
## relLength   -0.014718   0.008522  -1.727   0.0850 .  
## min_t        0.016109   0.008427   1.912   0.0567 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8917 on 346 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.02365,    Adjusted R-squared:  0.01519 
## F-statistic: 2.794 on 3 and 346 DF,  p-value: 0.0403
lm.beta(timePRQC)
## 
## Call:
## lm(formula = PRQC.win ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Standardized Coefficients::
## (Intercept)       Age_1   relLength       min_t 
##          NA  -0.1795407  -0.1190878   0.1815039
confint(timePRQC, level=.95)
##                     2.5 %        97.5 %
## (Intercept)  5.8485612671  6.5785184796
## Age_1       -0.0266363585 -0.0005073321
## relLength   -0.0314785324  0.0020424830
## min_t       -0.0004651678  0.0326829600
timeTrust<- lm(Trust.win ~ Age_1 + relLength + min_t, data=SAdata)
summary(timeTrust)
## 
## Call:
## lm(formula = Trust.win ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8978 -0.7553  0.2662  0.9103  1.2649 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.293237   0.204958  30.705   <2e-16 ***
## Age_1       -0.011039   0.007337  -1.505   0.1333    
## relLength   -0.006509   0.009412  -0.692   0.4897    
## min_t        0.017193   0.009307   1.847   0.0656 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9849 on 346 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.01013,    Adjusted R-squared:  0.001549 
## F-statistic:  1.18 on 3 and 346 DF,  p-value: 0.3171
lm.beta(timeTrust)
## 
## Call:
## lm(formula = Trust.win ~ Age_1 + relLength + min_t, data = SAdata)
## 
## Standardized Coefficients::
## (Intercept)       Age_1   relLength       min_t 
##          NA -0.13313383 -0.04800964  0.17659987
confint(timeTrust, level=.95)
##                    2.5 %     97.5 %
## (Intercept)  5.890115458 6.69635784
## Age_1       -0.025469245 0.00339043
## relLength   -0.025020751 0.01200342
## min_t       -0.001113168 0.03549915
mean(timingdata$min_t, na.rm=T)
## [1] 11.7219
sd(timingdata$min_t, na.rm=T)
## [1] 10.12415

The variable \(min_t\) filters through all of their SV timing variables and selects the most recent experience. The correlations between amount of time since one’s most recent sexual assault experience and PRQC, trust, sexual satisfaction, and perceived partner responsiveness are very small and likely insignificant. None of the exploratory regressions that conditioned on relationship length were significant.

Exploratory Question

qualdatafull<- data[, c("SubjectID", "SVGroup", "SV_partner_response", "SV_relationship")] #creating dataframe that only has subject ID, assault status, and qualitative data

qualdata<- subset(qualdatafull, SVGroup==0 | SVGroup==1) #removing people that haven't experienced SA

write_xlsx(qualdata, "~/Downloads/qualdata.xlsx") #function that exports this dataframe to a xcel file

Exploratory Question

Does attachment orientation moderate the association between ASA and (a1) romantic relationship quality, (a2) partner trust, or (b) sexual satisfaction such that individuals who have experienced ASA and are anxiously or avoidantly attached report worse relationship quality and lower partner trust and sexual satisfaction than individuals who have experienced ASA and are securely attached?

group_by(data, SVGroup) %>% #descriptives for attachment anxiety
  summarise(
    count = n(),
    mean = mean(AAQ.ANX, na.rm = TRUE),
    sd = sd(AAQ.ANX, na.rm = TRUE),
    median = median(AAQ.ANX, na.rm = TRUE),
    IQR = IQR(AAQ.ANX, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  3.26  1.16   3.33  1.56
## 2 0         198  3.39  1.19   3.44  1.78
## 3 1         153  3.68  1.23   3.67  1.56
group_by(data, SVGroup) %>% #descriptives for attachment avoidance
  summarise(
    count = n(),
    mean = mean(AAQ.AV, na.rm = TRUE),
    sd = sd(AAQ.AV, na.rm = TRUE),
    median = median(AAQ.AV, na.rm = TRUE),
    IQR = IQR(AAQ.AV, na.rm = TRUE)
  )
## # A tibble: 3 × 6
##   SVGroup count  mean    sd median   IQR
##   <fct>   <int> <dbl> <dbl>  <dbl> <dbl>
## 1 -1        215  3.63  1.33   3.5   1.88
## 2 0         198  3.89  1.27   4     1.62
## 3 1         153  4.07  1.41   4.12  2.25
ggplot(data, aes(AnyASA, AAQ.ANX)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="Attachment Anxiety") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

ggplot(data, aes(AnyASA, AAQ.AV)) + 
  geom_boxplot(fill = "lightpink", color = "hotpink") +
  labs(x="Assault History", y="Attachment Avoidance") +
  theme_bw() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

AAQ.ANX.kruskal<- kruskal.test(AAQ.ANX ~ SVGroup, data = data)
AAQ.ANX.kruskal
## 
##  Kruskal-Wallis rank sum test
## 
## data:  AAQ.ANX by SVGroup
## Kruskal-Wallis chi-squared = 8.3054, df = 2, p-value = 0.01572
dunnTest(AAQ.ANX ~ SVGroup, data=data, method="bh")
## Dunn (1964) Kruskal-Wallis multiple comparison
##   p-values adjusted with the Benjamini-Hochberg method.
##   Comparison          Z     P.unadj      P.adj
## 1     -1 - 0 -0.9900569 0.322146299 0.32214630
## 2     -1 - 1 -2.8638218 0.004185634 0.01255690
## 3      0 - 1 -1.9080782 0.056381104 0.08457166
data %>% kruskal_effsize(AAQ.ANX ~ SVGroup)
## # A tibble: 1 × 5
##   .y.         n effsize method  magnitude
## * <chr>   <int>   <dbl> <chr>   <ord>    
## 1 AAQ.ANX   566  0.0112 eta2[H] small
AAQ.AV.kruskal<- kruskal.test(AAQ.AV ~ SVGroup, data = data)
AAQ.AV.kruskal
## 
##  Kruskal-Wallis rank sum test
## 
## data:  AAQ.AV by SVGroup
## Kruskal-Wallis chi-squared = 12.192, df = 2, p-value = 0.002252
dunnTest(AAQ.AV ~ SVGroup, data=data, method="bh")
## Dunn (1964) Kruskal-Wallis multiple comparison
##   p-values adjusted with the Benjamini-Hochberg method.
##   Comparison         Z      P.unadj       P.adj
## 1     -1 - 0 -2.191903 0.0283865227 0.042579784
## 2     -1 - 1 -3.410708 0.0006479446 0.001943834
## 3      0 - 1 -1.345700 0.1783992345 0.178399234
data %>% kruskal_effsize(AAQ.AV ~ SVGroup)
## # A tibble: 1 × 5
##   .y.        n effsize method  magnitude
## * <chr>  <int>   <dbl> <chr>   <ord>    
## 1 AAQ.AV   566  0.0181 eta2[H] small
attach.PRQC.gamma.mod<- glm(formula= InversePRQC ~ SVGroup*cANX + SVGroup*cAV, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
attach.prqc.lin.mod<- lm(PRQC.win ~ SVGroup*cANX + SVGroup*cAV, data=data)
summary(attach.prqc.lin.mod)
## 
## Call:
## lm(formula = PRQC.win ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1550 -0.5192  0.1371  0.5993  1.6315 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    5.88438    0.03487 168.732  < 2e-16 ***
## SVGroup1       0.07959    0.04753   1.674   0.0946 .  
## SVGroup2      -0.09722    0.04815  -2.019   0.0440 *  
## cANX          -0.21150    0.03085  -6.856 1.88e-11 ***
## cAV           -0.11879    0.02752  -4.316 1.88e-05 ***
## SVGroup1:cANX  0.06538    0.04324   1.512   0.1311    
## SVGroup2:cANX  0.05807    0.04282   1.356   0.1756    
## SVGroup1:cAV  -0.04724    0.03812  -1.239   0.2158    
## SVGroup2:cAV   0.05176    0.03919   1.321   0.1872    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8079 on 557 degrees of freedom
## Multiple R-squared:  0.1769, Adjusted R-squared:  0.1651 
## F-statistic: 14.97 on 8 and 557 DF,  p-value: < 2.2e-16
lm.beta(attach.prqc.lin.mod)
## 
## Call:
## lm(formula = PRQC.win ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Standardized Coefficients::
##   (Intercept)      SVGroup1      SVGroup2          cANX           cAV 
##            NA    0.07197322   -0.08622093   -0.28716247   -0.18040574 
## SVGroup1:cANX SVGroup2:cANX  SVGroup1:cAV  SVGroup2:cAV 
##    0.07124407    0.06274857   -0.05905346    0.06165583
confint(attach.prqc.lin.mod, level=.95)
##                     2.5 %      97.5 %
## (Intercept)    5.81587794  5.95287975
## SVGroup1      -0.01377401  0.17294947
## SVGroup2      -0.19180273 -0.00262939
## cANX          -0.27208983 -0.15090758
## cAV           -0.17285095 -0.06473450
## SVGroup1:cANX -0.01955814  0.15032196
## SVGroup2:cANX -0.02603448  0.14216736
## SVGroup1:cAV  -0.12212683  0.02764478
## SVGroup2:cAV  -0.02522158  0.12873287

EQ2.A2

attach.trust.gamma.mod<- glm(formula= InverseTrust.win ~ SVGroup*cANX + SVGroup*cAV, family=Gamma(link="log"),
                     na.action=na.exclude, data=data)
attach.trust.lin.mod<- lm(Trust.win ~ SVGroup*cANX + SVGroup*cAV, data=data)
summary(attach.trust.lin.mod)
## 
## Call:
## lm(formula = Trust.win ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.3671 -0.6304  0.1532  0.6336  1.8995 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    6.113145   0.036317 168.326  < 2e-16 ***
## SVGroup1       0.062344   0.049498   1.260 0.208362    
## SVGroup2      -0.008754   0.050147  -0.175 0.861485    
## cANX          -0.284023   0.032124  -8.842  < 2e-16 ***
## cAV           -0.112132   0.028660  -3.912 0.000103 ***
## SVGroup1:cANX  0.035184   0.045033   0.781 0.434959    
## SVGroup2:cANX  0.011576   0.044588   0.260 0.795247    
## SVGroup1:cAV  -0.010089   0.039702  -0.254 0.799491    
## SVGroup2:cAV   0.031098   0.040811   0.762 0.446388    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8413 on 557 degrees of freedom
## Multiple R-squared:  0.2107, Adjusted R-squared:  0.1994 
## F-statistic: 18.59 on 8 and 557 DF,  p-value: < 2.2e-16
lm.beta(attach.trust.lin.mod)
## 
## Call:
## lm(formula = Trust.win ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Standardized Coefficients::
##   (Intercept)      SVGroup1      SVGroup2          cANX           cAV 
##            NA   0.053015185  -0.007300566  -0.362619300  -0.160128247 
## SVGroup1:cANX SVGroup2:cANX  SVGroup1:cAV  SVGroup2:cAV 
##   0.036050703   0.011763150  -0.011859639   0.034835533
confint(attach.trust.lin.mod, level=.95)
##                     2.5 %      97.5 %
## (Intercept)    6.04180956  6.18448035
## SVGroup1      -0.03488050  0.15956938
## SVGroup2      -0.10725451  0.08974661
## cANX          -0.34712113 -0.22092450
## cAV           -0.16842713 -0.05583695
## SVGroup1:cANX -0.05327080  0.12363874
## SVGroup2:cANX -0.07600468  0.09915715
## SVGroup1:cAV  -0.08807395  0.06789504
## SVGroup2:cAV  -0.04906475  0.11126015

EQ2.A3

attach.sexsat.mod<- lm(NSSS ~ SVGroup*cANX + SVGroup*cAV, data=data)
summary(attach.sexsat.mod)
## 
## Call:
## lm(formula = NSSS ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.7985 -0.5951  0.1209  0.6568  1.9521 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    3.39736    0.04203  80.841  < 2e-16 ***
## SVGroup1      -0.02322    0.05728  -0.405    0.685    
## SVGroup2      -0.01174    0.05803  -0.202    0.840    
## cANX          -0.20288    0.03717  -5.458 7.26e-08 ***
## cAV           -0.15925    0.03316  -4.802 2.02e-06 ***
## SVGroup1:cANX  0.05828    0.05211   1.118    0.264    
## SVGroup2:cANX  0.04950    0.05160   0.959    0.338    
## SVGroup1:cAV  -0.07506    0.04594  -1.634    0.103    
## SVGroup2:cAV   0.07598    0.04723   1.609    0.108    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9735 on 557 degrees of freedom
## Multiple R-squared:  0.1424, Adjusted R-squared:   0.13 
## F-statistic: 11.56 on 8 and 557 DF,  p-value: 3.023e-15
lm.beta(attach.sexsat.mod)
## 
## Call:
## lm(formula = NSSS ~ SVGroup * cANX + SVGroup * cAV, data = data)
## 
## Standardized Coefficients::
##   (Intercept)      SVGroup1      SVGroup2          cANX           cAV 
##            NA  -0.017783564  -0.008819981  -0.233340737  -0.204858666 
## SVGroup1:cANX SVGroup2:cANX  SVGroup1:cAV  SVGroup2:cAV 
##   0.053793628   0.045315418  -0.079477365   0.076673853
confint(attach.sexsat.mod, level=.95)
##                     2.5 %      97.5 %
## (Intercept)    3.31481355  3.47990886
## SVGroup1      -0.13572154  0.08929133
## SVGroup2      -0.12572259  0.10224251
## cANX          -0.27589968 -0.12986788
## cAV           -0.22439011 -0.09410338
## SVGroup1:cANX -0.04407821  0.16063738
## SVGroup2:cANX -0.05184216  0.15085103
## SVGroup1:cAV  -0.16529935  0.01518433
## SVGroup2:cAV  -0.01678067  0.16874357

Conclusion: There are group differences in attachment such that revictimized individuals report more attachment anxiety and avoidance but there were no moderation effects.

Prescreener descriptives

SV.check <- data[, c("SubjectID", "SV_1", "SV_2", "SV_3", "SV_4", "ACE_1", "ACE_2", "ACE_3", "ACE.pre", "someASA", "someCSA", "ASAonly", "revictimized", "NeitherASAnorCSA", "SV_1_log", "SV_1.pre", "SV_2_log", "SV_2.pre", "SV_3_log", "SV_3.pre", "SV_4_log", "SV_4.pre"   )]

SV.check<- SV.check %>%
  mutate(SV1.check = case_when(
    SV.check$SV_1_log==TRUE & SV.check$SV_1.pre==1~ 0,
    SV.check$SV_1_log==FALSE & SV.check$SV_1.pre==0~ 0,
   SV.check$SV_1_log==TRUE & SV.check$SV_1.pre==0~ 1,
   SV.check$SV_1_log==FALSE & SV.check$SV_1.pre==1~ 1
  ))


SV.check<- SV.check %>%
  mutate(SV2.check = case_when(
    SV.check$SV_2_log==TRUE & SV.check$SV_2.pre==1~ 0,
    SV.check$SV_2_log==FALSE & SV.check$SV_2.pre==0~ 0,
   SV.check$SV_2_log==TRUE & SV.check$SV_2.pre==0~ 1,
   SV.check$SV_2_log==FALSE & SV.check$SV_2.pre==1~ 1
  ))

sum(SV.check$SV2.check)
## [1] 74
SV.check$someASA.pre<- SV.check$SV_1.pre | SV.check$SV_2.pre | SV.check$SV_3.pre | SV.check$SV_4.pre


SV.check<- SV.check %>%
  mutate(ASA.check = case_when(
    SV.check$someASA==TRUE & SV.check$someASA.pre==TRUE~ 0,
    SV.check$someASA==FALSE & SV.check$someASA.pre==FALSE~ 0,
    SV.check$someASA==TRUE & SV.check$someASA.pre==FALSE~ 1,
    SV.check$someASA==FALSE & SV.check$someASA.pre==TRUE~ 2
  ))

table(SV.check$ASA.check)
## 
##   0   1   2 
## 533  14  19
SV.check<- SV.check %>%
  mutate(CSA.check = case_when(
    SV.check$someCSA==TRUE & SV.check$ACE.pre==1~ 0,
    SV.check$someCSA==FALSE & SV.check$ACE.pre==0~ 0,
    SV.check$someCSA==TRUE & SV.check$ACE.pre==0~ 1,
    SV.check$someCSA==FALSE & SV.check$ACE.pre==1~ 2
  ))

table(SV.check$CSA.check)
## 
##   0   1   2 
## 538  14  14
sum(SV.check$ASA.check)
## [1] 52
sum(SV.check$CSA.check)
## [1] 42
data<- cbind(data, SV.check$ASA.check, SV.check$CSA.check)
discrepant<- subset(data, SV.check$ASA.check==1 | SV.check$CSA.check==1) #no glaring oddities for people with inconsistent responses between surveys

Coding “Other” Responses

Other.responses <- data[, c("SubjectID", "Gender_2", "Gender_3", "Gender_4", "Gender_5", "Gender_6", "Gender_7", "Gender_7_TEXT", "Orientation", "Orientation_4_TEXT", "SV_perp_1", "SV_perp_2", "SV_perp_3", "SV_perp_4", "SV_perp_5", "SV_perp_6", "SV_perp_7", "SV_perp_8", "SV_perp_8_TEXT")]

write_xlsx(Other.responses, "~/Downloads/RRSE.Other.responses.xlsx") #function that exports this dataframe to a xcel file