tdata <- read_csv("exp_data.csv")
## Rows: 720 Columns: 13
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (8): subj_code, desktop_conf, attent_conf, scale_orient, dv_query, expla...
## dbl (5): condition, instr_tests, DV_rating, age, rating_rec
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
tdata$dv_query <- factor(tdata$dv_query, levels = c("probability", "satisfaction_is", "satisfaction_would"),
labels = c("is most \nprobable", "is most \nsatisfying", "would be \nmost satisfying"))
# demographics
min(tdata$age)
## [1] 18
max(tdata$age)
## [1] 78
mean(tdata$age)
## [1] 41.12083
sd(tdata$age)
## [1] 12.98788
# 1 = male, 2 = female, 3 = other
table(tdata$gender)
##
## 1: male 2: female 3: non-binary
## 377 336 5
## 4: prefer not to say
## 2
1 = male, 2 = female, 3 = non-binary, 4 = prefer not to say
table(tdata$dv_query)
##
## is most \nprobable is most \nsatisfying
## 240 240
## would be \nmost satisfying
## 240
# check width of the means 95% cis (none is supposed to be grater than 1)
library(rcompanion)
ci_table <- groupwiseMean(DV_rating ~ dv_query,
data = tdata,
traditional = FALSE,
percentile = TRUE)
(ci_width <- ci_table$Percentile.upper - ci_table$Percentile.lower)
## [1] 0.28 0.46 0.49
tdata %>%
group_by(dv_query) %>%
summarise_at(vars(rating_rec), list(param=sd))
## # A tibble: 3 × 2
## dv_query param
## <fct> <dbl>
## 1 "is most \nprobable" 1.16
## 2 "is most \nsatisfying" 1.78
## 3 "would be \nmost satisfying" 1.81
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_long <- tdata
tdata_sub <- tdata_long
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_rec, factor = 0.01, amount = 0.004)
theme_set(theme_light(base_size = 20, base_family = "Poppins"))
# new labes for the facets
g <- ggplot(tdata_sub, aes(x = dv_query, y = valueJitter)) +
guides(fill=FALSE)+
#facet_grid( ~ dv_query)+
#ggtitle("Subjects' causal srength ratings") +
scale_y_continuous(limits = c(-5.3, 5.3), breaks=seq(-5, 5, 1), expand = c(0,0)) +
#scale_x_discrete(labels=c("no \ninformation", "'You don't \nknow'")) +
#stat_summary(fun.y = mean, geom = "bar", position = "dodge", colour = "black", alpha =0.5) +
#geom_violinhalf(aes(y = rating_rec, group = dv_query, fill = dv_query), color = NA,
# position=position_dodge(1), alpha = 0.4)+
#geom_line(position = pd, color = "black", size = 1, alpha=0.04) +
geom_hline(yintercept=0, linetype="dashed", color = "black")+
geom_jitter(aes(color = dv_query), alpha = 0.5, width = 0.15, height = 0.2) +
stat_summary(aes(y = rating_rec, group=1), fun.data = mean_cl_boot,
geom = "errorbar", width = 0, size = 1) +
stat_summary(aes(y = rating_rec, group=1, color = outcome_valence), fun.y=mean, geom="line",
color = "black", shape = 22, size = 1, alpha = .7)+
stat_summary(aes(y = rating_rec, group=1, fill = dv_query), fun.y=mean, geom="point",
color = "black", shape = 22, size = 2, group=1, alpha = 1)+
stat_summary(aes(y = rating_rec,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 = "Test question", y = "Explanation rating") +
scale_color_manual(name = "Strength",values=c("#66c2a5", "#8da0cb", "#e78ac3", "#a6d854"))+
scale_fill_manual(name = "Strength",values=c("#66c2a5", "#8da0cb", "#e78ac3", "#a6d854"))+
annotate("text", x = 0.5, y = 3.5, label = c("broad-scope"), angle = 90)+
annotate("text", x = 0.5, y = -3.5, label = c("narrow-scope"), angle = 90)+
theme(legend.position = "none")+
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)
## Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
## of ggplot2 3.3.4.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: The `fun.y` argument of `stat_summary()` is deprecated as of ggplot2 3.3.0.
## ℹ Please use the `fun` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning in stat_summary(aes(y = rating_rec, group = 1, color =
## outcome_valence), : Ignoring unknown parameters: `shape`
## Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
g
ggsave("results_means_mainDV.svg",width=6,height=5)
ggsave("results_means_mainDV.pdf",width=6,height=5)
library(ggridges)
## Warning: Paket 'ggridges' wurde unter R Version 4.2.3 erstellt
g2 <- ggplot(tdata_sub, aes(x = rating_rec, y = dv_query, fill = after_stat(x))) +
geom_density_ridges_gradient() +
xlim(-5, 5)+
scale_y_discrete(limits=rev)+
scale_fill_viridis_c(name = "Explanation \nRating", option = "C", breaks=c(-5,0,5), labels=c("narrow scope", "no preference", "broad scope"))+
labs(x = "Explanation rating", y = "Test question") +
myTheme+
theme_light(base_family = "Poppins", base_size = 20)+
theme(panel.grid = element_blank(), axis.text = element_text(colour ="black"))+
theme(legend.position="top",
legend.title=element_blank(),legend.key.width = unit(1.95, 'cm'))
g2
## Picking joint bandwidth of 0.369
#ggsave("results_dist_mainDV.svg",width=7,height=5)
#ggsave("results_dist_mainDV.pdf",width=6,height=5)
library(ggridges)
g2 <- ggplot(tdata_sub, aes(x = rating_rec, y = dv_query, fill = dv_query)) +
scale_x_continuous(breaks = seq(-5, 5, 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", "#8da0cb", "#e78ac3", "#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 = "Explanation rating", y = "Test question") +
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'))+
annotate("text", y = 0.7, x = 4, label = c("broad-scope"), angle = 0)+
annotate("text", y = 0.7, x = -4, label = c("narrow-scope"), angle = 0)+
theme(axis.text.y = element_text(size = 14, angle = 0))
g2
## Picking joint bandwidth of 0.369
ggsave("results_dist2_mainDV.svg",width=7,height=5)
## Picking joint bandwidth of 0.369
ggsave("results_dist2_mainDV.pdf",width=6,height=5)
## Picking joint bandwidth of 0.369
Get the values of the CIs shown in the first plot:
values <- ggplot_build(g)$data[[4]] # values are shown in the 4th panel
values
## x group y ymin ymax PANEL flipped_aes colour linewidth linetype
## 1 1 1 -0.1541667 NA NA 1 FALSE black 1 1
## 2 2 1 -0.4083333 NA NA 1 FALSE black 1 1
## 3 3 1 -0.7083333 NA NA 1 FALSE black 1 1
## alpha
## 1 0.7
## 2 0.7
## 3 0.7
get group medians:
# groupwiseMean(rating_rec ~ Features + Knowledge,
# data = tdata_long,
# traditional = FALSE,
# percentile = TRUE)
groupwiseMedian(rating_rec ~ dv_query,
data = tdata_long,
bca = FALSE,
percentile = TRUE,
R = 1000)
## dv_query n Median Conf.level Percentile.lower
## 1 is most \nprobable 240 0 0.95 0
## 2 is most \nsatisfying 240 0 0.95 0
## 3 would be \nmost satisfying 240 0 0.95 0
## Percentile.upper
## 1 0
## 2 0
## 3 0
library(afex)
## ************
## Welcome to afex. For support visit: http://afex.singmann.science/
## - Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
## - Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
## - 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
## - NEWS: emmeans() for ANOVA models now uses model = 'multivariate' as default.
## - Get and set global package options with: afex_options()
## - Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
## - For example analyses see: browseVignettes("afex")
## ************
##
## Attache Paket: 'afex'
## Das folgende Objekt ist maskiert 'package:lme4':
##
## lmer
a1 <- aov_car(rating_rec ~ dv_query + Error(subj_code), tdata_long, anova_table = list(es = "pes"))
## Contrasts set to contr.sum for the following variables: dv_query
a1
## Anova Table (Type 3 tests)
##
## Response: rating_rec
## Effect df MSE F pes p.value
## 1 dv_query 2, 717 2.59 7.12 *** .019 <.001
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
contrasts(tdata_long$dv_query) <- "contr.poly"
LinearModel.1 <- lm(rating_rec ~ dv_query, data=tdata_long)
summary(LinearModel.1)
##
## Call:
## lm(formula = rating_rec ~ dv_query, data = tdata_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8458 0.1542 0.4083 0.7083 5.7083
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.42361 0.06001 -7.059 3.96e-12 ***
## dv_query.L -0.39186 0.10393 -3.770 0.000177 ***
## dv_query.Q -0.01871 0.10393 -0.180 0.857179
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.61 on 717 degrees of freedom
## Multiple R-squared: 0.01948, Adjusted R-squared: 0.01675
## F-statistic: 7.123 on 2 and 717 DF, p-value: 0.0008643
ttestdat <- subset(tdata_long, dv_query == "is most \nprobable" | dv_query == "is most \nsatisfying")
t.test(ttestdat$rating_rec ~ ttestdat$dv_query, var.equal = F, alternative = "greater")
##
## Welch Two Sample t-test
##
## data: ttestdat$rating_rec by ttestdat$dv_query
## t = 1.8564, df = 410.33, p-value = 0.03206
## alternative hypothesis: true difference in means between group is most
## probable and group is most
## satisfying is greater than 0
## 95 percent confidence interval:
## 0.02844933 Inf
## sample estimates:
## mean in group is most \nprobable mean in group is most \nsatisfying
## -0.1541667 -0.4083333
Get effect size for this difference (using the power function)
first get estimates for the standardizer
library(dplyr)
tdata_long %>%
group_by(dv_query) %>%
summarise_at(vars(rating_rec), list(name=sd))
## # A tibble: 3 × 2
## dv_query name
## <fct> <dbl>
## 1 "is most \nprobable" 1.16
## 2 "is most \nsatisfying" 1.78
## 3 "would be \nmost satisfying" 1.81
library(pwr)
## Warning: Paket 'pwr' wurde unter R Version 4.2.3 erstellt
# based on the difference observed in the previous study
pwr.t.test(d=(-0.15-(-0.41))/1.465,
power=0.8,
sig.level=0.05,
type="two.sample",
alternative="greater")
##
## Two-sample t test power calculation
##
## n = 393.2568
## d = 0.1774744
## sig.level = 0.05
## power = 0.8
## alternative = greater
##
## NOTE: n is number in *each* group
ttestdat2 <- subset(tdata_long, dv_query == "is most \nsatisfying" | dv_query == "would be \nmost satisfying")
t.test(ttestdat2$rating_rec ~ ttestdat2$dv_query, var.equal = F, alternative = "greater")
##
## Welch Two Sample t-test
##
## data: ttestdat2$rating_rec by ttestdat2$dv_query
## t = 1.8312, df = 477.85, p-value = 0.03385
## alternative hypothesis: true difference in means between group is most
## satisfying and group would be
## most satisfying is greater than 0
## 95 percent confidence interval:
## 0.02999941 Inf
## sample estimates:
## mean in group is most \nsatisfying
## -0.4083333
## mean in group would be \nmost satisfying
## -0.7083333
library(pwr)
# based on the difference observed in the previous study
pwr.t.test(d=(-0.41-(-0.71))/1.79,
power=0.8,
sig.level=0.05,
type="two.sample",
alternative="greater")
##
## Two-sample t test power calculation
##
## n = 440.8898
## d = 0.1675978
## sig.level = 0.05
## power = 0.8
## alternative = greater
##
## NOTE: n is number in *each* group
counts <- tdata_long %>%
group_by(dv_query, rating_rec) %>%
summarize(n = n()) %>%
mutate(pct = n/sum(n),
lbl = scales::percent(pct))
## `summarise()` has grouped output by 'dv_query'. You can override using the
## `.groups` argument.
counts
## # A tibble: 31 × 5
## # Groups: dv_query [3]
## dv_query rating_rec n pct lbl
## <fct> <dbl> <int> <dbl> <chr>
## 1 "is most \nprobable" -5 2 0.00833 0.83%
## 2 "is most \nprobable" -4 3 0.0125 1.25%
## 3 "is most \nprobable" -3 11 0.0458 4.58%
## 4 "is most \nprobable" -2 4 0.0167 1.67%
## 5 "is most \nprobable" -1 7 0.0292 2.92%
## 6 "is most \nprobable" 0 200 0.833 83.33%
## 7 "is most \nprobable" 1 3 0.0125 1.25%
## 8 "is most \nprobable" 2 4 0.0167 1.67%
## 9 "is most \nprobable" 3 4 0.0167 1.67%
## 10 "is most \nprobable" 5 2 0.00833 0.83%
## # ℹ 21 more rows
# shows that 0 is the mode in all conditions
tdata_long$category[tdata_long$rating_rec < 0] <- "narrow"
## Warning: Unknown or uninitialised column: `category`.
tdata_long$category[tdata_long$rating_rec == 0] <- "unbiased"
tdata_long$category[tdata_long$rating_rec > 0] <- "broad"
counts2 <- tdata_long %>%
group_by(dv_query, category) %>%
summarize(n = n()) %>%
mutate(pct = n/sum(n),
lbl = scales::percent(pct))
## `summarise()` has grouped output by 'dv_query'. You can override using the
## `.groups` argument.
counts2
## # A tibble: 9 × 5
## # Groups: dv_query [3]
## dv_query category n pct lbl
## <fct> <chr> <int> <dbl> <chr>
## 1 "is most \nprobable" broad 13 0.0542 5.4%
## 2 "is most \nprobable" narrow 27 0.112 11.2%
## 3 "is most \nprobable" unbiased 200 0.833 83.3%
## 4 "is most \nsatisfying" broad 21 0.0875 9%
## 5 "is most \nsatisfying" narrow 53 0.221 22%
## 6 "is most \nsatisfying" unbiased 166 0.692 69%
## 7 "would be \nmost satisfying" broad 14 0.0583 6%
## 8 "would be \nmost satisfying" narrow 66 0.275 28%
## 9 "would be \nmost satisfying" unbiased 160 0.667 67%
counts2$category <- factor(counts2$category, levels = c("unbiased", "narrow", "broad"), labels = c("unbiased", "narrow l.s.", "broad l.s."))
Get proportion CIs for different categories in each diagnosability condition:
library(PropCIs)
library(DescTools)
##
## Attache Paket: 'DescTools'
## Das folgende Objekt ist maskiert 'package:data.table':
##
## %like%
library(purrr)
counts_prob <- subset(counts2, dv_query == "is most \nprobable")
counts_is_satis <- subset(counts2, dv_query == "is most \nsatisfying")
counts_would_satis <- subset(counts2, dv_query == "would be \nmost satisfying")
(MultinomCI(counts_prob$n,
conf.level=0.95,
method="sisonglaz") -> selection_ci_1)
## est lwr.ci upr.ci
## [1,] 0.05416667 0.01250000 0.1007319
## [2,] 0.11250000 0.07083333 0.1590652
## [3,] 0.83333333 0.79166667 0.8798985
(MultinomCI(counts_is_satis$n,
conf.level=0.95,
method="sisonglaz") -> selection_ci_2)
## est lwr.ci upr.ci
## [1,] 0.0875000 0.03333333 0.1485498
## [2,] 0.2208333 0.16666667 0.2818831
## [3,] 0.6916667 0.63750000 0.7527164
(MultinomCI(counts_would_satis$n,
conf.level=0.95,
method="sisonglaz") -> selection_ci_3)
## est lwr.ci upr.ci
## [1,] 0.05833333 0.0000000 0.1193708
## [2,] 0.27500000 0.2166667 0.3360375
## [3,] 0.66666667 0.6083333 0.7277041
ci_low <- c(selection_ci_1[,2], selection_ci_2[,2], selection_ci_3[,2])
ci_up <- c(selection_ci_1[,3], selection_ci_2[,3], selection_ci_3[,3])
plotdata <- counts2
plotdata$ci_low <- ci_low
plotdata$ci_up <- ci_up
Plot:
library(scales)
##
## Attache Paket: 'scales'
## Das folgende Objekt ist maskiert 'package:purrr':
##
## discard
## Das folgende Objekt ist maskiert 'package:readr':
##
## col_factor
theme_set(theme_light(base_size = 12, base_family = "Poppins"))
# new labels for the facets
query.labs <- c("test question: \nis most probable", "test question: \nis most satisfying", "test question: \nwould be most satisfying")
names(query.labs) <- c("is most \nprobable", "is most \nsatisfying", "would be \nmost satisfying")
g<- ggplot(plotdata,
aes(x = category,
y = pct,
fill = dv_query)) +
facet_grid(~ dv_query, labeller = labeller(dv_query = query.labs))+
geom_bar(stat = "identity",
position = "dodge") +
scale_y_continuous(limits = seq(0, 2),
breaks = seq(0, 1, .25),
expand = c(0,0),
label = percent) +
#coord_cartesian(xlim =c(1, 7), ylim = c(0, 1.1))+
#coord_cartesian(clip = "off")+
geom_text(aes(label = lbl),
size = 3.5,
position = position_dodge(width = 1),
vjust = -3) +
scale_fill_manual(name = "Strength",values=c("#66c2a5", "#8da0cb", "#e78ac3", "#a6d854"))+
#scale_fill_brewer(palette = "Pastel1") +
labs(y = "Percentage",
fill = "Explanatory preference",
x = "Explanatory preference")+
geom_pointrange(ymin = ci_low, ymax = ci_up, position = position_dodge(width = 0.89), shape = 22, size = 0.3)+
#annotate(geom = "hline",yintercept = 0.5, y = 0.5, color = "black", size = 1, linetype='dotted')+
#annotate("pointrange", x = plotdata$Transformation, y = plotdata$pct,
# ymin = plotdata$ci_low,
# ymax = plotdata$ci_up,
# colour = "black", size = 0.8, shape = 22, fill = Transformation, fatten = 1)+
#annotate("text", x = pvalues_x, y = Inf, label = pvalues, size = 4, vjust = 1.8)+
theme(legend.position = "none", axis.title = element_text(size = 20), axis.text = element_text(size = 13, color = "black"),
legend.text = element_text(size = 13),legend.title = element_text(size = 13),strip.text.x = element_text(size = 13))+
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
g
#ggsave("selections_between.pdf",width=6,height=5)
ggsave("categories.svg",width=11,height=5)
ggsave("categories.pdf",width=11,height=5)
test if the proportions of subjects showing a narrow latent scope bias differs between probability and satisfaction conditions
“is most probable” vs. “is most satisfying”:
prob_vs_is_sat <- prop.test(x = c(plotdata$n[2], plotdata$n[5]), n = c(240, 240), alternative = "less", correct = F)
prob_vs_is_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[2], plotdata$n[5]) out of c(240, 240)
## X-squared = 10.14, df = 1, p-value = 0.0007254
## alternative hypothesis: less
## 95 percent confidence interval:
## -1.0000000 -0.0529685
## sample estimates:
## prop 1 prop 2
## 0.1125000 0.2208333
“is most probable” vs. “would be most satisfying”
prob_vs_would_sat <- prop.test(x = c(plotdata$n[2], plotdata$n[8]), n = c(240, 240), alternative = "less", correct = F)
prob_vs_would_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[2], plotdata$n[8]) out of c(240, 240)
## X-squared = 20.285, df = 1, p-value = 3.336e-06
## alternative hypothesis: less
## 95 percent confidence interval:
## -1.0000000 -0.1044214
## sample estimates:
## prop 1 prop 2
## 0.1125 0.2750
“is most satisfying” vs. “would be most satisfying”
is_sat_vs_would_sat <- prop.test(x = c(plotdata$n[5], plotdata$n[8]), n = c(240, 240), alternative = "two.sided", correct = F)
is_sat_vs_would_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[5], plotdata$n[8]) out of c(240, 240)
## X-squared = 1.8883, df = 1, p-value = 0.1694
## alternative hypothesis: two.sided
## 95 percent confidence interval:
## -0.13127252 0.02293919
## sample estimates:
## prop 1 prop 2
## 0.2208333 0.2750000
Test if proportion of normative judgments is higher in the probability condition:
“is most probable” vs. “is most satisfying”
prob_vs_is_sat <- prop.test(x = c(plotdata$n[3], plotdata$n[6]), n = c(240, 240), alternative = "greater", correct = F)
prob_vs_is_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[3], plotdata$n[6]) out of c(240, 240)
## X-squared = 13.299, df = 1, p-value = 0.0001328
## alternative hypothesis: greater
## 95 percent confidence interval:
## 0.0786599 1.0000000
## sample estimates:
## prop 1 prop 2
## 0.8333333 0.6916667
“is most probable” vs. “would be most satisfying”
prob_vs_is_sat <- prop.test(x = c(plotdata$n[3], plotdata$n[9]), n = c(240, 240), alternative = "greater", correct = F)
prob_vs_is_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[3], plotdata$n[9]) out of c(240, 240)
## X-squared = 17.778, df = 1, p-value = 1.241e-05
## alternative hypothesis: greater
## 95 percent confidence interval:
## 0.1028635 1.0000000
## sample estimates:
## prop 1 prop 2
## 0.8333333 0.6666667
“is most satisfying” vs. “would be most satisfying”
is_sat_vs_would_sat <- prop.test(x = c(plotdata$n[6], plotdata$n[9]), n = c(240, 240), alternative = "greater", correct = F)
is_sat_vs_would_sat
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(plotdata$n[6], plotdata$n[9]) out of c(240, 240)
## X-squared = 0.3442, df = 1, p-value = 0.2787
## alternative hypothesis: greater
## 95 percent confidence interval:
## -0.04506624 1.00000000
## sample estimates:
## prop 1 prop 2
## 0.6916667 0.6666667