Announcement

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

  • Store estimates from CSDID2 and compare coefficients from separate equation

    Hi statalist,

    I am stuck with using command "suest" after using "csdid2".

    What I am doing is heterogeneity analysis by gender after estimating the effect of policy on schooling separately.
    I tried the "suest"

    Code:
    csdid2 schooling if female==1, time(year) gvar(group) cluster(villagecode) method(dripw)
    estat  simple,  estore(female)
    csdid2 schooling if female==0, time(year) gvar(group) cluster(villagecode) method(dripw)
    estat  simple,  estore(male)
    
    suest female male
    However, the message popped up

    Code:
    "estimation sample of the model saved under female could not be restored"
    Does anyone have any idea of how to deal with this problem using CSDID2?

    Or, any alternative suggestion to compare two different group-time ATTs between men and women?

    Thank you so much in advance!




  • #2
    hi Shisho
    Unfortunately, you cant. csdid2 (and csdid) do not really generate information as other commands do. And with SUEST, you really need the capacity to have commands that creates scores or residuals. csdid does something like this, when you request saving the RIF functions, whereas csdid2 keeps them in mata only.
    In other words, you test for the equality of the coefficients using suest.

    Alternatives?
    I was planning to add an option to csdid2 to do something like this, but have not gone around to implement it. So, your only option is to do it with csdid
    find the example here
    https://github.com/friosavila/stpack...dd_csdid.ipynb

    HTH

    Comment


    • #3
      Dear FernandoRios,

      Thank you so much for your suggestion.
      This way works for me.

      I have one follow-up question about the results.
      Since csdid2 does not do the work for the equality test from separate equations as csdid does, so that I report the simple ATT from csdid2 and add the equality test results to it.
      Then, I realized that the ATTs are "slightly" different. My understanding csdid and csdid2 do the same job, but csdid2 is way faster.
      I just switch the command to csdid and this happened.
      This may not be so problematic, but I wonder what makes this happen. Am I missing something?

      Comment


      • #4
        Mmm 1) please make sure you have the latest in both
        2) can you share more details? (Specially the attgts)
        3) info on the model itself
        I May even need access to some data to see if I can replicate the problem
        thank you

        Comment

        Working...
        X