Skip to content

Commit

Permalink
Fix bug where reghdfe fails with -summ- option and factor variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorreia committed Nov 10, 2017
1 parent ee2ee17 commit 9dbf176
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/reghdfe.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! version 4.4.11 26oct2017
*! version 4.4.12 10nov2017

program reghdfe, eclass
* Intercept old+version
Expand Down Expand Up @@ -471,6 +471,10 @@ program Stats
mata: st_local("cvars", invtokens(HDFE.cvars))
loc full_varlist `varlist' `cvars'

* quick workaround b/c -tabstat- does not support factor variables
fvrevar `full_varlist', list
loc full_varlist `r(varlist)'

qui tabstat `full_varlist' if `touse' `weight' , stat(`stats') col(stat) save
matrix reghdfe_statsmatrix = r(StatTotal)
end

0 comments on commit 9dbf176

Please sign in to comment.