`sjPlot::tab_model()` summary statistics reordering and splitting of R-squared and R-squared-adjusted

风流意气都作罢 提交于 2020-02-25 06:06:31

问题


I'm using sjPlot::tab_model() to create output tables of regressions. (Reproducible example below).

Two quick questions about summary statistics below a table:

  1. Is there some way that I can report R^2 and R^2 adjusted on separate lines?
  2. How can I reorder summary statistics such as $R^2$, AIC, etc?
library("sjPlot")

lm1 <- lm(mpg ~ cyl, mtcars)
lm2 <- lm(mpg ~ hp, mtcars)
lm3 <- lm(mpg ~ cyl + hp, mtcars)


tab_model(lm1, lm2, lm3,
          show.ci = 0,
          show.aic = 1,
          show.loglik = 1,
          show.fstat = 1,
          show.r2 = 1)

This is the actual output I'm currently getting:

This is my desired output:

来源:https://stackoverflow.com/questions/57505167/sjplottab-model-summary-statistics-reordering-and-splitting-of-r-squared-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!