Here is MWE:
library(pscl)
data("bioChemists", package = "pscl")
fm_pois <- glm(art ~ ., data = bioChemists, family = poisson)
fm_qpois <- glm(art ~ ., data = bioChemists, family = quasipoisson)
fm_nb <- glm.nb(art ~ ., data = bioChemists)
fm_zinb <- zeroinfl(art ~ . | 1, data = bioChemists, dist = "negbin")
library(stargazer)
stargazer(
fm_pois, fm_qpois, fm_nb, fm_zinb
, type = "text"
)
=============================================================================
Dependent variable:
-----------------------------------------------------------
art
Poisson glm: quasipoisson negative zero-inflated
link = log binomial count data
(1) (2) (3) (4)
-----------------------------------------------------------------------------
femWomen -0.225*** -0.225*** -0.216*** -0.216***
(0.055) (0.074) (0.073) (0.073)
marMarried 0.155** 0.155* 0.150* 0.150*
(0.061) (0.083) (0.082) (0.082)
kid5 -0.185*** -0.185*** -0.176*** -0.176***
(0.040) (0.054) (0.053) (0.053)
phd 0.013 0.013 0.015 0.015
(0.026) (0.036) (0.036) (0.036)
ment 0.026*** 0.026*** 0.029*** 0.029***
(0.002) (0.003) (0.003) (0.003)
Constant 0.305*** 0.305** 0.256* 0.256*
(0.103) (0.139) (0.137) (0.139)
-----------------------------------------------------------------------------
Observations 915 915 915 915
Log Likelihood -1,651.056 -1,561.958 -1,560.959
theta 2.264*** (0.271)
Akaike Inf. Crit. 3,314.113 3,135.917
=============================================================================
Note: *p<0.1; **p<0.05; ***p<0.01
I'm looking for multicolumn output like this:
=============================================================================
Dependent variable:
-----------------------------------------------------------
art
Poisson Negative Binomial
Poisson QuasiPoisson NB ZINB
(1) (2) (3) (4)
-----------------------------------------------------------------------------
femWomen -0.225*** -0.225*** -0.216*** -0.216***
(0.055) (0.074) (0.073) (0.073)
marMarried 0.155** 0.155* 0.150* 0.150*
(0.061) (0.083) (0.082) (0.082)
kid5 -0.185*** -0.185*** -0.176*** -0.176***
(0.040) (0.054) (0.053) (0.053)
phd 0.013 0.013 0.015 0.015
(0.026) (0.036) (0.036) (0.036)
ment 0.026*** 0.026*** 0.029*** 0.029***
(0.002) (0.003) (0.003) (0.003)
Constant 0.305*** 0.305** 0.256* 0.256*
(0.103) (0.139) (0.137) (0.139)
-----------------------------------------------------------------------------
Observations 915 915 915 915
Log Likelihood -1,651.056 -1,561.958 -1,560.959
theta 2.264*** (0.271)
Akaike Inf. Crit. 3,314.113 3,135.917
=============================================================================
Note: *p<0.1; **p<0.05; ***p<0.01
- First row should have the word
Poisson
for first two columns andNegative Binomial
for next two columns. - Second row should have columns names like
Poisson
,Quasi Poisson
,Negative Binomial
andZero Inflated Negative Binomial
.
I found this link but could not figured out how to get this one.
stargazer
ortexreg
. You'd need to modify the source to produce your desired output. Unless this is something you're doing all the time, it's probably much easier just to edit the output manually. – Sentinel