I want the same stars for significancies in regression output in stargazer as in the \"normal output\".
I produce data
library(\"stargazer\"); library(\"
It may be a minor issue but Richard's answer is actually not entirely correct -
his stargazer output does not report any standard errors nor potential significance stars for the variable x
.
Also when reporting only a single model in stargazer manual coefficients
, se
, p
and t
values have to be provided in a list. Otherwise stargazer will report an empty list.
The (slightly) corrected example:
test <- coeftest(model, vcov = vcovHC(model, type="HC3"))
ses <- list(test[, 2])
pvals <- list(test[, 4])
stargazer(model, type="text", p=pvals, se=ses)
Output:
=======================================================================
Dependent variable:
-----------------------------------------
Daily added investors
negative
binomial
-----------------------------------------------------------------------
log(lag_raised_amount + 1) -0.466***
(0.124)
lag_target1 -0.661***
(0.134)
Constant -3.480**
(1.290)
-----------------------------------------------------------------------
Observations 6,513
Log Likelihood -8,834
theta 1.840*** (0.081)
Akaike Inf. Crit. 17,924
=======================================================================
Note: + p<0.1; * p<0.05; ** p<0.01; *** p<0.001