Comments (3)
The twicerobust
option of the help file sheds some light about why this doesn't work.
AFAIK, ivregress with wmatrix will run two regressions (I forgot how exactly robust and wmatrix played together, but the helpfile links the PDF, and I recall I had some extra references about it somewhere).
The problem is that reghdfe only runs once, and to make reghdfe fully compatible with running two regressions (or more, for iterated gmm) will require changing the code of ivregress (which I can't do) in order to recompute the means in the middle.
It might be possible for you to compute the GMM by hand (by using hdfe.ado to do the demeaning, then running the first step, then recomputing, and so on), but sadly there is no automated way to do it.
from reghdfe.
Ok, yes. I see the issue.
See: http://www.stata.com/manuals13/rivregress.pdf (pg 7-10, 13-15)
To be clear with or without wmatrix() ivregress with two-step gmm runs two regressions. (see pg. 13)
- The first is the standard 2SLS IV regression and the residuals from this first step are taken to calculate the weighting matrix (either unadjusted, robust, clustered, etc) for...
- The gmm version of the IV regression which is reported with errors that are subject to the vce() command.
If the wmatrix() option is not specified then it is using the residuals from the first step assuming homoskedasticity.
You say that that reghdfe only runs once, but then how is it implementing both steps of two-step efficient gmm? I do not see any reason to be recomputing between the first and second step outlined above. Please let me know if I misunderstood. Thank you for your response.
from reghdfe.
It is not implementing both steps.
From the source code, what reghdfe does is:
- If the estimator is gmm2s, replace the "vce(something)" option with "wmatrix(something) vce(unadjusted)" .
- If
twicerobust
is specified, it will omit the vce() part, which as mentioned in the ivregress help file, is equivalent to letting it be the same as wmatrix().
Now, this is not strictly correct, as if ivregress is running two regressions we also want to run two demeanings (one for every regression).
On the other hand, the error introduced by demeaning twice appeared to be trivial, and one of the authors of ivreg2 suggested that there might still be better to include this option and have it "half baked" that to exclude it.
Let me know if you find that the difference in results wrt doing it the long way is significant. In my checks it wasn't but if I find cases where it is misleading I might remove it.
from reghdfe.
Related Issues (20)
- [BUG] Warning: variance matrix is nonsymmetric or highly singular. HOT 1
- Questions about the redundant FE reported and yhat predicted after running reghdfe
- [BUG] The factor varlist feature is not working in some instance of reghdfe
- Could we implement -margins- after running -reghdfe-?
- How to romove the "_cons" fixed effect in "estfe"[BUG] HOT 2
- hdfe HOT 2
- Different standard errors in reghdfe 3.2.7 versus reghdfe 5.7.3
- [BUG] Version 6.12.3 of reghdfe appears to break ppmlhdfe HOT 2
- [BUG] error occurred while loading reghdfe.ado HOT 2
- Incorrect "parentheses unbalanced" error HOT 5
- [BUG] Missing `strok` option with `nopartialout` and `varlist_is_touse` HOT 1
- [BUG] HOT 2
- Predict residual outside e(sample)
- Fail to replicate the Example: OLS regression in reghdfe_programming help file
- [BUG] Summarize Breaks and Other Mata Load Error
- [BUG] Ensure vcov matrix is symmetric to avoid numerical precision issues HOT 1
- [BUG] Neither `noregress` nor `keepmata` store `HDFE.solution`
- [BUG] Version 6.12.0 breaks ivreghdfe with "last estimates not found" HOT 6
- [BUG] Failure to generate parallel processes on remote server HOT 3
- [BUG] _assert_abort(): 3498 error partialling out; missing values found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reghdfe.