Announcement

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

  • Interrupted time series model construction

    Hello everyone,

    I need your help in creating the following equation using interrupted time series: ln(tradet) = b0 + b1 Trendt + b2 WarLevelt + b3 WarRatet + et, where:
    • Trend is a counter for each year of the series
    • War Level is a binary variable that equals 0 for each year before the outbreak of war, and 1 for each year during and after the war
    • War Trend is a counter of years equal to 0 for the years before the outbreak of war and then 1,2,3…from the war outbreak until the end of the time series
    For example, let's assume that I have one pair of countries, id=100200, and the war between them took place in 2003. I want to create an interrupted times series model
    which will display the effect of the war on trade for 10 years before and 10 years after the occurrence of the war.

    I have read other examples of using the itsa command but I have not understood how I can use it to build this model. Which variables should I create in advance? Should I also include an interaction term? In my original dataset, I have 172 country pairs with different war dates.

    I would appreciate any insights on where to start. Should I create a war dummy variable or all of the above variables are directly generated by the itsa command?

    Thank you very much for any help!

  • #2
    This article taught me to do it.

    When I get up and make my coffee in 30 minutes, I will give an example on a real dataset.

    Comment


    • #3
      This as a first pass is an example of ITSA, and it is one I do not recommend.
      Code:
      clear *
      u "http://fmwww.bc.edu/repec/bocode/s/scul_basque.dta", clear
      
      qui xtset
      local lbl: value label `r(panelvar)'
      
      loc unit ="Basque Country (Pais Vasco)":`lbl'
      
      
      loc int_time = 1975
      
      qui xtset
      cls
      
      g treat = cond(`r(panelvar)'==`unit' & `r(timevar)' >= `int_time',1,0)
      
      labvars treat gdp "Terrorism" "GDP per Capita"
      
      label define regionname 1 "Andalucia" 2 "Aragon" 3 "Asturias" 4 "Baleares" 5 "Basque" 6 "Canarias" 7 "Cantabria" 8 "Castilla Y Leon" 9 "Castilla-La Mancha" 10 "Cataluna" 11 "Comunidad Valenciana" 12 "Extremadura" 13 "Galicia" 14 "Madrid" 15 "Murcia" 16 "Navarra" 17 "Rioja" 18 "Spain (Espana)", replace
      drop if id==18
      
      cls
      itsa gdp, treatid(`unit') trperiod(`int_time') lag(1) figure(xlabel(1955(5)2000)) posttrend replace
      The reason I do not recommend it is because it implies that all other 16 Spanish autonomous communities are good counterfactuals for the Basque Country, a claim which I know to be untrue, to put it politely. My advice to you is to use synthetic controls.

      Comment

      Working...
      X