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
#> r=.41, t(4991)=32.06, 95% CI=[.39,.44], p<.001#> t(4855.74)=0.83, p=.41, d=0.02#> N=4991, F(2,4988)=517.49, R2=.17, adj. R2=.17, p<.001#> N=4991, b=0.18, t(4988)=32.16, p<.001