I am trying to use the stargazer
package to output my regression results. I performed my regressions using felm
from the lfe
package. The stargazer
output tables shows everything properly except the F statistic values which remain blank. The issue does not arise with the lm
results.
What is the reason and how can I get F statistic values for my felm
regressions to appear in the stargazer
output?
I know I can manually add a line to show the F-values but I would prefer a more automatic approach if it's possible.
Below is a sample code using data provided here
library(foreign)
temp_dat <- read.dta("http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/test_data.dta")
temp_lm <- lm(y ~ x, temp_dat)
temp_felm <- felm(y ~ x, temp_dat)
library(stargazer)
stargazer(temp_lm, temp_felm, type = "text")
Output:
====================================================================
Dependent variable:
------------------------------------
y
OLS felm
(1) (2)
--------------------------------------------------------------------
x 1.035*** 1.035***
(0.029) (0.029)
Constant 0.030 0.030
(0.028) (0.028)
--------------------------------------------------------------------
Observations 5,000 5,000
R2 0.208 0.208
Adjusted R2 0.208 0.208
Residual Std. Error (df = 4998) 2.005 2.005
F Statistic 1,310.740*** (df = 1; 4998)
====================================================================
Note: *p<0.1; **p<0.05; ***p<0.01