Announcement

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

  • CSDID: Exporting pretrend test results

    I am looking to export the output of the post estimation command
    Code:
    estat pretrend
    after having run the csdid command.

    Is there a command equivalent to
    Code:
    estat event, estore(eq1)
    esttab eq1
    but for estat pretrend? estore does not work for estat pretrend.

    Similarly, estout does produce a result either:
    Code:
    ssc install csdid
    use "https://friosavila.github.io/playingwithstata/drdid/mpdta.dta", clear
    csdid lemp lpop , ivar(countyreal) time(year) gvar(first_treat) method(dripw)
    estat pretrend
    eststo test
    esttab test
    produces the result of the initial estimation, not the result of the pretrend test.

  • #2
    estat pretrend does not produce an "equation" like output
    it will produce r() elements corresponding to the statistics you see in the output. You can save those

    Comment


    • #3
      Thank you very much for your helpful response!

      For the benefit of others reading, this is what I ended up doing:
      Code:
      ssc install csdid
      use "https://friosavila.github.io/playingwithstata/drdid/mpdta.dta", clear
      csdid lemp lpop , ivar(countyreal) time(year) gvar(first_treat) method(dripw)
      estat pretrend
      gen df = "`r(df)'"
      gen chisq = "`r(chi2)'"
      gen pval_chisq = "`r(pchi2)'"

      Comment

      Working...
      X