9 Results
#> `summarise()` ungrouping output (override with `.groups` argument)
# run ttest
t.test(DV ~ IV, data = df_ind_t.test)
model <-# get effect size
effectsize::cohens_d(DV ~ IV, data = df_ind_t.test)$Cohens_d
model_effsize <-# set the significance level for the omnibus ANOVA
0.05
sig_level <-# test significance
broom::tidy(model)$p.value
model_p.value <- model_p.value < sig_level
model_significance <-
# PRINTING --------------------------------------------------------------------
# concatenate omnibus ANOVA and effect sizes into an APA string
paste0(papaja::apa_print(model)$statistic, ", $d = ",
print_model <-sprintf("%.2f", round(model_effsize, 2)), "$")
An independent t-test was used to test the hypothesis that participants in group A had significantly higher scores on the dependent variable than participants in group B. Results of the t-test show that the hypothesis was supported, with scores in group A (\(M = 151.18\), \(SD = 19.29\)) being significantly higher than scores in group B (\(M = 101.18)\), \(SD = 17.19\)), \(t(96.73) = 13.68\), \(p < .001\), \(d = 2.74\).