The results was carried out using the R programming language, known for
its power and flexibility in data analysis. The results are presented in
an R Markdown document, a tool that dynamically combines code, text and
graphics. R Markdown facilitates the creation of interactive reports
where graphics can be expanded and data points examined in detail,
something that is not possible with static files.
Moreover, this document allows you to view the R code and the results (click top right on the code - show all the code or hide the code). This Rmarkdown will be updated every day with new data. The dataset is included directly with the Google Form that way you can make the traceability of the whole process. The written conclusions, most of the time, will also be updated automatically according to the new data.
Currently, the sample size in tria 1 is 250
results = list()
results2 = list()
results3 = list()
# Loop for each item
for (i in seq_along(items_a)) {
item_a = items_a[i]
item_b = items_b[i]
# Paired t-test
test = t.test(df1_f[[item_b]], df1_f[[item_a]], paired = TRUE)
cohens = cohensD(df1_f[[item_b]], df1_f[[item_a]], method = "paired")
# Power calculation
power = pwr.t.test(d = cohens, n = length(df1_f[[item_a]]), sig.level = 0.05, type = "paired", alternative = "two.sided")
# Saving results
results[[paste(item_a, "vs", item_b)]] <- test
results2[[paste(item_a, "vs", item_b)]] <- cohens
results3[[paste(item_a, "vs", item_b)]] <- power
if (is.nan(test$p.value)) {
results[[paste(item_a, "vs", item_b)]]$conclusion <- "The p-value is NaN, indicating the test could not be performed because pretest is equal to postest."
} else if (test$p.value < 0.05) {
results[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a significant difference at the 5% level."
} else {
results[[paste(item_a, "vs", item_b)]]$conclusion <- "There is no significant difference at the 5% level."
}
if (is.nan(cohens)) {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is not possible to calculate a small Cohen´s Effect Size."
} else if (cohens < 0.1999) {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a poor Cohen´s Effect Size."
} else if (cohens < 0.5) {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a small Cohen´s effect size."
} else if (cohens < 0.8) {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a medium Cohen´s effect size."
} else {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a large Cohen´s effect size."
}
if (power$power < 0.9) {
results3[[paste(item_a, "vs", item_b)]]$conclusion <- "The power is below 0.9, indicating a higher risk of Type II error."
} else {
results3[[paste(item_a, "vs", item_b)]]$conclusion <- "The power is above 0.9, indicating a lower risk of Type II error."
}
}
results## $`item_2a vs item_2b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -1.7989, df = 249, p-value = 0.07325
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.035193821 0.001593821
## sample estimates:
## mean difference
## -0.0168
##
##
## $`item_3a vs item_3b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -3.8535, df = 249, p-value = 0.0001482
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06648876 -0.02151124
## sample estimates:
## mean difference
## -0.044
##
##
## $`item_6a vs item_6b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -4.0549, df = 249, p-value = 6.711e-05
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.07606863 -0.02633137
## sample estimates:
## mean difference
## -0.0512
##
##
## $`item_9a vs item_9b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -7.4135, df = 249, p-value = 1.92e-12
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.11340384 -0.06579616
## sample estimates:
## mean difference
## -0.0896
##
##
## $`item_10a vs item_10b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -4.7508, df = 249, p-value = 3.425e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.08147912 -0.03372088
## sample estimates:
## mean difference
## -0.0576
##
##
## $`item_12a vs item_12b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -4.5331, df = 249, p-value = 9.033e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.08262589 -0.03257411
## sample estimates:
## mean difference
## -0.0576
##
##
## $`item_13a vs item_13b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -3.7975, df = 249, p-value = 0.0001837
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06864283 -0.02175717
## sample estimates:
## mean difference
## -0.0452
##
##
## $`item_15a vs item_15b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -5.358, df = 249, p-value = 1.916e-07
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.08807285 -0.04072715
## sample estimates:
## mean difference
## -0.0644
##
##
## $`item_17a vs item_17b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -5.2746, df = 249, p-value = 2.89e-07
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.07196611 -0.03283389
## sample estimates:
## mean difference
## -0.0524
##
##
## $`item_19a vs item_19b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -2.91, df = 249, p-value = 0.003942
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.049634095 -0.009565905
## sample estimates:
## mean difference
## -0.0296
##
##
## $`item_20a vs item_20b`
##
## Paired t-test
##
## data: df1_f[[item_b]] and df1_f[[item_a]]
## t = -4.7098, df = 249, p-value = 4.122e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.075447 -0.030953
## sample estimates:
## mean difference
## -0.0532
## $`item_2a vs item_2b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.113771
## sig.level = 0.05
## power = 0.4333691
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_3a vs item_3b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.2437145
## sig.level = 0.05
## power = 0.9698502
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_6a vs item_6b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.2564556
## sig.level = 0.05
## power = 0.9812036
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_9a vs item_9b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.4688728
## sig.level = 0.05
## power = 1
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_10a vs item_10b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.3004681
## sig.level = 0.05
## power = 0.9972183
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_12a vs item_12b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.2866996
## sig.level = 0.05
## power = 0.9946998
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_13a vs item_13b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.2401721
## sig.level = 0.05
## power = 0.9658334
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_15a vs item_15b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.3388671
## sig.level = 0.05
## power = 0.9996339
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_17a vs item_17b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.3335961
## sig.level = 0.05
## power = 0.9995065
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_19a vs item_19b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.1840416
## sig.level = 0.05
## power = 0.8260707
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_20a vs item_20b`
##
## Paired t test power calculation
##
## n = 250
## d = 0.2978752
## sig.level = 0.05
## power = 0.9968488
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
The paired t-test for item 2 led to show that the pretest - post change was -0.0168. p - value was 0.0732491. There is no significant difference at the 5% level. Cohens`s D was 0.113771 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 3 led to show that the pretest - post change was -0.044. p - value was 1.4823644^{-4} There is a significant difference at the 5% level. Cohens`s D was 0.2437145 There is a small Cohen´s effect size.. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 6 led to show that the pretest - post change was -0.0512 p - value was 6.7114638^{-5}. There is a significant difference at the 5% level. Cohens`s D was 0.2564556 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 9 led to show that the pretest - post change was -0.0896. p - value was1.9202973^{-12}. There is a significant difference at the 5% level. Cohens`s D was 0.4688728 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 10 led to show that the pretest - post change was -0.0576. p - value was 3.4253532^{-6}. There is a significant difference at the 5% level. Cohens`s D was 0.3004681 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 12 led to show that the pretest - post change was -0.0576. p - value was 9.0325534^{-6}. There is a significant difference at the 5% level. Cohens`s D was 0.2866996 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 13 led to show that the pretest - post change was -0.0452. p - value was 1.8373268^{-4}. There is a significant difference at the 5% level. Cohens`s D was 0.2401721 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 15 led to show that the pretest - post change was -0.0644. p - value was 1.9161001^{-7}. There is a significant difference at the 5% level. Cohens`s D was 0.3388671 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 17 led to show that the pretest - post change was -0.0524. p - value was 2.8902089^{-7}. There is a significant difference at the 5% level. Cohens`s D was 0.3335961 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 19 led to show that the pretest - post change was -0.0296. p - value was 0.0039419. There is a significant difference at the 5% level. Cohens`s D was 0.1840416 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 20 led to show that the pretest - post change was -0.0532. p - value was 4.1224852^{-6}. There is a significant difference at the 5% level. Cohens`s D was 0.2978752 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
# Pivot to transform in a long data set
df_long = df1_f %>%
pivot_longer(cols = c(items_a, items_b),
names_to = "item",
values_to = "value") %>%
mutate(group = ifelse(grepl("a$", item), "Pretest", "Postest"))
# plotting box plot
ggplotly(ggplot(df_long, aes(x = group, y = value, fill = group)) +
geom_boxplot() +
facet_wrap(~item, scales = "free") +
labs(title = "Comparison Pretest vs Postest",
x = "Group",
y = "Value") +
theme_minimal() +
theme(
axis.text.x = element_blank(),
axis.ticks.x = element_blank()))We can see that negative differences are more frequent, indicating that the willingness to buy in pretest (without labels) are higher compared to posttest (with labels).
Currently, the sample size in tria 2 is 251
results4 <- list()
results5 <- list()
results6 <- list()
# Loop over items
for (i in seq_along(items_a2)) {
item_a <- items_a2[i]
item_b <- items_b2[i]
# Paired t-test
test <- t.test( df2_f[[item_b]], df2_f[[item_a]], paired = TRUE)
cohens = cohensD(df2_f[[item_b]], df2_f[[item_a]], method = "paired")
# Power calculation
power = pwr.t.test(d = cohens, n = length(df2_f[[item_a]]), sig.level = 0.05, type = "paired", alternative = "two.sided")
# Saving results
results4[[paste(item_a, "vs", item_b)]] <- test
results5[[paste(item_a, "vs", item_b)]] <- cohens
results6[[paste(item_a, "vs", item_b)]] <- power
if (is.nan(test$p.value)) {
results4[[paste(item_a, "vs", item_b)]]$conclusion <- "The p-value is NaN, indicating the test could not be performed because pretest is iqual to postest."
} else if (test$p.value < 0.05) {
results4[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a significant difference at the 5% level."
} else {
results4[[paste(item_a, "vs", item_b)]]$conclusion <- "There is no significant difference at the 5% level."
}
if (is.nan(cohens)) {
results5[[paste(item_a, "vs", item_b)]]$conclusion <- "There is not possible to calculate a small Cohen´s Effect Size."
} else if (cohens < 0.1999) {
results5[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a poor Cohen´s Effect Size."
} else if (cohens < 0.5) {
results5[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a small Cohen´s effect size."
} else if (cohens < 0.8) {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a medium Cohen´s effect size."
} else {
results2[[paste(item_a, "vs", item_b)]]$conclusion <- "There is a large Cohen´s effect size."
}
if (power$power < 0.9) {
results6[[paste(item_a, "vs", item_b)]]$conclusion <- "The power is below 0.9, indicating a higher risk of Type II error."
} else {
results6[[paste(item_a, "vs", item_b)]]$conclusion <- "The power is above 0.9, indicating a lower risk of Type II error."
}
}
results4## $`item_1a vs item_1b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -5.0076, df = 250, p-value = 1.042e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06883259 -0.02997219
## sample estimates:
## mean difference
## -0.04940239
##
##
## $`item_4a vs item_4b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -2.1752, df = 250, p-value = 0.03055
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.039475348 -0.001958915
## sample estimates:
## mean difference
## -0.02071713
##
##
## $`item_5a vs item_5b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -2.7287, df = 250, p-value = 0.00681
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.056935349 -0.009200109
## sample estimates:
## mean difference
## -0.03306773
##
##
## $`item_7a vs item_7b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -3.5594, df = 250, p-value = 0.0004447
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06188533 -0.01779594
## sample estimates:
## mean difference
## -0.03984064
##
##
## $`item_8a vs item_8b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -6.0384, df = 250, p-value = 5.6e-09
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.09087658 -0.04617521
## sample estimates:
## mean difference
## -0.0685259
##
##
## $`item_11a vs item_11b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -0.5666, df = 250, p-value = 0.5715
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.02318248 0.01282392
## sample estimates:
## mean difference
## -0.005179283
##
##
## $`item_14a vs item_14b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -4.7835, df = 250, p-value = 2.947e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06299344 -0.02624959
## sample estimates:
## mean difference
## -0.04462151
##
##
## $`item_16a vs item_16b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -3.7258, df = 250, p-value = 0.0002407
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06820868 -0.02103435
## sample estimates:
## mean difference
## -0.04462151
##
##
## $`item_18a vs item_18b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -2.6618, df = 250, p-value = 0.008275
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.056841356 -0.008497289
## sample estimates:
## mean difference
## -0.03266932
##
##
## $`item_21a vs item_21b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -4.2784, df = 250, p-value = 2.683e-05
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.07039873 -0.02601561
## sample estimates:
## mean difference
## -0.04820717
##
##
## $`item_22a vs item_22b`
##
## Paired t-test
##
## data: df2_f[[item_b]] and df2_f[[item_a]]
## t = -2.9925, df = 250, p-value = 0.003044
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.05218843 -0.01075977
## sample estimates:
## mean difference
## -0.0314741
## $`item_1a vs item_1b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.3160745
## sig.level = 0.05
## power = 0.9987702
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_4a vs item_4b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.1372957
## sig.level = 0.05
## power = 0.5819539
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_5a vs item_5b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.1722321
## sig.level = 0.05
## power = 0.7758385
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_7a vs item_7b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.2246679
## sig.level = 0.05
## power = 0.9436007
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_8a vs item_8b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.3811383
## sig.level = 0.05
## power = 0.9999749
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_11a vs item_11b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.03576339
## sig.level = 0.05
## power = 0.08722164
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_14a vs item_14b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.3019315
## sig.level = 0.05
## power = 0.9974848
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_16a vs item_16b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.2351729
## sig.level = 0.05
## power = 0.9600723
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_18a vs item_18b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.1680141
## sig.level = 0.05
## power = 0.7554208
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_21a vs item_21b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.270049
## sig.level = 0.05
## power = 0.9893303
## alternative = two.sided
## conclusion = The power is above 0.9, indicating a lower risk of Type II error.
##
## NOTE: n is number of *pairs*
##
##
## $`item_22a vs item_22b`
##
## Paired t test power calculation
##
## n = 251
## d = 0.1888866
## sig.level = 0.05
## power = 0.8463846
## alternative = two.sided
## conclusion = The power is below 0.9, indicating a higher risk of Type II error.
##
## NOTE: n is number of *pairs*
The paired t-test for item 1 led to show that the pretest - post change was ****. p - value was 1.0419801^{-6}. There is a significant difference at the 5% level. Cohens`s D was 0.3160745 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 4 led to show that the pretest - post change was -0.0207171. p - value was 0.0305547. There is a significant difference at the 5% level. Cohens`s D was 0.1372957 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 5 led to show that the pretest - post change was -0.0330677. p - value was 0.0068105. There is a significant difference at the 5% level. Cohens`s D was 0.1722321 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 7 led to show that the pretest - post change was -0.0398406. p - value was4.4472953^{-4}. There is a significant difference at the 5% level. Cohens`s D was 0.2246679 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 8 led to show that the pretest - post change was -0.0685259. p - value was 5.599994^{-9}. There is a significant difference at the 5% level. Cohens`s D was 0.3811383 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 11 led to show that the pretest - post change was -0.0051793. p - value was 0.5714952. There is no significant difference at the 5% level. Cohens`s D was 0.0357634 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 14 led to show that the pretest - post change was -0.0446215. p - value was 2.9465496^{-6}. There is a significant difference at the 5% level. Cohens`s D was 0.3019315 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 16 led to show that the pretest - post change was -0.0446215. p - value was 2.4069692^{-4}. There is a significant difference at the 5% level.Cohens`s D was 0.2351729 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 18 led to show that the pretest - post change was -0.0326693. p - value was 0.0082752. There is a significant difference at the 5% level. Cohens`s D was 0.1680141 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
The paired t-test for item 21 led to show that the pretest - post change was -0.0482072. p - value was 2.6827171^{-5}. There is a significant difference at the 5% level. Cohens`s D was 0.270049 There is a small Cohen´s effect size. The power is above 0.9, indicating a lower risk of Type II error.
The paired t-test for item 22 led to show that the pretest - post change was -0.0314741. p - value was 0.0030438. There is a significant difference at the 5% level. Cohens`s D was 0.1888866 There is a poor Cohen´s Effect Size. The power is below 0.9, indicating a higher risk of Type II error.
Items 4,5,11 and 14 had positive \((posttest-pretest)\) differences leading to the conclusion that for these products, willingness to purchase increases with treatment (lables) For other products the differences were negative as expected.
Join trial 1 and trial 2.
##
## Paired t-test
##
## data: postest_values and pretest_values
## t = -6.5092, df = 1251, p-value = 1.091e-10
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.03866770 -0.02075722
## sample estimates:
## mean difference
## -0.02971246
##
## Paired t test power calculation
##
## n = 1255
## d = 0.1839617
## sig.level = 0.05
## power = 0.9999973
## alternative = two.sided
##
## NOTE: n is number of *pairs*
##
## Paired t-test
##
## data: postest_values2 and pretest_values2
## t = -10.618, df = 2254, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.04749272 -0.03268466
## sample estimates:
## mean difference
## -0.04008869
##
## Paired t test power calculation
##
## n = 2259
## d = 0.2235948
## sig.level = 0.05
## power = 1
## alternative = two.sided
##
## NOTE: n is number of *pairs*
##
## Paired t-test
##
## data: postest_values3 and pretest_values3
## t = -9.4279, df = 1001, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.06486829 -0.04251694
## sample estimates:
## mean difference
## -0.05369261
##
## Paired t test power calculation
##
## n = 1004
## d = 0.2978384
## sig.level = 0.05
## power = 1
## alternative = two.sided
##
## NOTE: n is number of *pairs*
##
## Paired t-test
##
## data: postest_values4 and pretest_values4
## t = -10.889, df = 1001, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.07538314 -0.05236137
## sample estimates:
## mean difference
## -0.06387226
##
## Paired t test power calculation
##
## n = 1004
## d = 0.3439879
## sig.level = 0.05
## power = 1
## alternative = two.sided
##
## NOTE: n is number of *pairs*
## [1] "time" "filter1" "filter2"
## [4] "Whombuy" "sex" "age"
## [7] "stratum" "instruction" "trust"
## [10] "brand" "price" "flavor"
## [13] "salt" "sucar" "fat"
## [16] "edul" "trans_fats" "healthy_1"
## [19] "healthy_2" "healthy_3" "healthy_4"
## [22] "healthy_5" "healthy_6" "healthy_7"
## [25] "freq_sausages" "freq_crackers" "freq_dairy"
## [28] "freq_sodas" "freq_pastries" "freq_others"
## [31] "place" "children_14" "university_community"
## [34] "number_family" "current_health" "knowlenght_labels"
## [37] "index" "item" "differences"
## [40] "label"
## Df Sum Sq Mean Sq F value Pr(>F)
## label 3 0.78 0.25945 8.301 1.66e-05 ***
## Residuals 5507 172.13 0.03126
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
##
## Attaching package: 'fdth'
##
## The following objects are masked from 'package:stats':
##
## sd, var
## Class limits f rf rf(%) cf cf(%)
## [-1,-0.9) 2 0.00 0.04 2 0.04
## [-0.9,-0.8) 2 0.00 0.04 4 0.07
## [-0.8,-0.7) 6 0.00 0.11 10 0.18
## [-0.7,-0.6) 14 0.00 0.25 24 0.44
## [-0.6,-0.5) 7 0.00 0.13 31 0.56
## [-0.5,-0.4) 68 0.01 1.23 99 1.80
## [-0.4,-0.3) 81 0.01 1.47 180 3.27
## [-0.3,-0.2) 124 0.02 2.25 304 5.52
## [-0.2,-0.1) 270 0.05 4.90 574 10.42
## [-0.1,0) 222 0.04 4.03 796 14.44
## [0,0.1) 3642 0.66 66.09 4438 80.53
## [0.1,0.2) 541 0.10 9.82 4979 90.35
## [0.2,0.3) 119 0.02 2.16 5098 92.51
## [0.3,0.4) 247 0.04 4.48 5345 96.99
## [0.4,0.5) 6 0.00 0.11 5351 97.10
## [0.5,0.6) 92 0.02 1.67 5443 98.77
## [0.6,0.7) 37 0.01 0.67 5480 99.44
## [0.7,0.8) 0 0.00 0.00 5480 99.44
## [0.8,0.9) 21 0.00 0.38 5501 99.82
## [0.9,1) 0 0.00 0.00 5501 99.82
## [1,1.1) 10 0.00 0.18 5511 100.00
Total zeros 2900
## [1] "time" "filter1" "filter2"
## [4] "Whombuy" "sex" "age"
## [7] "stratum" "instruction" "trust"
## [10] "brand" "price" "flavor"
## [13] "salt" "sucar" "fat"
## [16] "edul" "trans_fats" "healthy_1"
## [19] "healthy_2" "healthy_3" "healthy_4"
## [22] "healthy_5" "healthy_6" "healthy_7"
## [25] "freq_sausages" "freq_crackers" "freq_dairy"
## [28] "freq_sodas" "freq_pastries" "freq_others"
## [31] "place" "children_14" "university_community"
## [34] "number_family" "current_health" "knowlenght_labels"
## [37] "index" "item" "differences"
## [40] "label" "type"
## Df Sum Sq Mean Sq F value Pr(>F)
## type 8 0.72 0.09025 2.884 0.00332 **
## Residuals 5502 172.19 0.03130
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.