library("psych350lab")
result <- corr_answers(superman, "clark_age", "lois_age")
# With directional hypothesis
writeup <- apa_corr_writeup(
result,
var1_label = "age of Clark Kent",
var2_label = "age of Lois Lane",
hypothesis = list(
direction = "negative",
rh_text = "media with a younger Clark Kent would have older Lois Lane"
)
)
cat(writeup)APA Write-Up for Pearson Correlation
Description
Generates an APA-style paragraph reporting a Pearson correlation result, with hypothesis-driven conclusions that compare expected vs. actual results.
Usage
apa_corr_writeup(
corr_results_list,
var1_label,
var2_label,
hypothesis = NULL,
alpha = 0.05,
include_descriptives = TRUE,
table_number = NULL
)
Arguments
corr_results_list
|
Output from corr_answers().
|
var1_label
|
Character string. Descriptive label for variable 1 (e.g., "age of Clark Kent"). |
var2_label
|
Character string. Descriptive label for variable 2 (e.g., "age of Lois Lane"). |
hypothesis
|
List with hypothesis details:
|
alpha
|
Significance level. Default 0.05. |
include_descriptives
|
Logical. Include M and SD. Default TRUE. |
table_number
|
Integer or NULL. Table reference if descriptives excluded. |
Value
A character string with the APA write-up.