APA Write-Up for K-Group Chi-Square Test

Description

Generates an APA-style paragraph for a chi-square test with more than 2 groups, including post-hoc pairwise comparison results.

Generates an APA-style paragraph for a chi-square test with more than 2 groups, including post-hoc pairwise comparison results.

Usage

apa_kgroup_chi_writeup(
  chi_results_list,
  var1_name,
  var2_name,
  var1_labels = NULL,
  var2_labels = c("Category A", "Category B"),
  hypothesis = NULL,
  alpha = 0.05,
  include_posthoc = TRUE,
  subject = NULL
)

apa_kgroup_chi_writeup(
  chi_results_list,
  var1_name,
  var2_name,
  var1_labels = NULL,
  var2_labels = c("Category A", "Category B"),
  hypothesis = NULL,
  alpha = 0.05,
  include_posthoc = TRUE,
  subject = NULL
)

Arguments

chi_results_list Output from chi_square_kgroup_answers().
var1_name Character. Descriptive name for row variable.
var2_name Character. Descriptive name for column variable.
var1_labels Character vector. Labels for var1 levels.
var2_labels Character vector of length 2. Labels for var2 levels.
hypothesis

List with hypothesis details:

pattern
Named list or vector specifying expected pattern for each var1 level. Use "=" for equal distribution, ">" for more of var2_labels[1], "<" for more of var2_labels[2].
rh_text
Optional. Full RH statement.
comparison_var2_level
Which var2 level to report percentages for.
pairwise_hypotheses
Optional. List of expected pairwise comparisons with format list(list(group1="A", group2="B", direction=">"), …)
alpha Significance level. Default 0.05.
include_posthoc Logical. Include post-hoc comparison results. Default TRUE.
subject Character or NULL. Subject description.

Value

A character string with APA write-up.

A character string with APA write-up.