Git Product home page Git Product logo

Comments (3)

mcaceresb avatar mcaceresb commented on August 10, 2024

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 xbd and resid to change, if they are used.

from ivreghdfe.

mcaceresb avatar mcaceresb commented on August 10, 2024

@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?
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       diff1 |         74    93.00652    119.3723          0   300.4831
       diff2 |         74    89.67282    112.5629          0   285.0808

from ivreghdfe.

sergiocorreia avatar sergiocorreia commented on August 10, 2024

For some reason, the problem is solved when pre-sorting by the fixed effects before the run:

sysuse auto, clear
sort rep78

ivreghdfe price turn, absorb(a1=rep78) cluster(rep78)
ivreghdfe price turn, absorb(a2=rep78) cluster(rep78)
reghdfe price turn, absorb(a3=rep78)  cluster(rep78)
replace a3 = a3 + _b[_cons]

gen diff1 = reldif(a1, a3)
gen diff2 = reldif(a2, a3)
sum diff?

But need to delve a bit more into why the sorting gets broken.

from ivreghdfe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.