Announcement

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

  • Did2s R-square

    The general did2s command goes not report R-square, how do I get it?




  • #2
    You an estimate the "first - stage" of the model itself. And get it from there.
    F

    Comment


    • #3
      Dear @FernandoRios,

      Thank you for this helpful tip.

      Does it mean that to calculate the R2 using did2s I simply can turn:

      Code:
      did2s output if subsample==1 [aw=_weights], first_stage(i.country_id i.year ///
      control1 control2 control3 control4 control5) ///
      second_stage(treat) treatment(treat) cluster(country_id)
      Into:

      Code:
      reghdfe output  ///
      control1 control2 control3 control4 control5 ///
      i.country_id i.year if subsample==1 [aw=_weights], vce(cluster country_id)
      And the R squared of the redhdfe will be the same R2 of the first did2s?

      Am I calculating the first stage correctly?

      Alternatively, could I use something like?
      Code:
      *predict outputp if e(sample) 
      *corr output outputp if e(sample) 
      *di r(rho)^2
      The value I get using the reghdfe and corr is different though...

      Thank you so much!

      Best,
      Cat


      Comment

      Working...
      X