apastat | R Documentation |
The apastat
function summarizes statistic test
results scientific publication.
This currently will take stats::t.test
,
stats::cor.test
, or stats::lm
results as input.
The output is intended to be included as
in-text parenthetical statistics in publication.
apastat(test, roundN = 2, es = c(TRUE, FALSE), ci = c(TRUE, FALSE), var = NULL)
test |
The |
roundN |
The number of decimal places to round all output to (default=2). |
es |
Include effect side (Cohen's d for t-test or 2-level factor lm variable), default to TRUE. |
ci |
Include confidence interval of estimate, default to TRUE. |
var |
Only for lm object, select name of variable to summarize (default=NULL), if NULL, will summarize overall model fit. |
Output formatted statistics
apastat(stats::cor.test(psydat$Age, psydat$Height))
apastat(stats::t.test(Height ~ Sex, data = psydat))
apastat(stats::lm(data = psydat, Height ~ Age + Sex))
apastat(stats::lm(data = psydat, Height ~ Age + Sex), var = "Age")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.