-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Incorrect fixed effects with cluster()
#51
Comments
FYI it's different each run and I'm not sure what's causing the sort order of the saved FEs to change. This also causes |
mcaceresb
changed the title
[BUG] Incorrect order of fixed effects with
[BUG] Incorrect fixed effects with Nov 19, 2023
cluster()
cluster()
@sergiocorreia Actually they're just wrong, sorry for the multiple messages: clear
sysuse auto, clear
ivreghdfe price (mpg = turn), absorb(a1=rep78) cluster(rep78)
ivreghdfe price (mpg = turn), absorb(a2=rep78) cluster(rep78)
reghdfe mpg turn, absorb(rep78) resid
predict mpghat, xbd
reghdfe price mpghat, absorb(a3=rep78) cluster(rep78)
gen diff1 = reldif(a1, a3)
gen diff2 = reldif(a2, a3)
sum diff?
|
For some reason, the problem is solved when pre-sorting by the fixed effects before the run:
But need to delve a bit more into why the sorting gets broken. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gives
The text was updated successfully, but these errors were encountered: