9 Results

#> `summarise()` ungrouping output (override with `.groups` argument)
# run ttest
model <- t.test(DV ~ IV, data = df_ind_t.test)
# get effect size
model_effsize <- effectsize::cohens_d(DV ~ IV, data = df_ind_t.test)$Cohens_d
# set the significance level for the omnibus ANOVA
sig_level <- 0.05
# test significance
model_p.value <- broom::tidy(model)$p.value
model_significance <- model_p.value < sig_level

# PRINTING --------------------------------------------------------------------
# concatenate omnibus ANOVA and effect sizes into an APA string
print_model <- paste0(papaja::apa_print(model)$statistic, ", $d = ",
                      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.