Social Distancing from Innocent Victims by Spatial Distality

Journal of Personality and Social Psychology, 2025

READ ME

This Supplementary Materials document contains the additional output, analysis code, and data sets associated with Dawtry et al. (2025). Please select the relevant tabs to find the information of interest. The following information can also be found at https://osf.io/6ygtd/?view_only=3f66f74127af4b278a60b3499dfb6455

Stimuli

Stimuli contains the additional stimuli scenarios presented to participants across studies.

Analysis Prerequisite

Analysis prerequisite contains the packages, distance extraction function, and session information needed to run the analyses for each Study. Please run this code prior to Study specific analyses.

Study 1-7

Study 1—Study 7 contain the commented analysis scripts associated with each corresponding Study.

Data

Data contains the open-access data sets to accompany all nine Studies.
Data structure and relevant information are reported.

Stimuli

Study 1a

Just Unjust
Jess was driving home late at night and hit a pothole in the middle of the road, popping a tyre. Jess reported the unmarked pothole to the council for it to be fixed and to be reimbursed for the tyre. The council took blame for the incident, fixing the pothole immediately and replacing Jess’s tyre.  Jess was driving home late at night and hit a pothole in the middle of the road, popping a tyre. Jess reported the unmarked pothole to the council for it to be fixed and to be reimbursed for the tyre. The council refused to fix the pothole or reimburse Jess for the tyre.
Frankie was crossing the road on the way to the supermarket. At the crossing, Frankie was hit by a drunk driver who ran through a red light. The drunk driver didn’t stop to help and continued driving on. Frankie was seriously injured and had to go to hospital to treat a fractured hip. The next day the police identified the drunk driver, who was eventually sentenced to two years in prison. Frankie was crossing the road on the way to the supermarket. At the crossing, Frankie was hit by a drunk driver who ran through a red light. The drunk driver did not stop to help and continued driving on. Frankie was seriously injured and had to go to hospital to treat a fractured hip. The drunk driver was never found. 
Lee is an accountant with a masters degree in finance who has worked for the same accounting firm for the past ten years. Last week Lee was up for a promotion against another accountant who has only been with the firm for two years and who only has an undergraduate degree in accounting. Lee got the promotion, which came with a 50% pay rise.   Lee is an accountant with a masters degree in finance who has worked for the same accounting firm for the past ten years. Last week Lee was up for a promotion against another accountant, Parker, who has only been with the firm for two years and who only has an undergraduate degree in accounting. Parker got the promotion, which came with a 50% pay rise. 
Charlie’s apartment block was repeatedly vandalised with offensive graffiti. Charlie and other residents reported the matter to the police and CCTV around the building was available. The graffiti was removed by the council, and police identified and charged the individual responsible. Charlie’s apartment block was repeatedly vandalised with offensive graffiti. Although Charlie and other residents reported the matter to the police and CCTV around the building was available, the graffiti was not deemed a serious enough issue to investigate and nothing was done.
Blake was driving home from work during a powerful storm. While waiting at a traffic light, Blake’s car was hit by a tree branch torn down by the wind, which completely damaged the front of the car. Blake sought help from a passer-by and asked to be picked up. The passer-by agreed to help, driving Blake home safely in the next twenty minutes.  Blake was driving home from work during a powerful storm. While waiting at a traffic light, Blake’s car was hit by a tree branch torn down by the wind, which completely damaged the front of the car. Blake sought help from a passer-by and asked to be picked up. The passer-by refused to help. Blake then had to walk back home for an hour during the storm.
Sam has just bought a new car. Whilst shopping at the supermarket, Sam’s new car is broken into and stolen. Sam reports the incident to the police. Fortunately, eyewitnesses were present at the time and the supermarket provided CCTV. The police are therefore able to locate Sam’s car, and the individuals responsible are identified and charged Sam has just bought a new car. Whilst shopping at the supermarket, Sam’s new car is broken into and stolen. Sam reports the incident to the police. Unfortunately, no eyewitnesses were present at the time and the supermarket could not provide CCTV. The police are unable to locate Sam’s car or identify the thief.
Alex was walking back home from the park. Suddenly, a random passer-by bumped into Alex and quickly grabbed Alex’s wallet. Alex called the authorities, which used other passer-by’s testimonies to identify the thief. Alex’s wallet was returned with all its contents: £100 and all personal documents.   Alex was walking back home from the park. Suddenly, a random passer-by bumped into Alex and quickly grabbed Alex’s wallet. Alex called the authorities, which ultimately were not able to identify the thief and the case was dropped. Alex never received the wallet back and lost £100 and all personal documents.  
After saving up for many months, Billie is going on holiday with friends. Upon landing at their destination, Billie’s suitcase is missing, and Billie reports it to the airline. The airline is able to locate Billie’s luggage, and promptly returns it within 24 hours.    After saving up for many months, Billie is going on holiday with friends. Upon landing at their destination, Billie’s suitcase is missing, and Billie reports it to the airline. However, the airline is unable to locate Billie’s luggage for the duration of the holiday, leaving Billie to spend a large portion of holiday money on replacement clothes and items.  
Jamie has a savings account with an online bank. Jamie’s account was hacked, and Jamie lost all the savings in the account. However, the bank was able to track the hacker and all the money was returned to Jamie.    Jamie has a savings account with an online bank. Jamie’s account was hacked, and Jamie lost all the savings in the account. The bank was unable to track the hacker and the money was never reimbursed. 
Last week, Ali moved into a new home. Yesterday, Ali came home to find the new property on fire. Ali called the fire service and they arrived within 5 minutes. They were therefore able to put the fire out quickly with minimal damage to the property and Ali’s belongings. Last week, Ali moved into a new home. Yesterday, Ali came home to find the new property on fire. Ali called the fire service. However, they took 40 minutes to arrive. By the time they managed to put the fire out, the property was seriously damaged, and Ali’s belongings were unable to be recovered.
Jordan was walking to the train station. A stranger was walking in the opposite direction and suddenly stopped and looked at Jordan. The stranger starts verbally confronting Jordan and ends up punching Jordan in the face. Jordan reports the situation to the police who reassure Jordan that the situation will not go unnoticed. A few weeks later, Jordan is informed that the perpetrator has been charged for physical assault. Jordan was walking to the train station. A stranger was walking in the opposite direction and suddenly stopped and looked at Jordan. The stranger starts verbally confronting Jordan and ends up punching Jordan in the face. Jordan reports the situation to the police, but the police do not press charges on the perpetrator.    
Cameron goes to the GP for a routine health check-up. The GP refers Cameron to a dermatologist to treat a mild skin problem. There are no complications with the prescribed treatment and it is a success. Cameron’s skin problem is resolved. Cameron goes to the GP for a routine health check-up. The GP refers Cameron to a dermatologist to treat a mild skin problem. However, there are unforeseen complications with the prescribed treatment. Cameron has a bad reaction and is left with permanent facial scars.
Note. The Just and Unjust scenarios presented in Study 1a. Participants reviewed 3 Just and 3 Unjust scenarios.

Study 1b

Just Unjust
Katie visited a new restaurant with friends. She is allergic to shellfish, so asked the waiter to check for any shellfish-based additives. Katie was assured her order was allergen-free and the kitchen is careful to avoid contamination. Shortly after starting her meal, Katie had an allergic reaction which caused her face to swell. The restaurant took full responsibility and apologised. As well as not charging Katie and her friends for their meal, they gifted Katie an expensive bottle of champagne. Katie visited a new restaurant with friends. She is allergic to shellfish, so asked the waiter to check for any shellfish-based additives. Katie was assured her order was allergen-free and the kitchen is careful to avoid contamination. Shortly after starting her meal, Katie had an allergic reaction which caused her face to swell. The restaurant denied responsibility and claimed Katie did not make them aware of her allergy. They refused to apologise, and Katie and her friends had to pay for their meal.
Sarah returned home one morning after a night shift to find her house had been broken into. The burglar had forced a window at the rear of the property. She discovered that the thieves had taken a valuable box of jewellery she had inherited from her beloved grandmother. Sarah was about to call the police when an officer knocked on her door. A neighbour, who happened to be up early, had alerted the police who had quickly apprehended the thief. All the jewellery was returned to Sarah. Sarah returned home one morning after a night shift to find her house had been broken into. The burglar had forced a window at the rear of the property. She discovered that the thieves had taken a valuable box of jewellery she had inherited from her beloved grandmother. Sarah called the police, who assured her they would investigate. The police eventually identified the thief, but he had just been deported and so there was nothing they could do. The jewellery was never returned to Sarah.
Note. The same scenario stimuli were in Study 1b as in Study 1a, apart from the Sam and Billie scenarios which were replaced with the above Katie and Sarah scenarios. Participants still reviewed 3 Just and 3 Unjust scenarios.

Study 1c

Please see the Jamie scenarios from Study 1a.

Study 2

Please see stimuli for Study 1b.

Study 3

Just Unjust
Last week, Ali moved into a new home. Yesterday, Ali came home to find the new property on fire. Ali called the fire service and they arrived within 5 minutes. They were therefore able to put the fire out quickly with minimal damage to the property and Ali’s belongings. Last week, Ali moved into a new home. Yesterday, Ali came home to find the new property on fire. Ali called the fire service. However, they took 40 minutes to arrive. By the time they managed to put the fire out, the property was seriously damaged, and Ali’s belongings were unable to be recovered.
Jordan was walking to the train station. A stranger was walking in the opposite direction and suddenly stopped and looked at Jordan. The stranger starts verbally confronting Jordan and ends up punching Jordan in the face. Jordan reports the situation to the police who reassure Jordan that the situation will not go unnoticed. A few weeks later, Jordan is informed that the perpetrator has been charged for physical assault. Jordan was walking to the train station. A stranger was walking in the opposite direction and suddenly stopped and looked at Jordan. The stranger starts verbally confronting Jordan and ends up punching Jordan in the face. Jordan reports the situation to the police, but the police do not press charges on the perpetrator.    
Note. The Just and Unjust scenarios presented in Study 3. Participants reviewed one scenario from each victim.

Study 4a & Study 4b

Bad.Person.Description
Jess went to the supermarket and left their trolley in the middle of a disabled parking space.
Frankie was rude to a shop assistant at the supermarket.
Lee often makes a mess of the kitchen at their workplace and takes their co-workers’ food and drink without permission.
Charlie doesn’t put their trash in the recycling and often gets noise complaints from their neighbours.
Blake was driving home from work during a powerful storm when they realized they forgot about their mum’s birthday.
Sam parks their car in the disabled spot because it is closer to the entrance of the supermarket.
Alex didn’t pick up their dog’s litter after a walk round the park.
Billie didn’t pay for their parking ticket at the airport.
Jamie didn’t pay for their TV licence this year.
Last week, Ali moved into a new home and held several parties which made loud noises till midnight.
Jordan finished lunch and threw the rubbish on the ground in the park.
When they [Cameron] arrived, there was a long line and they pushed to the front. 
Note. The negative person description added to each scenario in the ‘Bad Person’ condition. See Study 1a for the full scenario scripts.

Study 5a & Study 5b

An example of study stimuli are presented in the Main Text. Please see Figure 7 for more details.

Study 6a & Study 6b

An example of study stimuli are presented in the Main Text. Please see the relevant method sections for more details.

Study 7

An example of study stimuli are presented in the Main Text. Please see the relevant method sections for more details.

Analysis Prerequisite

##############################**Install Packages**##############################
packages <- c("dplyr", "effectsize", "expss", "lmerTest", "lme4", "psych", "report", "rstatix", "sjPlot", "tidyverse")
for (package in packages){
  if(!is.element(package, .packages(all.available = TRUE))){install.packages(package)}
  library(package, character.only = TRUE)}

########################**Distance Extraction Function**########################
##**User Inputs**##
#data = data frame of distancing rows
#names = vector of scenario names
#condition = vector of conditions (e.g., (J, U)/ (J, U, JB, UB))
#Good_Bad = Boolean, if Good/Bad is included
names1a <- c("Jess", "Frankie", "Lee", "Charlie", "Blake", "Sam", "Alex", "Billie", 
             "Jamie", "Cameron", "Jordan", "Ali")
names1b <- c("Jess", "Lee","Blake", "Frankie", "Charlie", "Katie", "Alex", "Sarah", 
             "Cameron", "Ali", "Jamie", "Jordan" )
condition2 <- c("J", "U")
condition4 <- c("J", "UJ", "JB", "UJB")

##**Function**##
extract <- function(data, names, condition, Good_Bad){
  #Make sure distancing values are numeric
  for (col in colnames(data)){data[[col]] <- as.numeric(data[[col]])}             
  #Create data-frame for long format
  analysis_data <- data.frame(Subject = NA, Person = NA, Injustice = NA, 
                              Good_Bad = NA, Scenario = NA, Distance = NA)  
  for(name in names){                                         #For each name in the list
    for(con in condition){                                    #Loop through the 4 conditions
      col_1 <- paste0(name, con, "_1")                        #Extract column 1
      col_5 <- paste0(name, con, "_5")                        #Extract column 5
      new_col <- paste0(name, "_", toupper(con))              #Create a new person-condition-'Distance' column
      data[[new_col]] <- abs(data[[col_5]] - data[[col_1]])   #Calculate distance (accounting for 1 moving)
      if(Good_Bad == F){
        dat <- data.frame(Subject = 1:nrow(data), Person = name, Injustice = toupper(substr(con,1,1)), 
                          Good_Bad = NA, Scenario = new_col, Distance = abs(data[[col_5]] - data[[col_1]]))
        analysis_data <- rbind(analysis_data, dat)}
      else{if(grepl("B", toupper(con))){ GB <- "Bad"} else{GB <- "Good"}                                                        #Add to long format data 
        dat <- data.frame(Subject = 1:nrow(data), Person = name, Injustice = toupper(substr(con,1,1)), 
                          Good_Bad = GB, Scenario = new_col, Distance = abs(data[[col_5]] - data[[col_1]]))
        analysis_data <- rbind(analysis_data, dat)}}}
        return(analysis_data) }     

############################**Session Information**#############################
session <- sessionInfo()
report_system(session)
as.data.frame(report(session))

Session Information:

Analyses were conducted using the R Statistical language (version 4.4.1; R Core Team, 2024) on Windows 10 x 64 (build 19045)
Package | Version | Reference
——————————————————————————————————————-
dplyr | 1.1.4 | Wickham H, François R, Henry L, Müller K, Vaughan D (2023). dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.
effectsize | 1.0.0 | Ben-Shachar MS, Lüdecke D, Makowski D (2020). “effectsize: Estimation of Effect Size Indices and Standardized Parameters.” Journal of Open Source Software, 5(56), 2815. https://doi.org/10.21105/joss.02815.
expss | 0.11.6 | Demin G (2023). expss: Tables, Labels and Some Useful Functions from Spreadsheets and ‘SPSS’ Statistics. https://CRAN.R-project.org/package=expss.
forcats | 1.0.0 | Wickham H (2023). forcats: Tools for Working with Categorical Variables (Factors). https://CRAN.R-project.org/package=forcats.
ggplot2 | 3.5.1 | Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org.
lme4 | 1.1.35.5 | Bates D, Mächler M, Bolker B, Walker S (2015). “Fitting Linear Mixed-Effects Models Using lme4.” Journal of Statistical Software, 67(1), 1-48. doi:10.18637/jss.v067.i01 https://doi.org/10.18637/jss.v067.i01.
lmerTest| 3.1.3 | Kuznetsova A, Brockhoff PB, Christensen RHB (2017). “lmerTest Package: Tests in Linear Mixed Effects Models.” Journal of Statistical Software, 82(13), 1-26. doi:10.18637/jss.v082.i13 https://doi.org/10.18637/jss.v082.i13.
lubridate| 1.9.3 | Grolemund G, Wickham H (2011). “Dates and Times Made Easy with lubridate.” Journal of Statistical Software, 40(3), 1-25. https://www.jstatsoft.org/v40/i03/.
maditr | 0.8.4 | Demin G (2024). maditr: Fast Data Aggregation, Modification, and Filtering with Pipes and ‘data.table’.https://CRAN.R-project.org/package=maditr.
Matrix | 1.7.0 | Bates D, Maechler M, Jagan M (2024). Matrix: Sparse and Dense Matrix Classes and Methods. https://CRAN.R-project.org/package=Matrix.
psych | 2.4.6.26 | William Revelle (2024). psych: Procedures for Psychological, Psychometric, and Personality Research. Northwestern University, Evanston, Illinois. https://CRAN.R-project.org/package=psych.
purrr | 1.0.2 | Wickham H, Henry L (2023). purrr: Functional Programming Tools. R package version 1.0.2, https://CRAN.R-project.org/package=purrr.
R | 4.4.1 | R Core Team (2024). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
readr | 2.1.5 | Wickham H, Hester J, Bryan J (2024). readr: Read Rectangular Text Data. https://CRAN.R-project.org/package=readr.
report | 0.5.9 | Makowski D, Lüdecke D, Patil I, Thériault R, Ben-Shachar M, Wiernik B (2023). “Automated Results Reporting as a Practical Tool to Improve Reproducibility and Methodological Best Practices Adoption.” CRAN. https://easystats.github.io/report/.
rstatix | 0.7.2 | Kassambara A (2023). rstatix: Pipe-Friendly Framework for Basic Statistical Tests. https://CRAN.R-project.org/package=rstatix.
sjPlot | 2.8.16 | Lüdecke D (2024). sjPlot: Data Visualization for Statistics in Social Science. https://CRAN.R-project.org/package=sjPlot.
stringr | 1.5.1 | Wickham H (2023). stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr.
tibble | 3.2.1 | Müller K, Wickham H (2023). tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.
tidyr | 1.3.1 | Wickham H, Vaughan D, Girlich M (2024). tidyr: Tidy Messy Data. https://CRAN.R-project.org/package=tidyr.
tidyverse| 2.0.0 | Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R, Grolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E, Bache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi K, Vaughan D, Wilke C, Woo K, Yutani H (2019). “Welcome to the tidyverse.” Journal of Open Source Software, 4(43), 1686. doi:10.21105/joss.01686 https://doi.org/10.21105/joss.01686.

Study 1

Study 1a

##################################**Study 1a**##################################
##Read in Data
data1a <- read.csv("Data_Study1a.csv")

#Extract Data
study1a <- extract(data1a, names1a, condition2, FALSE) 
study1a <- study1a %>% select(-c(Good_Bad)) %>% na.omit()  #Remove Good_Bad column, reduce to completed trials

psych::describe(data1a$Age)
table(data1a$Gender)

study1a$Injustice <- ifelse(study1a$Injustice == "U", 1, 0) #Re-code for lme analysis

#Linear Mixed Effects Model
model_1a <- lmer(Distance ~ Injustice + (1 + Injustice || Subject) + (1 + Injustice || Person), data = study1a,
                control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_1a)
tab_model(model_1a, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 1b

##################################**Study 1b**##################################
#Read in Data
data1b <- read.csv("Data_Study1b.csv")

#Extract Distance
study1b <- extract(data1b, names1b, condition2, FALSE)
study1b <- study1b %>% select(-c(Good_Bad)) %>% na.omit()

psych::describe(data1b$Age)
table(data1b$Gender)

study1b$Injustice <- ifelse(study1b$Injustice == "U", 1, 0) 

#Linear Mixed Effects Model
model_1b <- lmer(Distance ~ Injustice + (1 + Injustice || Subject) + (1 + Injustice || Person), data = study1b,
                 control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_1b)
tab_model(model_1b, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 1c

##################################**Study 1c**##################################
##Read in Data
data1c <- read.csv("Data_Study1c.csv")

#Extract Data
study1c <- extract(data1c, "Jamie", c("U", "J", "N"), FALSE) 
study1c <- study1c %>% select(-c(Good_Bad)) %>% na.omit()  #Remove Good_Bad column, reduce to completed trials

#Descriptive Statistics
study1c %>%
  group_by(Injustice) %>%
  summarise(N = n(), 
            Mean = mean(Distance, na.rm = TRUE), 
            SD = sd(Distance, na.rm = TRUE))

psych::describe(data1c$Age)
table(data1c$Gender)

# ANOVA
welch_result <- study1c %>% welch_anova_test(Distance ~ Injustice)

#Format decimal places
welch_result <- welch_result %>%
  mutate(
    statistic = formatC(statistic, format = "f", digits = 2),
    DFn = formatC(DFn, format = "f", digits = 2),
    DFd = formatC(DFd, format = "f", digits = 2),
    p = formatC(as.numeric(p), format = "f", digits = 5))

print(welch_result)

anova_model <- aov(Distance ~ Injustice, data = study1c)
omega_squared(anova_model, partial = FALSE, alternative="two.sided") 

#T-Tests
# Unjust vs Just
t.test(Distance ~ Injustice, data = study1c, subset = Injustice %in% c("U", "J"))

# Unjust vs Neutral
t.test(Distance ~ Injustice, data = study1c, subset = Injustice %in% c("U", "N"))

# Just vs Neutral
t.test(Distance ~ Injustice, data = study1c, subset = Injustice %in% c("J", "N"))

# Pairwise cohen's d between groups
rstatix::cohens_d(study1c, Distance ~ Injustice, var.equal = FALSE, paired = FALSE)

Study 2

Study 2

##################################**Study 2**###################################
data2 <- read.csv("Data_Study2.csv")

psych::describe(data2$Age)
table(data2$Gender)

#Convert from wide to long format
study2 <- data.frame(Subject = NA, Scenario = NA, Person = NA, Outcome = NA, Blame = NA, Good = NA)  

for(x in 2:49){                                                                                               
  col <- colnames(data2[x])                                  
  col_split <- str_split(col, "_")                             #e.g. "SarahJ_GB"
  suffix <- col_split[[1]][2]                                  #e.g. "GB"
  prefix <- col_split[[1]][1]                                  #e.g. "SarahJ"
  person <- substr(prefix, 1, nchar(prefix) - 1)               #e.g., "Sarah"
  outcome <- substr(prefix, nchar(prefix), nchar(prefix))      #e.g., "J"
  if(suffix == "Blame"){                                   
    df <- data.frame(Subject = 1:nrow(data2), Scenario = prefix, Person = person, Outcome = outcome, Blame = data2[[x]], Good = NA) 
  } else{(df$Good <- data2[[x]])
          study2 <- bind_rows(study2, df)}
}                   

study2 <- na.omit(study2)
study2$Outcome <- ifelse(study2$Outcome == "U", 1, 0)

#Effect of Outcome on Blame Rating 
model_blame <- lmer(Blame ~ Outcome + (1 + Outcome || Subject) + (1 + Outcome || Person), data = study2,
                    control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_blame); tab_model(model_blame, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

VarCorr(model_blame)

#Effect of Outcome on Person Value Rating
model_good <- lmer(Good ~ Outcome + (1 + Outcome || Subject) + (1 + Outcome || Person), data = study2,
                   control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_good); tab_model(model_good, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)



######################**Combined Analysis with Study 1b**#######################
#Read in Study 1b Data
data1b <- read.csv("Data_Study1b.csv")

study1b <- extract(data1b, names1b, condition2, FALSE)
study1b <- study1b %>% select(-c(Good_Bad)) %>% na.omit()

study1b$Injustice <- ifelse(study1b$Injustice == "U", 0.5, -0.5) 
study1b$Scenario <- str_remove( study1b$Scenario, "_")

#Average Study 2 Ratings by Scenario
study2_avg <- data.frame(Scenario = NA, Person = NA, Outcome = NA, Blame = NA, Good = NA)  #Create data-frame for mean by scenario

for(name in unique(study2$Scenario)){
  dat <- study2 %>% filter(Scenario == name)
  blame <- mean(dat$Blame)
  gb <- mean(dat$Good)
  study2_avg[nrow(study2_avg) + 1, ] <- c(dat$Scenario[1], dat$Person[1], dat$Outcome[1], blame, gb)}

study2_avg <- na.omit(study2_avg)

#Combine Study 1b and Study 2
for(name in study2_avg$Scenario){
  study1b$Blame[study1b$Scenario == name] <- study2_avg$Blame[study2_avg$Scenario == name]
  study1b$Good[study1b$Scenario == name] <- study2_avg$Good[study2_avg$Scenario == name]}

study1b$Blame <- as.numeric(study1b$Blame)
study1b$Good <- as.numeric(study1b$Good)

#Model predicting Study 1b Distancing from Study 2 Character and Blame Ratings
model_combined <- lmer(Distance ~ Injustice + Blame + Good + (1 + Injustice + Blame + Good || Subject) + (1 + Injustice + Blame + Good || Person), 
                       data = study1b, control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))
summary(model_combined); tab_model(model_combined, show.se = TRUE, show.ci = 0.95, show.stat = TRUE, show.df = TRUE, df.method = "satterthwaite")

Study 3

Study 3

##################################**Study 3**###################################
data3 <- read.csv("Data_Study3.csv")

psych::describe(data3$Age[unique(data3$ID)])
table(data3$Gender[unique(data3$ID)])

data3$Cent_Self <- scale(data3$Self, scale = F)                 #Grand mean centre self ratings

#Mixed Linear Effects
model_3 <- lmer(Distance ~ Cent_Self * Condition + (1 + Cent_Self + Condition || ID) + 
                (1 + Cent_Self + Condition || Trait), data = data3, 
                control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_3)
tab_model(model_3, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Moderation
data3$Low_Self <- data3$Cent_Self - (-1.65)                       #1SD BELOW the mean of Self ratings
data3$High_Self <- data3$Cent_Self - (1.65)                       #1SD ABOVE the mean of Self ratings

#Effect of Condition at High Self Ratings
model3_High <- lmer(Distance ~ High_Self * Condition + (1 + High_Self + Condition || ID) +
                    (1 + Cent_Self + Condition || Trait), data = data3, 
                control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model3_High)
tab_model(model3_High, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Effect of Condition at Low Self Ratings
model3_Low <- lmer(Distance ~ Low_Self * Condition + (1 + Low_Self + Condition || ID) + 
                   (1 + Cent_Self + Condition || Trait), data = data3,
                    control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model3_Low)
tab_model(model3_Low, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 4

Study 4a

##################################**Study 4a**##################################
data4a <- read.csv("Data_Study4a.csv")

psych::describe(data4a$Age)
table(data4a$Gender)

#Extract Distance
study4a <- extract(data4a, names1a, condition4, TRUE)

#Re-code Variables for lme analyses
study4a <- study4a %>% mutate(Outcome = dplyr::recode(Injustice, "J" = -0.5, "U" = 0.5))       
study4a <- study4a %>% mutate(Value = dplyr::recode(Good_Bad, "Good" = 0.5, "Bad" = -0.5))
study4a <- study4a %>% mutate(Dum_Bad = dplyr::recode(Good_Bad, "Good" = 1, "Bad" = 0))
study4a <- study4a %>% mutate(Dum_Good = dplyr::recode(Good_Bad, "Good" = 0, "Bad" = 1))


#Mixed Linear Effects
model_4a <- lmer(Distance ~ Outcome * Value + (1 + Outcome * Value || Subject) + 
                 (1 + Outcome * Value|| Person), data = study4a,
                 control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_4a)
tab_model(model_4a, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Simple Effect of Injustice within 'Bad' Condition
model4a_bad <- lmer(Distance ~ Outcome * Dum_Bad + (1 + Outcome * Dum_Bad || Subject) + 
                    (1 + Outcome * Dum_Bad || Person), data = study4a,
                    control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))
summary(model4a_bad)
tab_model(model4a_bad, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Simple Effect of Injustice within 'Good' Condition
model4a_good <- lmer(Distance ~ Outcome * Dum_Good + (1 + Outcome * Dum_Good || Subject) + 
                     (1 + Outcome * Dum_Bad || Person), data = study4a,
                     control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model4a_good)
tab_model(model4a_good, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 4b

##################################**Study 4b**##################################
data4b <- read.csv("Data_Study4b.csv")

psych::describe(data4b$Age)
table(data4b$Gender)

#Compute Means by Scenario
for(name in names1a){
  for(con in c("J", "UJ", "UJB", "JB")){
    scen <- paste0(name, con)                               #e.g., "JessJ"
    unj <- paste0(scen, "_", "unj")                         #e.g., "JessJ_unj"
    unf <- paste0(scen, "_", "unf")                         #e.g., "JessJ_unf"
    new <- paste0(name, "_", con)
    data4b[[new]] <- mean_row(data4b[[unj]], data4b[[unf]]) #e.g.,  data$Jess_J <- mean_row(data$JessJ_unj, data$JessJ_unf)
    indx <- grep(unj, colnames(data4b))
    colnames(data4b)[indx] <- paste0(name, "_",  con, "_unj")     #Rename to combine with 4a
  }}                                                              #Repeat for all name + condition combos

#Select Relevant Data and Reformat to Long
study4b <- data4b %>% select(-(Jess_J_unj:AliJB_unf))
study4b <- study4b %>% gather(key = "Scenario", value = "DV", Jess_J:Ali_JB) %>% arrange(ID, Scenario)
study4b <- study4b %>% mutate(Scenarios = Scenario) %>% separate(Scenario, into = c("Victim", "Condition"), sep = "_")

#Re-code Variables
study4b <- study4b %>% mutate(Outcome = dplyr::recode(Condition, "J" = -0.5, "JB" = -0.5, 
                                                                "UJ" = 0.5, "UJB" = 0.5),
                              Injustice = dplyr::recode(Condition, "J" = "J", "JB" = "J", 
                                                                  "UJ" ="U", "UJB" = "U"))
study4b <- study4b %>% mutate(Value = dplyr::recode(Condition,"J" = 0.5, "JB" = -0.5,
                                                             "UJ" = 0.5, "UJB" = -0.5),
                              Good_Bad= dplyr::recode(Condition, "J" = "Good", "JB" = "Bad",
                                                                "UJ" = "Good", "UJB" = "Bad"))
study4b <- study4b %>% mutate(Dum_Bad = dplyr::recode(Value,"0.5" = 1, "-0.5" = 0))
study4b <- study4b %>% mutate(Dum_Good = dplyr::recode(Value,"0.5" = 0, "-0.5" = 1))

#Mixed Linear Effects 
model_4b <- lmer(DV ~ Outcome*Value + (1 + Outcome * Value || ID) + 
                 (1 + Outcome * Value || Victim), data = study4b, 
                 control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model_4b)
tab_model(model_4b, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Simple Effect of Injustice within 'Bad' Condition
model4b_bad <- lmer(DV ~ Outcome * Dum_Bad + (1 + Outcome * Dum_Bad || ID) + 
                    (1 + Outcome * Dum_Bad || Victim), data = study4b,
                    control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model4b_bad)
tab_model(model4b_bad, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Simple Effect of Injustice within 'Good' Condition
model4b_good <- lmer(DV ~ Outcome * Dum_Good + (1 + Outcome * Dum_Good || ID) + 
                     (1 + Outcome * Dum_Bad || Victim), data = study4b,
                     control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model4b_good)
tab_model(model4b_good, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Combined Analyses

###########################**Study 4a & 4b Combined**###########################
perc_inj <- data4b[, grepl("unj", names(data4b))]                     #Extract Perceived Injustice data from 4b
avg <- as.data.frame(psych::describe(perc_inj))                       #Mean PI for each scenario
rownames(avg) <- str_replace(rownames(avg), "_unj", "")               #Neaten row names to combine with 4a

combined <- study4a[-c(1), c(1:8)]                                    #Create combined data set
combined$Perceived_Injustice <- NA

for(scen in 1:nrow(avg)){                                             #Iterate through 48 scenarios and all 4a rows
  for(row in 1:nrow(combined)){                                       #When Scenario match, import 4b Perceived Injustice
    if(rownames(avg)[scen] == combined$Scenario[row]){combined$Perceived_Injustice[row] <- avg$mean[scen]}}}

#Predict 3a distance by 3b perceived Injustice
model_combined <- lmer(Distance ~ Perceived_Injustice * Value + (1 + Perceived_Injustice * Value || Subject) + 
                       (1 + Perceived_Injustice * Value || Person), data = combined,
                       control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))
summary(model_combined)
tab_model(model_combined, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

combined <- combined %>% mutate(Dum_Bad = dplyr::recode(Value,"0.5" = 1, "-0.5" = 0))
combined <- combined %>% mutate(Dum_Good = dplyr::recode(Value,"0.5" = 0, "-0.5" = 1))

#Simple Effect of Perceived Injustice within 'Bad' Condition
combinedbad <- lmer(Distance ~ Perceived_Injustice * Dum_Bad + (1 + Perceived_Injustice * Dum_Bad || Subject) + 
                    (1 + Perceived_Injustice * Dum_Bad || Person), data = combined)

summary(combinedbad)
tab_model(combinedbad, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

#Simple Effect of Perceived Injustice within 'Good' Condition
combinedgood <- lmer(Distance ~ Perceived_Injustice * Dum_Good + (1 + Perceived_Injustice * Dum_Good || Subject) +
                     (1 + Perceived_Injustice * Dum_Good || Person), data = combined)

summary(combinedgood)
tab_model(combinedgood, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 5

Study 5a

##################################**Study 5a**##################################
data5a <- read.csv("Data_Study5a.csv")

#Reverse Score Bleft
data5a$Bleft_Reverse <- data5a$Bleft * -1

psych::describe(data5a)
table(data5a$Gender)

for(row in 1:nrow(data5a)){          #Merge A and B reverse to 1 'Rating' column
  if (is.na(data5a$Bleft_Reverse[row])) {data5a$Rating[row] <- data5a$Aleft[row]}
  else{data5a$Rating[row] <- data5a$Bleft_Reverse[row]}}

t.test(data5a$Rating)
data5a %>% cohens_d(Rating ~ 1, var.equal = TRUE)

Study 5b

##################################**Study 5b**##################################
data5b <- read.csv("Data_Study5b.csv")

psych::describe(data5b$Age)
table(data5b$Gender)

study5b <- data.frame(Subject = NA, Scenario = NA, Rating = NA, Near_Far = NA)  #Create data-frame for long format
names4 <- c("DG", "JT", "MK" , "TB", "RC", "GM", "MC", "SF", "AB", "PS", "JA", "JK",
            "ZC", "EK", "QC", "LS", "WS", "MB","EF", "AG", "RJ", "GG", "ET", "RD" )
  for(name in names4){                                              #For each name in the list                                                       
      n <- paste0("near_", name)                                    #Extract near column
      f <- paste0("far_", name)                                     #Extract far column
      dat_n <- data.frame(Subject = 1:nrow(data5b), Scenario = name, Rating =  data5b[[n]], Near_Far = 0.5)
      dat_f <- data.frame(Subject = 1:nrow(data5b), Scenario = name, Rating = data5b[[f]], Near_Far = -0.5)
      study5b <- bind_rows(study5b, dat_n, dat_f)}                  #Combine 48 rows for each ppt, with data in 6 



model5b <- lmer(Rating ~ Near_Far + (1 + Near_Far || Subject) + (1 + Near_Far || Scenario), data = study5b,
                              control = lmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))

summary(model5b)
tab_model(model5b, show.ci = 0.95, show.stat = TRUE, df.method = "satterthwaite", show.df = TRUE)

Study 6

Study 6a

##################################**Study 6a**##################################
data6a <- read.csv("Data_Study6a.csv")

psych::describe(data5a[-c(1)])
table(data6a$Gender)
table(data6a$Unfair)
table(data6a$Unfair_cat)

#One-sample t-tests
t.test(data6a$Similar, mu = 50.5)                                       #Manipulation check
data6a %>% cohens_d(Similar ~ 1, mu = 50.5, var.equal = TRUE)

t.test(data6a$Unfair, mu = 4.5)                                         #Unfairness
data6a %>% cohens_d(Unfair ~ 1, mu = 4.5, var.equal = TRUE)

prop.test(128, 199, p = 0.5, alternative = "two.sided") # as categorical

Study 6b

##################################**Study 6b**##################################
data6b <- read.csv("Data_Study6b.csv")

psych::describe(data6b$Age)
table(data6b$Gender)
table(data6b$Unfair_cat)

prop.test(157, 199, p = 0.5, alternative = "two.sided") # as categorical

Study 7

Study 7

##################################**Study 7**###################################
data7 <- read.csv("Data_Study7.csv")

psych::describe(data7$Age)
table(data7$Gender)

#Compute Spatial Distality Scores
data7$Unfair <- abs(data7$SelfU_5 - data7$SelfU_1)
data7$Fair <- abs(data7$SelfJ_5 - data7$SelfJ_1)

#Paired Samples T-Tests
t.test(data7$Unfair, data7$Fair, paired = TRUE) #Spatial Distancing
t.test(data7$SelfU_S_Time, data7$SelfJ_S_Time, paired = TRUE) #Subjective Time Distance
t.test(data7$SelfU_O_Time, data7$SelfJ_O_Time, paired = TRUE) #Objective time distance

#Wide to Long Format
long <- data7[,c("ID","Unfair","Fair","SelfU_S_Time","SelfJ_S_Time", "SelfU_O_Time", "SelfJ_O_Time")]

study7 <- reshape(long,
                  varying = list(c("Unfair", "Fair"),
                                 c("SelfU_S_Time", "SelfJ_S_Time"),
                                 c("SelfU_O_Time", "SelfJ_O_Time")),
                  direction = "long",
                  timevar = "condition",
                  v.names = c("Distance", "Subjective", "Objective"))

study7$condition <- ifelse(study7$condition == 1, 0.5, -0.5)

#Predicting Distancing from Condition, Subjective, and Objective Time
model <- lmer(Distance ~ condition + Subjective + Objective + (1 | ID), data = study7)
summary(model)
tab_model(model, show.stat = TRUE, collapse.ci = TRUE, df.method = "satterthwaite", show.df = TRUE)

Data

Study 1

Study 1a

  • ID
  • JessJ_1:BillieJ_8: The 8 ladder positions for each scenario, as indicated by a name (e.g., Jess, Billie etc.) and the preceding J/U (just/unjust). Position _1 contains the final position of the person described in the scenario. Position _5 contains the final position for where the participant moved themselves.
  • Gender: 1 = Male, 2 = Female, 4 = Other (Agender)
  • Age: Years

Study 1b

  • ID
  • JessJ_1:AllieU_8: The 8 ladder positions for each scenario, as indicated by a name (e.g., Jess, Billie etc.) and the preceding J/U (just/unjust). Position _1 contains the final position of the person described in the scenario. Position _5 contains the final position for where the participant moved themselves.
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary
  • Age: Years

Study 1c

  • ID
  • JamieU_1:JamieJ_8: The 8 ladder positions for each scenario (Unjust - “JamieU”; Just -“JamieJ”). Position _1 contains the final position of the person described in the scenario. Position _5 contains the final position for where the participant moved themselves.
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary
  • Age: Years

Study 2

  • ID
  • JessJ_Blame:SarahJ_GB: Blame (as indicated by “_Blame”) and character (as indicated by “_GB”) ratings for each scenario (e.g., Jess, Billie etc.). J/U indicate whether the scenario contained a just on unjust outcome.
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 5 = Prefer Not To Say
  • Age: Years

Study 3

  • ID
  • Age: Years
  • Gender: 1 = Male, 2 = Female, 4 = Other, 5 = Prefer not to say
  • Condition: +0.5 = Just outcome, -0.5 = Unjust outcome
  • Self: Participants self-endorsement for each personality trait. 1 = “Extremely uncharacteristic of me”, 7 = “Extremely characteristic of me”
  • Trait: Personality trait being assessed (string)
  • Distance: Distance between red dot and final trait position (see main text for study description)

Study 4

Study 4a

  • ID
  • JessJ_1:AllieJB_8: The 8 ladder positions for each scenario, as indicated by a name (e.g., Jess, Billie etc.) and preceding letters. J/UJ indicates if the out come was Just/Unjust. An additional B indicates it was the bad person condition (the good person condition has no suffix). Position _1 contains the final position of the person described in the scenario. Position _5 contains the final position for where the participant moved themselves.
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 5 = Prefer Not To Say
  • Age: Years

Study 4b

  • ID
  • JessJ_unj:AllieJB_unf: How Unjust (_unj) or Unfair (_unf) participants rated each scenario, as indicated by a name (e.g., Jess, Billie etc.) and preceding letters. J/UJ indicates if the out come was Just/Unjust. An additional B indicates it was the bad person condition.
  • Gender: 1 = Male, 2 = Female
  • Age: Years

Study 5

Study 5a

  • ID
  • Aleft: Participant’s perceived similarity to the target initials when the distant condition was presented on the left side of the screen.
  • Bleft: Participant’s perceived similarity to the target initials when the proximal condition was presented on the left side of the screen.
  • Income: Annual Household Income before taxes (0 = £10,000 or less a year, 23 = More than £150,000 a year)
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 4 = Prefer Not To Say
  • Age: Years

Study 5b

  • ID
  • near_DG:near_EF: Participants rating for how similar they thought their values were to a target person (initials) that was presented as either spatially close (near_) or distant (far_) from them. See Main Text for a detailed study description.
  • Income: Annual Household Income before taxes (0 = £10,000 or less a year, 23 = More than £150,000 a year)
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 4 = Prefer Not To Say
  • Age: Years

Study 6

Study 6a

  • ID
  • Gender: 1 = Male, 2 = Female
  • Age: Years
  • Similar: Participants rating of how similar their values are to the person presented as spatial proximal to them
  • Unfair: Participant’s Likert rating for who the event was more unfair towards (1-4 = more unfair for the person presented with values spatially distant from the participant; 5-8 = more unfair for the person presented with values spatially proximal to the participant)
  • Unfair_cat: Binarised unfair responses (0 = More unfair for distant person, 1 = More unfair for proximal person )

Study 6b

  • ID
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 4 = Prefer Not To Say
  • Age: Years
  • Unfair_cat: 0 = More unfair for distant person, 1 = More unfair for proximal person

Study 7

  • ID
  • SelfU_1:SelfU_8: The 8 ladder positions for self-distancing from an unfair event. SelfU_1 contains the final position of their past self who experienced the event. SelfU_5 contains the final position for where the participant moved their current self.
  • SelfU_S_Time: Subjective time since unfair event occurred (1 = “It feels like it just happened”, 7 = “It feels like it happened a very long time ago”).
  • SelfU_O_Time: Objective time since unfair event occurred (years).
  • SelfJ_1:SelfJ_8: The 8 ladder positions for self-distancing from an fari event. SelfJ_1 contains the final position of their past self who experienced the event. SelfJ_5 contains the final position for where the participant moved their current self.
  • SelfJ_S_Time: Subjective time since fair event occurred (1 = “It feels like it just happened”, 7 = “It feels like it happened a very long time ago”).
  • SelfJ_O_Time: Objective time since fair event occurred (years).
  • Gender: 1 = Male, 2 = Female, 3 = Non-Binary, 5 = Prefer Not To Say
  • Age: Years