5

我做了这个模型选择表:

lm_mtcars <- lm(mpg ~ drat + hp + wt, mtcars)

library(MuMIn)
mod_sel_lm_mtcars <- (mod.sel(lm_mtcars))

mod_sel_lm_mtcars

Model selection table 
          (Intrc)  drat       hp     wt df  logLik AICc delta weight
lm_mtcars   29.39 1.615 -0.03223 -3.228  5 -73.366  159     0      1

我可以stargazer将其转换为乳胶表:

library(stargazer)
stargazer(mod_sel_lm_mtcars)

如何打印Coulombe Et Al 2011, p288, Table 2stargazer中的变量名称。

所以:

  1. df 应重命名为 k(斜体)
  2. delta 应该重命名为 [latex symbol \Delta] AICc
  3. 重量应重命名为 w[下标 i]
4

1 回答 1

5

You can use the covariate.labels argument. for this (As you didn't make clear which rows you wanted to keep in the output, I assumed you wanted them all, but you can change that as well using the keep argument.)

stargazer(mod_sel_lm_mtcars, 
      covariate.labels = 
        c("(Intercept)", "drat", "hp", "$w_{i}$",
          "\\textit{k}", "logLik", "AICc", "\\Delta AICc"))
于 2016-10-30T03:35:29.753 回答