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

Problem with recovering groupvar variable #202

Closed fedehuneeus closed 4 years ago

fedehuneeus commented 4 years ago

Hi Sergio, I'm having problems in recovering the groupvar() variable. When I run the simplest version of reghdfe, say "reghdfe wage, absorb(workerid firmid year) groupvar(connected)" the code doesn't generate the variable connected. I'm using the latest reghdfe version and StataMP 15 (64-bit) version. Any suggestion of what might be going on? Thanks!

sergiocorreia commented 4 years ago

Hi Fede,

You are right that something was going on. During the last major rewrite of reghdfe (v3 to v4) I didn't port some of the v3 features (for various reasons).

I just pushed v5.8 that re-enables this feature. I have only tested it lightly, so let me know how it's working on your side. Also, you can always run the old code with the aptly-named "old" option, so a quick sanity check would be

reghdfe ... , groupvar(mob) reghdfe .., groupvar(check) old

And compare that mob and check are the same (or at least represent the same groups.

sergiocorreia commented 4 years ago

Also, do you have in mind a specific reason for this option?

fedehuneeus commented 4 years ago

Thanks Sergio! I just wanted to do some stats on the largest connected set.