summaryh: Generate formatted results and effect sizes for manuscripts

View source: R/summaryh.R

summaryhR Documentation

Generate formatted results and effect sizes for manuscripts

Description

After fitting models, use summaryh() in place of summary() to get APA (American Psychological Association) formatted output that also includes effect size estimates for each effect (r effect size). Currently supports lm, glm, aov, anova, lmer, lme, t-test, chisq.test, and cor.test. Unfortunately, this function won't write your entire results section for you (yet).

Usage

summaryh(model, decimal = 2, showTable = FALSE, tbl_es = FALSE, es = 'r', ...)

Arguments

model

a fitted model

decimal

round output to decimal places

showTable

show results in table format (returns list)

tbl_es

show other effect sizes computed using es function

es

effect size measure to report (for now, it's always r but options will be introduced later)

...

further arguments passed to or from other methods

Value

A datatable or a list of datatables (if showTable = TRUE or tbl_es = TRUE)

Note

Cohen's d: 0.20 (small), 0.50 (medium), .80 (large) (Cohen, 1992)
correlation r: .10 (small), .30 (medium), .50 (large)
R-squared: R2: .02 (small), .13 (medium), .26 (large)

Author(s)

Hause Lin

Examples

summaryh(lm(mpg ~ qsec, mtcars))
summaryh(aov(mpg ~ gear, mtcars))
summaryh(cor.test(mtcars$mpg, mtcars$gear), tbl_es = TRUE)

hauselin/hausekeep documentation built on Feb. 3, 2023, 3:09 p.m.