sergiocorreia / reghdfe

Linear, IV and GMM Regressions With Any Number of Fixed Effects
http://scorreia.com/software/reghdfe/
MIT License
219 stars 57 forks source link

[BUG] The factor varlist feature is not working in some instance of reghdfe #268

Open Lu-Yunzhi opened 1 year ago

Lu-Yunzhi commented 1 year ago

Bug report

Please complete the following information:

Behavior

. reghdfe y ib2008.year##c.mX, absorb(cityid year)

the sample of year = 2016 is dropped

Steps to reproduce the problem

set obs 10
gen id = _n
expand 2016 - 2008 + 1
bys id: gen year = 2008 + _n - 1
gen X = rnormal()
gen y = X*0.5 + rnormal()
bys id (year): egen mX = mean(X)
reghdfe y ib2008.year#c.mX, absorb(id year)