Announcement

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

  • Difference-in-Difference - Multiple Time Periods and Treatment Length

    Hello,

    For a personal project, I will be assessing the impact of economic sanctions on numerous macroeconomic variables (GDP Growth, Imports, Exports, etc.)

    I created a database of all of the sanctions events that have taken place since 1960. This data place includes the sanction time length, relevant macroeconomic variables of involved countries, and bilateral trade strength. My idea is to use difference-in-difference methodology in order to assess the impact of the sanction treatment on an economic variable. In my thoughts, I was hoping to analyze the macroeconomic trend five years before the event, the time during the event, and then the effects of 5 years following the event.

    A complicated issue that I am facing is that the effect of treatment is not standardized. There are many economic sanctions events that have taken place over the past 60 with varying time lengths. A solution that I thought of is doing a case-by-case basis in which I evaluate the effects of just a single sanctions event against a control of all other non-sanctioned countries in the world. But upon receiving the outputs of these individual DiD cases, I do not know how I would combine them to form any reasonable conclusions.

    I'm new to Stata so if someone has an idea as to how I can accomplish this idea, I would greatly appreciate it. On the other hand, if someone has another methodology to analyze the effects of economic sanctions on a macroeconomic variable, I would love to hear!

    Thank you,

    Ryan T.

  • #2
    From your description, you do not have adequate data. You will also need some "controls" who never experienced sanctions. To the extent that those controls can be otherwise similar to the sanctioned countries, that is for the best.

    In any case, you cannot do this with a classical DID analysis: that requires that the sanctions be applied in the same way, at the same time to all the sanctioned countries. The world is nothing like that. You can, instead, do a generalized DID analysis. For a nice introduction to how that works, take a look at https://www.ipr.northwestern.edu/wor.../Day%204.2.pdf.

    There are other issues here that you also need to find a way to deal with. I question whether it is sensible to just look at the outcomes 5 years before and after. Sanctions are often introduced gradually and then ratcheted up. Moreover, even when imposed abruptly, there may be some lag period before the impact is felt. Similarly, when sanctions are lifted, there may be some lag period before their effects dissipate, at least as measured in standard outcome variables.

    Another issue to grapple with is whether it is even reasonable to just consider "sanctions" as a coherent entity. The sanctions programs that have been used vary considerably in intensity, breadth of application, types of restrictions imposed, etc. To just lump all of this together into a single dichotomy of sanctioned or not seems a gross oversimplification.

    Caveat: I am not an economist, nor a historian nor political scientist. I am offering you my concerns in the preceding 2 paragraphs only as a reasonably well educated and informed observer of the world. Feel free to disregard them if a more expert view of the situation tells you they are overblown.

    Comment


    • #3
      I discussed with several professors and we decided that it would be best to run a fixed effects model with a time trend to capture the effect of economic sanctions on a macroeconomic variable. Testing the effects of economic sanctions faces serious endogeneity concerns, but I'm look to analyze the correlation of a shock of sanctions and the response of the economic variable.

      My data is arranged as panel data such that it explains the year, country, macroeconomic variable, and then 4 dummy sanctions (threat of sanction, limited sanction, moderate sanction, and extensive section.

      I will be using the xtreg with fe command in order to control for country specific variables. However I need to include time trend variable in order account for shocks that happen to all countries (ex. 2008 financial crisis). I did some digging through other threads, and from what I found out, all I need to include is the "year" variable into my regression, correct?

      Would you also recommend including a time trend for specific countries using the c.year##i.country command? Or should I only be including one trend?

      Thanks for the input!

      Comment


      • #4
        I did some digging through other threads, and from what I found out, all I need to include is the "year" variable into my regression, correct?
        Almost correct. If you include year in the model, you will be incorporating a continuous linear time trend into the model. That certainly will not capture shocks like the 2008 financial crisis (or, rather, will do so at the price of severely distorting the actual persistent linear trends that also may occur). To do that you need to incorporate i.year in the model so that each year's idiosyncratic shocks can be adjusted for.

        Would you also recommend including a time trend for specific countries using the c.year##i.country command?
        That is an economic modeling judgment that I cannot help you with; it is not a statistical question. There are many economists and financial people who are active here, and I hope one of them will jump in on this. What I can say in this regard is that if you go this route, you should clone the year variable, and use one of them for the discrete i.year adjustment that is discussed in the preceding paragraph, and the other one for this country-specific linear trend. If you have both i.year and c.year in the same model and then try to use -margins-, Stata will get confused.

        Comment


        • #5
          Thank you very much for the help, Clyde.

          I tested out the -i.country##c.year- command which resulted in a messy output since I'm using 199 countries over 52 time periods. However the output for my independent variables (sanctions) made sense and confirmed my previous tests without the the use of -i.country##c.year-.

          xtreg logimports i.year i.countryid##c.year threat limited moderate extensive, fe cluster(countryid)

          I received a number of warnings saying country (1-199) eliminated due to multicollinearity.

          Comment


          • #6
            I received a number of warnings saying country (1-199) eliminated due to multicollinearity.
            Expected, and not a problem. Those i.country variables are colinear with the fixed effects; in fact they are the fixed effects redundantly. If the aesthetics of this bothers you, you can rerun the analysis as:

            Code:
            xtreg logimports i.year c. year i.countryid#c.year threat limited moderate extensive, fe cluster(countryid)
            You will get exactly the same results, but without the warnings, or the rows of "(omitted)" in the output. This is one circumstance where the use of the single # operator may be preferable to the ## operator.

            Comment


            • #7
              Would anyone be able to answer the question concerning if I should include a time trend for specific countries using the c.year##i.country command?

              My argument is yes in order to account for unexpected events significant to a specific country that is not covered by the overall time trend (wars, government changes, terrorism, etc.) When running my regressions by including this factor, my SE's were more robust and I was receiving results that agreed better with the literature that I've read.

              Comment


              • #8
                Another issue is that, because I have such a large dataset, natural there is lots of data missing for specific years.

                I arranged all of this data in excel. Should I leave any values that are missing as just a "." like I've seen in other datasets? How do I tell Stata to skip over these values?

                What I've done in the past is remove years in which at least some of the explanatory data (independent or dependent variables) are missing so that only data with the full amount is left over? Is this a possibility or would this key my data?

                Thanks for the help.

                EDIT: I tried the -ipolate- function

                I wanted to fill in missing values of exports using imports as a yvar. So what I did is ipolate exports imports, gen(exports1)
                Last edited by Ryan Taylor; 22 Nov 2018, 04:56.

                Comment

                Working...
                X