Announcement

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

  • Multiple year/country survey data & Diff-in-Diff

    Dear Statalisters,

    I am not an expert on survey data and I have a doubt about my estimation strategy. I am estimating a DiD model using Eurobarometers as the main datasets. These are yearly surveys with repeated questions asked to individuals living in different European countries.
    The model that I am estimating is the following:
    Code:
    reghdfe y did controls i.y, absorb(c) vce(cluster c)
    where the output variable, y, and the controls are individual-level variables but the DiD estimator, did, takes the value 1 when country c observes the treatment in year y and 0, otherwise. The time span is 15 years.

    Is this model correct? Should I be using a hierarchical model instead?

    Thank you very much.
    Rubén

  • #2
    Well, the specific command you show is seriously wrong. The variable y appears first as a continuous outcome variable and also as a discrete predictor variable. Did you mean i.year at the end of the variable list? You do not explain what variable c is: if it is the country variable it makes sense in the context of your problem. Otherwise, not. You might consider using -absorb(c year)- and omitting i.year from the model if you do not actually need the coefficients of the year indicators to accomplish your goals.

    -reghdfe- is a hierarchical model. The code you have written, with the corrections noted in the previous paragraph, is a two-level model, with individual responses nested within countries.

    Please note that it is the norm in this community to use our given and surname as our username, to promote collegiality and professionalism. The Forum software does not enable you to edit your username once your profile has been established, but you can message the forum administrator (CONTACT US button bottom right) and ask him to make the change for you. Thank you in advance.

    Comment


    • #3
      Dear Clyde,

      Thank you for your response. Please, also accept my apologies about the absence of my surname. For some reason, my computer logged me in with an old username which, obviously, does not comply with the norms. Normally, I showed my full name.

      As about your answer. Yes, you are right with all your observations on the model. The module that I was referring to is the following:

      Code:
      reghdfe depvar did controls i.year, absorb(country) vce(cluster country)

      And thank also for clarifying that reghdfe is a hierarchical model. That is very useful. Rubén Ruiz-Rufino

      Comment

      Working...
      X