Announcement

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

  • Difference-in-Differences per country

    Dear Stata community,

    I'm working with a panel data set of countries in Stata where I want to test how a market reform impacted certain economic variables. I would like to run a difference-in-differences estimation for each country in the panel data (14 countries).

    Currently, I use the following command:

    Code:
     diff econ_var, t(type) p(period)
    where type refers to whether the observation is in the treatment or control group (binary) and period whether the observation is in the treatment or control period (binary). However, this command runs the estimation on all panels.

    Is there a way to use a command that performs the difference-in-differences estimation for each of my country in the panel data? Of course, I'd also be open to use the "built-in" commands instead of the user-written diff command.

    Many thanks!

    Nick

  • #2
    I've not used diff (Stata Journal) at all and have not studied its documentation.

    But the way to run it separately on one country may be just to select observations with if.

    How you combine results of inferences formally or informally from several countries I have no idea.

    Comment


    • #3
      Thanks! Would it be possible to use the standard
      Code:
      reg econ_var period type did, r
      command and somehow loop it through all countries?

      Comment


      • #4
        That looks legal. I think you need some views from many economists (and others) who use this kind of model.

        Comment

        Working...
        X