I am trying to run an IV including firm and county fixed effects, but the number of firms is too large for it to work with ivreg and dummy variables.
I have used xtivreg and xtivreg2, but these both require me to set a panel. Since each annual observation has both a firm and county, the only way I can think to do this is to group firm and county and to use this grouping as the unit id. But then, when I run xtivreg with this, it will be running a regression with firm-county interaction dummies instead of firm and county dummies separately.
Does anyone know of a package that allows me to get around this issue? The only way I have found so far is to manually run the first and second stage. For both stages I use areg with an i.county dummy and firm absorbed, but I am unsure if the results of this are accurate, specifically in regards to the standard errors. Any help would be appreciated, thanks!
I have used xtivreg and xtivreg2, but these both require me to set a panel. Since each annual observation has both a firm and county, the only way I can think to do this is to group firm and county and to use this grouping as the unit id. But then, when I run xtivreg with this, it will be running a regression with firm-county interaction dummies instead of firm and county dummies separately.
Does anyone know of a package that allows me to get around this issue? The only way I have found so far is to manually run the first and second stage. For both stages I use areg with an i.county dummy and firm absorbed, but I am unsure if the results of this are accurate, specifically in regards to the standard errors. Any help would be appreciated, thanks!
Comment