Announcement

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

  • Difference in differences Method

    Hello
    I am working on unbalanced panel data for 2 year , in 1st year observation are 26734 and second year it's 27579, after doing an one to one merging total number of observation are 53549. In which I am running diff command for difference in differences. Dependent variable is shareCO1X and treatment variable is mgnrega1 and time variable is time ( i named my variable as time).
    I am facing problem of treatment observations under Before column is coming 0 as it can be observed from table. I want to know why it is coming like that or where am i doing a mistake please guide me.
    Attached Files

  • #2
    Neeraj:
    the usual advice is to -codebook- your data to see what went wrong.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks Carlo for your prompt reply, here I am sending you the codebook results for those variables that I used in the command of diff. I don't think so anything is wrong with data.
      Attached Files

      Comment


      • #4
        Neeraj:
        my guess is that before treatment sets in, all patients are controls (and so you have 0 treated patients).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Yes I don't have treated patients in before treatment then how to generate treated patients in before treatment.

          Comment


          • #6
            Neeraj:
            why don't you try:
            Code:
            xtset id time
            xtreg shareCO1X i.treated##i.time, fe
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thanks for your suggestions. I got the mistake and trying to solve it because the problem is in my data.

              Comment


              • #8
                Dear all,
                I would like to know how to get confidence intervals in the output of diff command.
                Kindly,

                Abou Sarambé

                Comment

                Working...
                X