Read in the data:

tdata <- read_csv("exp_data.csv")

Remove participants who failed the timing check query:

tdata <- subset(tdata, timing_check_correct == "correct")

1 Subject demographics

# demographics 

min(tdata$age)
## [1] 18
max(tdata$age)
## [1] 75
mean(tdata$age)
## [1] 39.97333
sd(tdata$age)
## [1] 14.21595
# 1 = male, 2 = female, 3 = other
table(tdata$gender)
## 
##       1: male     2: female 3: non-binary 
##            76            73             1

1 = male, 2 = female, 3 = non-binary, 4 = prefer not to say

2 Data preparation

Check n in each condition:

table(tdata$structure, tdata$test_queries)
##               
##                novel original
##   irreversible    50       25
##   reversible      50       25

Factorize:

tdata$structure <- factor(tdata$structure, levels = c("irreversible", "reversible"), labels = c("irreversible", "reversible"))
tdata$test_queries <- factor(tdata$test_queries, levels = c("original", "novel"), labels = c("original", "novel"))

Make a subset containing only the columns relevant for analyses and turn into long format:

# Subset: 
tdata_sub <- subset(tdata, select = c("subj_code", "condition", "structure", "test_queries", "first_caused_rating", "second_caused_rating",
                                      "first_maintained_rating", "second_maintained_rating"))

tdata_original <- subset(tdata_sub, test_queries == "original", select = c(1:6))
tdata_novel <- subset(tdata_sub, test_queries == "novel")

# into long format:
library(tidyr)
tdata_long_original <- gather(tdata_original, entity, rating, 5:6)
tdata_long_novel <- gather(tdata_novel, entity, rating, 5:8)

# factorize entity 
tdata_long_original$entity <- factor(tdata_long_original$entity, levels = c("first_caused_rating", "second_caused_rating"), 
                            labels = c("first \ncaused", "second \ncaused"))



tdata_long_novel$entity <- factor(tdata_long_novel$entity, levels = c("first_caused_rating", "second_caused_rating", 
                                                          "first_maintained_rating", "second_maintained_rating"), 
                            labels = c("first \ncaused", "second \ncaused","first \nmaintained", "second \nmaintained"))


tdata_long_novel$rating <- as.numeric(tdata_long_novel$rating)

3 Replication part of study

3.1 Graphs and summaries

Replication part of the study

myTheme <- theme(plot.title = element_text(face="bold", size = 22),
        axis.title.x = element_text(size = 20),
        axis.title.y = element_text(size = 20),
        axis.text.x = element_text(size = 14, angle = 0), 
        axis.text.y = element_text(size = 16, angle = 0),
        legend.text = element_text(size = 18),
        legend.title = element_text(face = "bold", size = 18),
        strip.text.x = element_text(size = 18),
        panel.grid.major = element_blank(), 
        panel.grid.minor = element_blank(), 
        panel.background = element_blank(), 
        axis.line.x = element_line(colour = "black"), 
        axis.line.y = element_line(colour = "black"),
        axis.text = element_text(colour ="black"), 
        axis.ticks = element_line(colour ="black"))


tdata_sub <- tdata_long_original


library(see)
## first, turn sID into a factor
tdata_sub$subj_code <- factor(tdata_sub$subj_code)

pd <- position_dodge(width = 0.3)

tdata_sub$valueJitter <- jitter(tdata_sub$rating, factor = 0.01, amount = 0.004)

theme_set(theme_light(base_size = 20, base_family = "Poppins"))



g <- ggplot(tdata_sub, aes(x = entity, y = valueJitter)) +
  guides(fill=FALSE)+
  facet_grid( ~ structure, labeller = label_both)+
  scale_y_continuous(limits = c(-0.3, 8.3), breaks=seq(0, 8, 1), expand = c(0,0)) +
  geom_violinhalf(aes(y = rating, group = entity, fill = structure), color = NA, 
                position=position_dodge(1), alpha = 0.4)+
  geom_jitter(aes(color = structure), alpha = 0.5, width = 0.15, height = 0.2) +
  stat_summary(aes(y = rating, group=1), fun.data = mean_cl_boot, 
               geom = "errorbar", width = 0, size = 1) +
  stat_summary(aes(y = rating, group=1, color = structure), fun.y=mean, geom="line", 
               shape = 22, size = 1.5, alpha = .7)+
  stat_summary(aes(y = rating, group=1, fill = structure), fun.y=mean, geom="point", 
               color = "black", shape = 22, size = 3, group=1, alpha = 1)+
  stat_summary(aes(y = rating,group=1), fun.y=median, geom="point", color = "black", shape = 3, size = 4, 
               group=1, alpha = 1, position = position_dodge(width = 0.5))+
  labs(x = "Causal Statement", y = "Agreement rating") +
  scale_color_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  scale_fill_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  theme(legend.position = "none")+
  annotate("text", x = 0.5, y = 2, label = c("completely disagree"), angle = 90)+
  annotate("text", x = 0.5, y = 8.2, label = c("completely agree"), angle = 90)+
  myTheme+
  theme(panel.grid.major = element_line(color = "lightgrey",
                                        size = 0.5,
                                        linetype = 'dotted'))+
  stat_summary(aes(label=round(after_stat(y),2)), fun.y=mean, geom="text", size=5,
             vjust = -2)

g

#ggsave("results_means_mainDV_original.svg",width=8,height=5)
#ggsave("results_means_mainDV_original.pdf",width=8,height=5)
library(ggridges)
g2 <- ggplot(tdata_sub, aes(x = rating, y = entity, fill = entity)) +
  facet_grid( ~ structure,labeller = label_both)+
  scale_x_continuous(breaks = seq(0, 10, 1))+
  geom_density_ridges(alpha = 0.5)+
   #stat_summary(aes(x = rating_rec), fun.x=mean, geom="point", 
  #             color = "black", shape = 22, size = 2, group=1, alpha = 1)+
  scale_fill_manual(values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  #scale_fill_viridis_c(name = "Explanation \nRating", option = "C", breaks=c(-5,0,5), labels=c("narrow scope", "no preference", "broad scope"))+
  labs(x = "Agreement rating", y = "Causal Statement") +
  scale_y_discrete(limits=rev)+
  myTheme+
  theme_light(base_family = "Poppins", base_size = 20)+
  theme(panel.grid = element_blank(), axis.text = element_text(colour ="black"))+
  theme(legend.position="none",
        legend.title=element_blank(),legend.key.width = unit(1.95, 'cm'))+
  theme(axis.text.y = element_text(size = 14, angle = 0))

g2

#ggsave("results_dist_original.svg",width=8,height=5)
#ggsave("results_dist_original.pdf",width=8,height=5)

3.2 Mixed ANOVA

library(afex)
library(emmeans)

a1 <- aov_car(rating ~ structure*entity + Error(subj_code/entity), tdata_long_original, 
              anova_table = list(es = "pes"))
a1
## Anova Table (Type 3 tests)
## 
## Response: rating
##             Effect    df   MSE         F  pes p.value
## 1        structure 1, 48  4.24    5.90 * .109    .019
## 2           entity 1, 48 10.02 51.90 *** .520   <.001
## 3 structure:entity 1, 48 10.02      1.93 .039    .171
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1

No significant interaction between structure and entity (causal statement), but a clear effect of entity (causal statement). This replicates the original study.

3.3 Contrasts

library(lsmeans)
# means

ls2 <- lsmeans(a1, c("structure", "entity")) 
ls2
##  structure    entity         lsmean    SE df lower.CL upper.CL
##  irreversible first..caused    6.80 0.464 48    5.868     7.73
##  reversible   first..caused    6.92 0.464 48    5.988     7.85
##  irreversible second..caused   1.36 0.596 48    0.162     2.56
##  reversible   second..caused   3.24 0.596 48    2.042     4.44
## 
## Confidence level used: 0.95
contrasts <- emmeans(a1, ~ entity|structure)
s <- pairs(contrasts, adjust = "none") 


s
## structure = irreversible:
##  contrast                       estimate    SE df t.ratio p.value
##  first..caused - second..caused     5.44 0.895 48   6.077  <.0001
## 
## structure = reversible:
##  contrast                       estimate    SE df t.ratio p.value
##  first..caused - second..caused     3.68 0.895 48   4.111  0.0002
confint(s, level = 0.95)
## structure = irreversible:
##  contrast                       estimate    SE df lower.CL upper.CL
##  first..caused - second..caused     5.44 0.895 48     3.64     7.24
## 
## structure = reversible:
##  contrast                       estimate    SE df lower.CL upper.CL
##  first..caused - second..caused     3.68 0.895 48     1.88     5.48
## 
## Confidence level used: 0.95

First cause receives higher ratings in both reversibility conditions.

Get standardized effect sizes for the contrasts

First get the SDs that need to be pooled (and the correlation between measures for the within-tests)

library(dplyr)

tdata_long_original %>%
  group_by(structure, entity) %>%
  summarise_at(vars(rating), list(name=sd))
## # A tibble: 4 × 3
## # Groups:   structure [2]
##   structure    entity             name
##   <fct>        <fct>             <dbl>
## 1 irreversible "first \ncaused"   2.25
## 2 irreversible "second \ncaused"  2.23
## 3 reversible   "first \ncaused"   2.38
## 4 reversible   "second \ncaused"  3.57
tdata_original %>%
  group_by(structure, test_queries) %>%
  summarize(cor=cor(first_caused_rating, second_caused_rating))
## # A tibble: 2 × 3
## # Groups:   structure [2]
##   structure    test_queries    cor
##   <fct>        <fct>         <dbl>
## 1 irreversible original     -0.506
## 2 reversible   original     -0.380
# using the functions from the MOTE package (see https://matthewbjane.quarto.pub/guide-to-effect-sizes-and-confidence-intervals/Standardized-Mean-Differences.html#sec-repeated-measures-drm)

library(MOTE)

# irreversible condition
stats <- d.dep.t.rm(
  m1 = 6.80,
  m2 = 1.36,
  sd1 = 2.254625,
  sd2 = 2.23383,
  n = 25,
  a = 0.05,
  r = -0.5063090    
)

stats$estimate
## [1] "$d_{rm}$ = 2.42, 95\\% CI [1.63, 3.20]"
# reversible condition

stats <- d.dep.t.rm(
  m1 = 6.92,
  m2 = 3.24,
  sd1 = 2.379075,
  sd2 = 3.573980,
  n = 25,
  a = 0.05,
  r = -0.3798763
)

stats$estimate
## [1] "$d_{rm}$ = 1.23, 95\\% CI [0.70, 1.74]"

4 Novel part of the study

tdata_sub <- tdata_long_novel


library(see)
## first, turn sID into a factor
tdata_sub$subj_code <- factor(tdata_sub$subj_code)

pd <- position_dodge(width = 0.3)

tdata_sub$valueJitter <- jitter(tdata_sub$rating, factor = 0.01, amount = 0.004)

theme_set(theme_light(base_size = 20, base_family = "Poppins"))



g <- ggplot(tdata_sub, aes(x = entity, y = valueJitter)) +
  guides(fill=FALSE)+
  facet_grid( ~ structure, labeller = label_both)+
  scale_y_continuous(limits = c(-0.3, 8.3), breaks=seq(0, 8, 1), expand = c(0,0)) +
  geom_jitter(aes(color = structure), alpha = 0.5, width = 0.15, height = 0.2) +
  stat_summary(aes(y = rating, group=1), fun.data = mean_cl_boot, 
               geom = "errorbar", width = 0, size = 1) +
  stat_summary(aes(y = rating, group=1, color = structure), fun.y=mean, geom="line", 
               shape = 22, size = 1.5, alpha = .7)+
  stat_summary(aes(y = rating, group=1, fill = structure), fun.y=mean, geom="point", 
               color = "black", shape = 22, size = 3, group=1, alpha = 1)+
  stat_summary(aes(y = rating,group=1), fun.y=median, geom="point", color = "black", shape = 3, size = 4, 
               group=1, alpha = 1, position = position_dodge(width = 0.5))+
  labs(x = "Causal Statement", y = "Agreement Rating") +
  scale_color_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  scale_fill_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  theme(legend.position = "none")+
  annotate("text", x = 0.5, y = 1.7, label = c("completely disagree"), angle = 90)+
  annotate("text", x = 0.5, y = 6.7, label = c("completely agree"), angle = 90)+
  myTheme+
  theme(panel.grid.major = element_line(color = "lightgrey",
                                        size = 0.5,
                                        linetype = 'dotted'))+
  stat_summary(aes(label=round(after_stat(y),2)), fun.y=mean, geom="text", size=5,
             vjust = -6)

g

#ggsave("results_means_mainDV_novel.svg",width=12,height=5)
#ggsave("results_means_mainDV_novel.pdf",width=12,height=5)
library(ggridges)
g2 <- ggplot(tdata_sub, aes(x = rating, y = entity, fill = structure)) +
  facet_grid( ~ structure,labeller = label_both)+
  scale_x_continuous(breaks = seq(0, 10, 1))+
  geom_density_ridges(alpha = 0.5)+
  scale_fill_manual(values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  labs(x = "Agreement Rating", y = "Causal Statement") +
  scale_y_discrete(limits=rev)+
  myTheme+
  theme_light(base_family = "Poppins", base_size = 20)+
  theme(panel.grid = element_blank(), axis.text = element_text(colour ="black"))+
  theme(legend.position="none",
        legend.title=element_blank(),legend.key.width = unit(1.95, 'cm'))+
  theme(axis.text.y = element_text(size = 14, angle = 0))+
  annotate("text", y = 0.7, x = 0, label = c("completely disagree"), angle = 0)+
  annotate("text", y = 0.7, x = 9, label = c("completely agree"), angle = 0)

g2

#ggsave("results_dist_novel.svg",width=12,height=5)
#ggsave("results_dist_novel.pdf",width=12,height=5)

4.1 Mixed ANOVA

library(afex)
library(emmeans)

a2 <- aov_car(rating ~ structure*entity + Error(subj_code/entity), tdata_long_novel, anova_table = list(es = "pes"))
a2
## Anova Table (Type 3 tests)
## 
## Response: rating
##             Effect           df   MSE         F  pes p.value
## 1        structure        1, 98 11.34 23.28 *** .192   <.001
## 2           entity 2.92, 286.36  6.84 98.83 *** .502   <.001
## 3 structure:entity 2.92, 286.36  6.84  8.11 *** .076   <.001
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
## 
## Sphericity correction method: GG

Predicted interaction effect was obtained, but also visualize the main effects:

Plot main effect of structure:

tdata_sub <- tdata_long_novel


library(see)
## first, turn sID into a factor
tdata_sub$subj_code <- factor(tdata_sub$subj_code)

pd <- position_dodge(width = 0.3)

tdata_sub$valueJitter <- jitter(tdata_sub$rating, factor = 0.01, amount = 0.004)

theme_set(theme_light(base_size = 20, base_family = "Poppins"))


g <- ggplot(tdata_sub, aes(x = structure, y = valueJitter)) +
  guides(fill=FALSE)+
  scale_y_continuous(limits = c(-0.3, 8.3), breaks=seq(0, 8, 1), expand = c(0,0)) +
  geom_jitter(aes(color = structure), alpha = 0.5, width = 0.15, height = 0.2) +
  stat_summary(aes(y = rating, group=1), fun.data = mean_cl_boot, 
               geom = "errorbar", width = 0, size = 1) +
  stat_summary(aes(y = rating, group=1, fill = structure), fun.y=mean, geom="point", 
               color = "black", shape = 22, size = 3, group=1, alpha = 1)+
  stat_summary(aes(y = rating,group=1), fun.y=median, geom="point", color = "black", shape = 3, size = 4, 
               group=1, alpha = 1, position = position_dodge(width = 0.5))+
  labs(x = "Causal Statement", y = "Agreement Rating") +
  scale_color_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  scale_fill_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  theme(legend.position = "none")+
  annotate("text", x = 0.5, y = 1.7, label = c("completely disagree"), angle = 90)+
  annotate("text", x = 0.5, y = 6.7, label = c("completely agree"), angle = 90)+
  myTheme+
  theme(panel.grid.major = element_line(color = "lightgrey",
                                        size = 0.5,
                                        linetype = 'dotted'))+
  stat_summary(aes(label=round(after_stat(y),2)), fun.y=mean, geom="text", size=5,
             vjust = -6)

g

Plot main effect of entity (causal statement):

tdata_sub <- tdata_long_novel


library(see)
## first, turn sID into a factor
tdata_sub$subj_code <- factor(tdata_sub$subj_code)

pd <- position_dodge(width = 0.3)

tdata_sub$valueJitter <- jitter(tdata_sub$rating, factor = 0.01, amount = 0.004)

theme_set(theme_light(base_size = 20, base_family = "Poppins"))


g <- ggplot(tdata_sub, aes(x = entity, y = valueJitter)) +
  guides(fill=FALSE)+
  scale_y_continuous(limits = c(-0.3, 8.3), breaks=seq(0, 8, 1), expand = c(0,0)) +
  geom_jitter(aes(color = entity), alpha = 0.5, width = 0.15, height = 0.2) +
  stat_summary(aes(y = rating, group=1), fun.data = mean_cl_boot, 
               geom = "errorbar", width = 0, size = 1) +
  stat_summary(aes(y = rating, group=1, fill = entity), fun.y=mean, geom="point", 
               color = "black", shape = 22, size = 3, group=1, alpha = 1)+
  stat_summary(aes(y = rating,group=1), fun.y=median, geom="point", color = "black", shape = 3, size = 4, 
               group=1, alpha = 1, position = position_dodge(width = 0.5))+
  labs(x = "Causal Statement", y = "Agreement Rating") +
  scale_color_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  scale_fill_manual(name = "Strength",values=c("#66c2a5", "#e78ac3", "#8da0cb", "#a6d854"))+
  theme(legend.position = "none")+
  annotate("text", x = 0.5, y = 1.7, label = c("completely disagree"), angle = 90)+
  annotate("text", x = 0.5, y = 6.7, label = c("completely agree"), angle = 90)+
  myTheme+
  theme(panel.grid.major = element_line(color = "lightgrey",
                                        size = 0.5,
                                        linetype = 'dotted'))+
  stat_summary(aes(label=round(after_stat(y),2)), fun.y=mean, geom="text", size=5,
             vjust = -6)

g

4.2 Contrasts

library(lsmeans)
# means

ls2 <- lsmeans(a2, c("structure", "entity")) 
ls2
##  structure    entity             lsmean    SE df lower.CL upper.CL
##  irreversible first..caused        7.70 0.213 98  7.27682     8.12
##  reversible   first..caused        7.44 0.213 98  7.01682     7.86
##  irreversible second..caused       0.76 0.380 98  0.00677     1.51
##  reversible   second..caused       1.94 0.380 98  1.18677     2.69
##  irreversible first..maintained    2.74 0.464 98  1.81965     3.66
##  reversible   first..maintained    5.44 0.464 98  4.51965     6.36
##  irreversible second..maintained   2.24 0.471 98  1.30472     3.18
##  reversible   second..maintained   5.12 0.471 98  4.18472     6.06
## 
## Confidence level used: 0.95
contrasts <- emmeans(a2, ~ entity|structure)
s <- pairs(contrasts, adjust = "none")


s
## structure = irreversible:
##  contrast                               estimate    SE df t.ratio p.value
##  first..caused - second..caused             6.94 0.502 98  13.833  <.0001
##  first..caused - first..maintained          4.96 0.525 98   9.443  <.0001
##  first..caused - second..maintained         5.46 0.534 98  10.225  <.0001
##  second..caused - first..maintained        -1.98 0.546 98  -3.625  0.0005
##  second..caused - second..maintained       -1.48 0.471 98  -3.144  0.0022
##  first..maintained - second..maintained     0.50 0.517 98   0.968  0.3354
## 
## structure = reversible:
##  contrast                               estimate    SE df t.ratio p.value
##  first..caused - second..caused             5.50 0.502 98  10.963  <.0001
##  first..caused - first..maintained          2.00 0.525 98   3.808  0.0002
##  first..caused - second..maintained         2.32 0.534 98   4.345  <.0001
##  second..caused - first..maintained        -3.50 0.546 98  -6.409  <.0001
##  second..caused - second..maintained       -3.18 0.471 98  -6.755  <.0001
##  first..maintained - second..maintained     0.32 0.517 98   0.620  0.5370
confint(s, level = 0.95)
## structure = irreversible:
##  contrast                               estimate    SE df lower.CL upper.CL
##  first..caused - second..caused             6.94 0.502 98    5.944    7.936
##  first..caused - first..maintained          4.96 0.525 98    3.918    6.002
##  first..caused - second..maintained         5.46 0.534 98    4.400    6.520
##  second..caused - first..maintained        -1.98 0.546 98   -3.064   -0.896
##  second..caused - second..maintained       -1.48 0.471 98   -2.414   -0.546
##  first..maintained - second..maintained     0.50 0.517 98   -0.525    1.525
## 
## structure = reversible:
##  contrast                               estimate    SE df lower.CL upper.CL
##  first..caused - second..caused             5.50 0.502 98    4.504    6.496
##  first..caused - first..maintained          2.00 0.525 98    0.958    3.042
##  first..caused - second..maintained         2.32 0.534 98    1.260    3.380
##  second..caused - first..maintained        -3.50 0.546 98   -4.584   -2.416
##  second..caused - second..maintained       -3.18 0.471 98   -4.114   -2.246
##  first..maintained - second..maintained     0.32 0.517 98   -0.705    1.345
## 
## Confidence level used: 0.95

The planned contrasts from this list are “first caused - second caused” in each reversibility condition. They are both significant.

Get effect sizes for the relevant contrasts

First get the SDs that need to be pooled (and the correlation between the measures included in within-comparisons)

library(dplyr)

tdata_long_novel %>%
  group_by(structure, entity) %>%
  summarise_at(vars(rating), list(name=sd))
## # A tibble: 8 × 3
## # Groups:   structure [2]
##   structure    entity                 name
##   <fct>        <fct>                 <dbl>
## 1 irreversible "first \ncaused"       1.18
## 2 irreversible "second \ncaused"      2.04
## 3 irreversible "first \nmaintained"   3.43
## 4 irreversible "second \nmaintained"  3.37
## 5 reversible   "first \ncaused"       1.77
## 6 reversible   "second \ncaused"      3.20
## 7 reversible   "first \nmaintained"   3.12
## 8 reversible   "second \nmaintained"  3.30
library(dplyr)

tdata_novel %>%
  group_by(structure, test_queries) %>%
  summarize(cor=cor(first_caused_rating, second_caused_rating))
## # A tibble: 2 × 3
## # Groups:   structure [2]
##   structure    test_queries    cor
##   <fct>        <fct>         <dbl>
## 1 irreversible novel        -0.149
## 2 reversible   novel        -0.483
# irreversible condition
stats <- d.dep.t.rm(
  m1 = 7.70,
  m2 = 0.76,
  sd1 = 1.182353,
  sd2 = 2.036002,
  n = 50,
  a = 0.05,
  r = -0.1492076
)

stats$estimate
## [1] "$d_{rm}$ = 4.20, 95\\% CI [3.33, 5.08]"
# reversible condition
stats <- d.dep.t.rm(
  m1 = 7.44,
  m2 = 1.94,
  sd1 = 0.213 * sqrt(50),
  sd2 = 0.380 * sqrt(50),
  n = 50,
  a = 0.05,
  r = -0.4834880
)

stats$estimate
## [1] "$d_{rm}$ = 2.59, 95\\% CI [2.00, 3.17]"

In the paper I also say that maintainer ratings for the first cause are higher in the reversible than in the irreversible condition. An effect size for this is given by:

# structure    entity             lsmean    SE df lower.CL upper.CL
# irreversible first..maintained    2.74 0.464 98  1.81965     3.66
# reversible   first..maintained    5.44 0.464 98  4.51965     6.36

stats <- d.ind.t(
  m1 = 5.44,
  m2 = 2.74,
  sd1 = 1.774651,
  sd2 = 1.182353,
  n1 = 50,
  n2 = 50,
  a = 0.05
)

stats$estimate
## [1] "$d_s$ = 1.79, 95\\% CI [1.32, 2.25]"

The other planned contrast is the one comparing the maintainer ratings between the two reversibility conditions. The following code will produce a long list of comparisons, from which the relevant one will be “second..maintained irreversible - second..maintained reversible”

contrasts <- emmeans(a2, ~ entity*structure)
s <- pairs(contrasts, adjust = "none")


s
##  contrast                                                         estimate
##  first..caused irreversible - second..caused irreversible             6.94
##  first..caused irreversible - first..maintained irreversible          4.96
##  first..caused irreversible - second..maintained irreversible         5.46
##  first..caused irreversible - first..caused reversible                0.26
##  first..caused irreversible - second..caused reversible               5.76
##  first..caused irreversible - first..maintained reversible            2.26
##  first..caused irreversible - second..maintained reversible           2.58
##  second..caused irreversible - first..maintained irreversible        -1.98
##  second..caused irreversible - second..maintained irreversible       -1.48
##  second..caused irreversible - first..caused reversible              -6.68
##  second..caused irreversible - second..caused reversible             -1.18
##  second..caused irreversible - first..maintained reversible          -4.68
##  second..caused irreversible - second..maintained reversible         -4.36
##  first..maintained irreversible - second..maintained irreversible     0.50
##  first..maintained irreversible - first..caused reversible           -4.70
##  first..maintained irreversible - second..caused reversible           0.80
##  first..maintained irreversible - first..maintained reversible       -2.70
##  first..maintained irreversible - second..maintained reversible      -2.38
##  second..maintained irreversible - first..caused reversible          -5.20
##  second..maintained irreversible - second..caused reversible          0.30
##  second..maintained irreversible - first..maintained reversible      -3.20
##  second..maintained irreversible - second..maintained reversible     -2.88
##  first..caused reversible - second..caused reversible                 5.50
##  first..caused reversible - first..maintained reversible              2.00
##  first..caused reversible - second..maintained reversible             2.32
##  second..caused reversible - first..maintained reversible            -3.50
##  second..caused reversible - second..maintained reversible           -3.18
##  first..maintained reversible - second..maintained reversible         0.32
##     SE df t.ratio p.value
##  0.502 98  13.833  <.0001
##  0.525 98   9.443  <.0001
##  0.534 98  10.225  <.0001
##  0.302 98   0.862  0.3907
##  0.435 98  13.230  <.0001
##  0.510 98   4.427  <.0001
##  0.517 98   4.987  <.0001
##  0.546 98  -3.625  0.0005
##  0.471 98  -3.144  0.0022
##  0.435 98 -15.343  <.0001
##  0.537 98  -2.198  0.0303
##  0.599 98  -7.809  <.0001
##  0.605 98  -7.205  <.0001
##  0.517 98   0.968  0.3354
##  0.510 98  -9.207  <.0001
##  0.599 98   1.335  0.1850
##  0.656 98  -4.117  0.0001
##  0.661 98  -3.599  0.0005
##  0.517 98 -10.052  <.0001
##  0.605 98   0.496  0.6212
##  0.661 98  -4.840  <.0001
##  0.667 98  -4.321  <.0001
##  0.502 98  10.963  <.0001
##  0.525 98   3.808  0.0002
##  0.534 98   4.345  <.0001
##  0.546 98  -6.409  <.0001
##  0.471 98  -6.755  <.0001
##  0.517 98   0.620  0.5370
confint(s, level = 0.95)
##  contrast                                                         estimate
##  first..caused irreversible - second..caused irreversible             6.94
##  first..caused irreversible - first..maintained irreversible          4.96
##  first..caused irreversible - second..maintained irreversible         5.46
##  first..caused irreversible - first..caused reversible                0.26
##  first..caused irreversible - second..caused reversible               5.76
##  first..caused irreversible - first..maintained reversible            2.26
##  first..caused irreversible - second..maintained reversible           2.58
##  second..caused irreversible - first..maintained irreversible        -1.98
##  second..caused irreversible - second..maintained irreversible       -1.48
##  second..caused irreversible - first..caused reversible              -6.68
##  second..caused irreversible - second..caused reversible             -1.18
##  second..caused irreversible - first..maintained reversible          -4.68
##  second..caused irreversible - second..maintained reversible         -4.36
##  first..maintained irreversible - second..maintained irreversible     0.50
##  first..maintained irreversible - first..caused reversible           -4.70
##  first..maintained irreversible - second..caused reversible           0.80
##  first..maintained irreversible - first..maintained reversible       -2.70
##  first..maintained irreversible - second..maintained reversible      -2.38
##  second..maintained irreversible - first..caused reversible          -5.20
##  second..maintained irreversible - second..caused reversible          0.30
##  second..maintained irreversible - first..maintained reversible      -3.20
##  second..maintained irreversible - second..maintained reversible     -2.88
##  first..caused reversible - second..caused reversible                 5.50
##  first..caused reversible - first..maintained reversible              2.00
##  first..caused reversible - second..maintained reversible             2.32
##  second..caused reversible - first..maintained reversible            -3.50
##  second..caused reversible - second..maintained reversible           -3.18
##  first..maintained reversible - second..maintained reversible         0.32
##     SE df lower.CL upper.CL
##  0.502 98    5.944    7.936
##  0.525 98    3.918    6.002
##  0.534 98    4.400    6.520
##  0.302 98   -0.338    0.858
##  0.435 98    4.896    6.624
##  0.510 98    1.247    3.273
##  0.517 98    1.553    3.607
##  0.546 98   -3.064   -0.896
##  0.471 98   -2.414   -0.546
##  0.435 98   -7.544   -5.816
##  0.537 98   -2.245   -0.115
##  0.599 98   -5.869   -3.491
##  0.605 98   -5.561   -3.159
##  0.517 98   -0.525    1.525
##  0.510 98   -5.713   -3.687
##  0.599 98   -0.389    1.989
##  0.656 98   -4.002   -1.398
##  0.661 98   -3.692   -1.068
##  0.517 98   -6.227   -4.173
##  0.605 98   -0.901    1.501
##  0.661 98   -4.512   -1.888
##  0.667 98   -4.203   -1.557
##  0.502 98    4.504    6.496
##  0.525 98    0.958    3.042
##  0.534 98    1.260    3.380
##  0.546 98   -4.584   -2.416
##  0.471 98   -4.114   -2.246
##  0.517 98   -0.705    1.345
## 
## Confidence level used: 0.95

The relevant contrast “second..maintained irreversible - second..maintained reversible” is significant

Get a d value for this one too:

# structure    entity             lsmean    SE df lower.CL upper.CL
# irreversible second..maintained   2.24 0.471 98  1.30472     3.18
# reversible   second..maintained   5.12 0.471 98  4.18472     6.06


#SDs
#irreversible   first \ncaused  1.182353        
#irreversible   second \ncaused 2.036002        
#irreversible   first \nmaintained  3.427440        
#irreversible   second \nmaintained 3.365855        
#reversible first \ncaused  1.774651        
#reversible second \ncaused 3.203378        
#reversible first \nmaintained  3.124361        
#reversible second \nmaintained 3.298979


stats <- d.ind.t(
  m1 = 5.12,
  m2 = 2.24,
  sd1 = 3.298979,
  sd2 = 3.365855,
  n1 = 50,
  n2 = 50,
  a = 0.05
)

stats$estimate
## [1] "$d_s$ = 0.86, 95\\% CI [0.45, 1.27]"