Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    reghdfe_psacalc.ado

    Switched to within_R2.

    Results are a little closer. xtreg and reghdfe use different algorithms, so a little difference is expected.

    PHP Code:

                     
    ---- Treatment Effect Estimate ----
                 |     
    Estimate           Sqdifference      Bias changes
                 
    |                      from controlled beta    direction
    -------------+----------------------------------------------------------------
    Beta         |       2.88719                 .286            
    Alt
    sol1  |     -69.78153                 5203            
    Alt
    sol2  |                                                
    -------------+----------------------------------------------------------------

                     ---- 
    Inputs from Regressions ----
                 |      
    Coeff.            R-Squared
    -------------+----------------------------------------------------------------
    Constrained  |        1.72188         0.065
    Full         
    |        2.35269         0.575
    -------------+----------------------------------------------------------------

                     ---- 
    Other Inputs ----
    -------------+----------------------------------------------------------------
    R_max        |   1.000
    Delta        
    |   1.000
    Models       
    |   e1 e2
    -------------+---------------------------------------------------------------- 
    Attached Files

    Comment


    • #17
      I added a check to ensure constrained model is first. I could rig it where it just flips the models, but not right now.

      reghdfe_psacalc.ado

      Comment


      • #18
        Thanks so much everyone!

        First to Felix Bittmann for pointing me to -regsensitivity- as an alternative to -psacalc-. To me -regsensitivity- seems already better than the pre-existing -psacalc- in allowing the user to be totally explicit about which 2 models to compare against each other.
        But to me the problem remained that I was not sure how to include a large set of fixed effects: -regsensitivity- seems to run also without specifying any estimation before, so I take it that it uses as input only what I put into its options. However, there seems no option for fixed effects and I get an error when including them in the control set w1 with a ## for interactions, whereas generating a separate dummy for each FE and including all dummies in the control set takes forever...

        Therefore George“s reghdfe_psacalc, which allows both to efficiently use fixed effects via reghdfe and to explicitly specify which 2 models to compare each other is great, and indeed now that I have saved it as ado rather than as do file it does work!

        Now my remaining problem is that some of the betas thus estimated are about 4000 when the coefficients from both models were between 0 and 1.
        While I'm happy to see my hypothesis of a positive beta confirmed, I have to yet understand why the new estimate is that huge and whether that's plausible.
        But that's probably more of an economic than a Stata code issue.

        Best, PM

        Comment


        • #19
          Some shameless self-promotion: As yet another alternative way of conducting sensitivity analysis, you might find our kinkyreg package useful:
          https://www.kripfganz.de/stata/

          Comment


          • #20
            I modified regsensitivity to take reghdfe (reghdfe_sensitivity). It matches the results from regsensitivity for evaluated models. I can't post the ado here (for some reason), so shoot me a message with your email and I'll get it to you.

            Comment

            Working...
            X