make_stats: A super-high level wrapper for building plot ready model...

Description Usage Arguments Examples

Description

Uses 'make_cis()' and 'make_fcs' to assemble a useful data.frame with columns for building 'geom_crossbar' summaries (est, lwr, upr) and simple statistic text summary (label).

Usage

1
2
make_stats(mod, level = 0.95, sig_figs = 2, all = FALSE,
  restore = TRUE, pretty = TRUE)

Arguments

mod

A model object of class 'lm' or 'lmer/lmerTest'.

level

A numeric value between 0 and 1 for confidence level. Default is .95.

sig_figs

A numeric value specifying the number of decimal places in percent change columns in result.

all

Boolean, should all predictor varaibles be returned or just the first predictor (default).

restore

Boolean, shold response variables be transformed back to linear space.

pretty

Boolean, should p-values < 0.001 be represented by '<=0.001'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(mtcars)
mtcars$cyl <- as.factor(mtcars$cyl)
m <- lm(log10(mpg) ~ 0 + cyl, data = mtcars)
make_stats(m)

library(lme4)
data(sleepstudy)
sleepstudy$Days <- as.factor(sleepstudy$Days)
mm <- lmer(Reaction ~ 0 + Days + (1 | Subject), data = sleepstudy)
make_stats(mm)

hemoshear/assayr2 documentation built on Nov. 8, 2019, 6:13 p.m.