apastat {scipub} | R Documentation |
Format simple statistic test results for scientific publication
Description
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.
Usage
apastat(test, roundN = 2, es = c(TRUE, FALSE), ci = c(TRUE, FALSE), var = NULL)
Arguments
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. |
Value
Output formatted statistics
Examples
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")
[Package scipub version 1.2.3 Index]