I'm using texreg
to generate output tables of regressions. I'd like to include statistics such as AIC, BIC and HQIC as Goodness of Fit statistics.
Replicatible example below
library(texreg)
library(tidyverse)
mtcars
model1 <- lm(mpg ~ disp, data = mtcars)
model2 <- lm(mpg ~ disp + hp, data = mtcars)
screenreg(list(model1, model2))
Give me this:
=================================
Model 1 Model 2
---------------------------------
(Intercept) 29.60 *** 30.74 ***
(1.23) (1.33)
disp -0.04 *** -0.03 ***
(0.00) (0.01)
hp -0.02
(0.01)
---------------------------------
R^2 0.72 0.75
Adj. R^2 0.71 0.73
Num. obs. 32 32
RMSE 3.25 3.13
=================================
*** p < 0.001, ** p < 0.01, * p < 0.05
Which is great, but in addition to R^2, RMSE, etc, I'd also like AIC, BIC, and if possible HQIC.
Edit:
In answer to a comment below, it's true that the answer doesn't need to come from texreg
, but I am looking for an answer that produces the sort of formatted html tables that look ready for submission to academic journals, eg stargazer
, texreg
, sjPlot
.