Comments (2)
Hi Nils,
This is caused by what I believe is a subtle bug within Stata. I'll give an example with the -hdfe- command (available from this repo, as described in the readme.md)
* Create your dataset
input x y i j
0 1 1 1
1 1 1 2
1 2 2 2
1 3 3 3
1 3 3 2
end
* Apply within transformation
hdfe y x, a(i j) clear
* Regress; notice that both X and cons are dropped
reg y x
* However, Stata still counts X as not dropped when computing df_m!!!
di e(df_m)
* The reason is due to numerical accuracy:
* The part of regress that decides whether to drop or not uses more less accuracy
* Than the part of regress that computes e(df_m)
su x
* If you run the hdfe command with the tol(1e-10) option, you will see that now e(df_m)==0
* Also, in the case below e(df_m) IS zero (just to make sure that they do exclude dropped variables when computing df_m)
gen z = 0
reg y z
di e(df_m)
I'm not entirely sure about how to proceed. One option would be to override the e(df_m) from regress, thus fixing their bug manually.
from reghdfe.
By the way, I added the above solution to the latest build. Not the most "kosher" solution, but is probably the best for now.
from reghdfe.
Related Issues (20)
- Option of absorbing continuous variables HOT 2
- Multiple imputation for covariates
- [BUG] 'reghdfe, version' does not return the version installed
- Is there a way to suppress constant? HOT 1
- "Last estimates not found" for avplot, cprplot
- Store F_absorb
- Recalculate residual before estimating RMSE
- [BUG] HOT 2
- Problems with compiling lftools.mlib for Stata17
- Problem with boottest
- reghdfe omitting dummies that reg keeps HOT 2
- [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
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.