Thank you for writing such a fantastic package. I like felm so much, and I use it instead of lm.
My coauthor found that p-values reported from felm differ from the ones from Stata when standard errors are clustered. This lead to different number of stars in our regression tables. In the example below, the coefficient estimates, SEs, t-values are all same but p-values for x are very different (0.0016 vs. 0.003).
I looked into this issue, and it seems that the degree of freedom used in p-value calculation are different. felm uses n-p where n is the number of observations and p is the number of regressors including constant and dummy variables, while Stata uses G-1 for clustered samples where G is the number of clusters.
Thank you for writing such a fantastic package. I like felm so much, and I use it instead of lm.
My coauthor found that p-values reported from felm differ from the ones from Stata when standard errors are clustered. This lead to different number of stars in our regression tables. In the example below, the coefficient estimates, SEs, t-values are all same but p-values for x are very different (0.0016 vs. 0.003).
I looked into this issue, and it seems that the degree of freedom used in p-value calculation are different. felm uses n-p where n is the number of observations and p is the number of regressors including constant and dummy variables, while Stata uses G-1 for clustered samples where G is the number of clusters.
You may find a discussion on page 23 of a paper by Cameron and Miller helpful: http://cameron.econ.ucdavis.edu/research/Cameron_Miller_JHR_2015_February.pdf
Stata