apa | R Documentation |
This function takes a hypothesis test object (e.g.; t.test(), cor.test(), chisq.test()) as an input, and returns a string with the test result in APA format.
apa(test.object, tails = 2, sig.digits = 2, p.lb = 0.01)
test.object |
A hypothesis test object generated by functions such as t.test(), cor.test, chisq.test() |
tails |
The number of tails in the test (1 or 2) |
sig.digits |
The number of digits results are rounded to |
p.lb |
The lower bound of the p-value display. If the p-value is less than p.lb, the exact value will not be displayed. |
x <- rnorm(100)
y <- x + rnorm(100)
a <- sample(1:3, size = 200, prob = c(.3, .2, .5), replace = TRUE)
b <- sample(1:3, size = 200, prob = c(.3, .2, .5), replace = TRUE)
apa(t.test(x, y))
apa(cor.test(x, y))
apa(chisq.test(table(a, b)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.