grantmcdermott · GitHub

pkgload::load_all("~/Documents/Projects/tinyplot")
#> ℹ Loading tinyplot
models = list(
    "Model A" = lm(mpg ~ cyl, data = mtcars),
    "Model B" = lm(mpg ~ hp + cyl, data = mtcars)
)
results = lapply(names(models), function(m) {
    data.frame(
        model = m,
        term = names(coef(models[[m]])),
        estimate = coef(models[[m]]),
        setNames(data.frame(confint(models[[m]])), c("conf.low", "conf.high"))
    )
})
results = do.call(rbind, results)
tinyplot(estimate ~ term | model,
         ymin = conf.low, ymax = conf.high,
         data = results,
         type = "pointrange",
         dodge = TRUE,
         theme = "basic")
tinyplot_add(type = "ribbon")

Read the original on github.com ↗