Open lmwang9527 opened 7 years ago
The current devel branch includes a gaze
function. It doesn't actually apply dust
, but it does format into the stargazer like format. I haven't worked out significance stars yet, but it has been on my mind.
devtools::install_github("nutterb/pixiedust", ref = "devel")
fit1 <- lm(mpg ~ qsec + am + wt + gear + factor(vs), data = mtcars)
fit2 <- lm(mpg ~ am + wt + gear + factor(vs), data = mtcars)
gaze(fit1, fit2)
gaze(with_qsec = fit1,
without_qsec = fit2)
gaze(fit1, fit2, include_glance = FALSE)
gaze(fit1, fit2, glance_vars = c("AIC", "BIC"))
glance_vars
In academic papers, it is common to show estimation outputs from similar models side-by-side to facilitate comparison.
stargazer
supports this:which produces:
With pixieddust, what I came up is something like this:
It works, but what I don't like is that there is too much messing around (and too little magic) and apparently not scalable (what if I want to add one more model). Can pixiedust add support of this (or is there a better way that I am not aware of)?
BTW, thanks for the great work creating the package!