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:
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
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)
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
Comment