library("psych350lab")
result <- anova_kgroup_answers(data, "testimony_type", "relevance_rating")
writeup <- apa_kgroup_anova_writeup(
result,
dv_name = "ratings of the importance of relevance",
iv_name = "types of psychological testimony",
group_labels = c("BWS", "CSA", "EWT"),
hypothesis = list(
rh_text = paste0("the relevance of battered woman syndrome ",
"evidence will be seen as most important"),
ranking = c("BWS", "CSA", "EWT"),
pairwise = list(
list(group1 = "BWS", group2 = "CSA", expected = "sig"),
list(group1 = "BWS", group2 = "EWT", expected = "sig"),
list(group1 = "CSA", group2 = "EWT", expected = "sig")
)
),
posthoc_tests = c("LSD", "Tukey's HSD")
)
cat(writeup)APA Write-Up for K-Group ANOVA with Post-Hoc Tests
Description
Generates an APA-style paragraph for a one-way ANOVA with more than 2 groups, including post-hoc pairwise comparison results and hypothesis evaluation.
Usage
apa_kgroup_anova_writeup(
kgroup_results_list,
dv_name,
iv_name,
group_labels = NULL,
hypothesis = NULL,
alpha = 0.05,
posthoc_tests = c("LSD", "Tukey's HSD"),
include_effect_size = FALSE,
effect_size_type = "partial_eta_sq"
)
Arguments
kgroup_results_list
|
Output from anova_kgroup_answers(). |
dv_name
|
Character. Descriptive name for DV (e.g., "ratings of relevance"). |
iv_name
|
Character. Descriptive name for IV (e.g., "type of testimony"). |
group_labels
|
Character vector. Labels for groups in order matching data. |
hypothesis
|
List with hypothesis details:
|
alpha
|
Significance level. Default 0.05. |
posthoc_tests
|
Character vector. Names of post-hoc tests used. Default c("LSD", "Tukey’s HSD"). |
include_effect_size
|
Logical. Include effect size. Default FALSE. |
effect_size_type
|
Character. Type of effect size. Default "partial_eta_sq". |
Value
A character string with APA write-up.