Announcement

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

  • difference in differences with repeated cross-sections / pseudo-panel

    hi!

    I am a novice when it comes to DiD models so I will take all the support you can provide.

    I have a model in which the dependent variable is an individual's well-being.
    I have two waves of measurement.
    My continuous treatment variable- the percentage of foreigners- is at the regional level.

    Initially, I went with the following code:

    Code:
    xtset region
    xtreg y c.treat##i.post, fe vce(cluster region)
    However, after reading this presentation https://www.stata.com/meeting/german...2_Luedicke.pdf, I thought that I should also try the following code:

    Code:
    areg y  i.year c.treat, absorb(region) vce(cluster region)
    The results are distinct and I do not understand why. As a result, I dont know which one of the two is the correct spelling of the model.

    I need to also mention that I am using Stata 15, so I cannot use didregress & the like.
    Last edited by aneta zahei; 31 Jan 2024, 10:08.

  • #2
    First, the default in xtreg is random effects, so you need to add the -fe- option.

    xtset region
    xtreg y c.treat##i.post, fe vce(cluster region)
    This is equivalent to

    Code:
    xtreg y c.treat i.post c.treat#i.post, fe
    where the interaction is your treatment effect. So your second regression lacks the interaction term. Usually, you will just want to name this interaction term "treatment", i.e., =1 if an individual in a wave is subject to the treatment and zero otherwise.


    Code:
    gen treatment= c.treat#1.post
    areg y i.year treatment, absorb(region) vce(cluster region)
    The "c.treat" can be dropped as it is collinear with your region effects.

    Comment


    • #3
      thank you, andrew!

      I have a couple more questions:

      a. Is it correct to call this model a generalized DID? how about a TWFE?

      b. How would one go about testing the parallel trends assumption given that the treatment is continuous?

      Comment


      • #4
        Originally posted by aneta zahei View Post
        Is it correct to call this model a generalized DID? how about a TWFE?
        Both are correct.

        You can graph and/or reproduce the test calculated by estat ptrends in Stata 17+. See the procedure here: https://www.stata.com/manuals/tedidr...estimation.pdf

        Comment


        • #5


          You can graph and/or reproduce the test calculated by estat ptrends in Stata 17+. See the procedure here: https://www.stata.com/manuals/tedidr...estimation.pdf
          i am running stata 15 so I need to find a different way to do that.

          Last edited by aneta zahei; 01 Feb 2024, 13:41.

          Comment


          • #6
            I said you can replicate the test by running the augmented regression, then use the test command. See the "Methods and formulas" section. Or use twoway to graph. If you find all this difficult, find a way to get hold of Stata 17 or Stata 18.

            Comment


            • #7
              Dear Aneta,

              I am seeking a way to create a pseudo panel structure from a cross-sectional data. So, do you mind sharing your code here with me? Alternatively, I would appreciate your inputs if any Andrew. Thank you.

              Comment

              Working...
              X