I have been advised by my mentor to incorporate pre-trend fixed-effects that are country-specific into my difference-in-differences analysis. Before getting to my question exactly, I hope to give you a sufficient outline of my data and research.
I am intending to assess the impacts of debt relief upon the prevelance of 'bad policy outcomes' amongst recipients of sovereign debt relief, utilising panel data across the period of 1970-2000. Bad policy outcomes come in two forms: moderate and extreme, for a range of variables. I have four variables, that could potentially have 'moderately' or 'extremely' bad outcomes, inflation, real interest rates, trade/GDP ratio, black-market currency premiums. I have eight total dummy variables if the value for a particular variable in a country-year observation is inrange or exceeding a certain value. For example:
Code:
//Now to create moderate inflation dummy generate modbadinflation = 0 if inflation<20 replace modbadinflation = 1 if inrange(inflation, 20, 40) replace modbadinflation = 0 if inflation>40 replace modbadinflation = . if missing(inflation) browse modbadinflation inflation countrycode label variable modbadinflation "Dummy variable =1 if a country's inflation is between 20-40%" //Now to create extreme inflation dummy generate extrbadinflation = 0 if inflation<40 replace extrbadinflation = 1 if inflation>=40 replace extrbadinflation = . if missing(inflation) label variable extrbadinflation "Dummy variable =1 if inflation>40%" browse modbadinflation extrbadinflation inflation countrycode year
Code:
generate LR_anybadpolicy_L1 = 0 + cond(missing(extrbadIRreal), 0, extrbadIRreal*2) + cond(missing(modbadIRreal_L1), 0, modbadIRreal_L1*1) + cond(missing(extrbadinflation), 0, extrbadinflation*2) + cond(missing(modbadinflation_L1), 0, modbadinflation_L1*1) + cond(missing(extrbadtrade), 0, extrbadtrade*2) + cond(missing(modbadtrade_L1), 0, modbadtrade_L1*1) + cond(missing(extrpremium), 0, extrpremium*2) + cond(missing(modpremium_L1), 0, modpremium_L1*1) replace LR_anybadpolicy_L1 = . if trade==. & inflation==. & IRreal==. | trade==. & IRreal==. & blackmarket_premium==. | trade==. & blackmarket_premium==. & inflation==. | IRreal==. & inflation==. & blackmarket_premium==. label variable LR_anybadpolicy_L1 "Low Requirement-Sum of extr and mod bad policy dummies, extreme*2 and moderate*1 removing instances were extreme bad policy dummies in the previous year were =1"
Code:
egen LR_anybadpolicy_L1_mean = mean(LR_anybadpolicy_L1), by(year) replace LR_anybadpolicy_L1_mean = . if missing(LR_anybadpolicy_L1) label variable LR_anybadpolicy_L1_mean "Low Requirement - Mean value for anybadpolicy for all countries each year removing instances were bad policy dummies in the previous year were =1" sort year twoway (line LR_anybadpolicy_L1_mean year if inrange(year, 1980, 2000)) (lfit LR_anybadpolicy_L1_mean year if inrange(year, 1980, 2000)), ytitle(Mean value for LR_anybadpolicy_L1 for all countries) xtitle(Year) xlabel(1980 1985 1990 1995 2000) xline(1990) title(LR_anybadpolicy_L1)
[ATTACH=CONFIG]temp_23547_1627374958068_982[/ATTACH]
What I hope to do is control for pre-existing trends by ‘pre-trend groups’. I have received the following instructions: calculate pre-trends then create a variable called pre-trends that is specific to different groupings by pre-trends, then put it in as a control variable.
As it currently stands, this is my regression equation:
[ATTACH=CONFIG]temp_23548_1627375014337_26[/ATTACH]
Subscript i denotes country and subscript t denotes year. The variable LR_anybadpolicy_L1i,t reflects the number of ‘bad policy outcomes’ country i has in year t. For example, this LR_anybadpolicy_L1i,t dummy will equal one should a country-year observation have any of the eight ‘bad policy dummies (four ‘moderate’ and four ‘extreme’ dummies) equal to one. This is my dependent variable.
On the right-hand side of the equation, firstly is the intercept α. Following this is the β1 coefficient which captures the effect of the dummy variable post1990i,t. This dummy variable will take the value of one following the year 1990 (the uniform treatment year), or a value of zero previous to the year 1990. The β1 coefficient will capture any impact upon the prevalence of ‘bad policies’ that increases in the time dimension bring about. For example, if ‘bad policy outcomes’ decrease following 1990 for whatever reason, it is important this is captured so any effect of an increase in the time dimension can be netted out when considering the impact of debt relief upon the prevelance of ‘bad policy outcomes’.
The β2 coefficient captures the impact of a country receiving a Brady deal upon the prevalence of ‘bad policies’. This will help ascertain whether countries that were recipients of Brady deals have a higher prevelance of ‘bad policy outcomes’ for both pre- and post-1990 time-periods. It is a dummy variable, that will equal one of the country is in the treatment group, zero if it is in the control group.
Following this, β3 is the main coefficient of interest. This captures the impact of receiving a Brady deal on the prevalence of ‘bad policy outcomes’ post-1990 over and above any general decrease in the prevelance of bad policy outcomes post-1990. It is an interaction term between the dummy variable Post-1990 and Brady. Should β3 < 0 (given the hypothesis is that receiving debt relief reduces the prevelance of bad policy outcomes so we would expect β3 to be a negative value) and statistically significant this can be interpretated as providing tentative evidence that face value debt relief does not disincentivise policy reform.
Moving on in the equation to the next term, δt is a year-fixed effect included to capture any variation in trends that may affect the dependent variable such as global business cycle fluctuations. Next is ϒi which captures country-fixed effects; these include unobserved time-invariant characteristics such as geography or natural resource availability. Lastly, is an error term.
I have 26 countries, each with data from (and including) 1980-2000. To control for different pre-trend groups (e.g., some countries having sharply increasing trends, others flat, others decreasing). Then, having created this pre-trend dummy for each of the groups, this would allow the different pre-trend groups to have their own intercepts.
Below is a dataex of my data, I have provided to examples of two of the 26 countries. The first dataex is of Colombia (COL) which started the pre-treatment window (1980-1989) at LR_anybadpolicy_L1 =3 finishing it at =4. The second is Costa Rica (CRI) which started the pre-treatment window at LR_anybadpolicy_L1 =4 finishing it at =3.
Code:
clear input str3 countrycode float(countrynum year) double inflation float(modbadinflation_L1 extrbadinflation LR_anybadpolicy_L1) "COL" 5 1980 26.58064516 1 0 3 "COL" 5 1981 27.52293578 1 0 3 "COL" 5 1982 24.70023981 1 0 3 "COL" 5 1983 19.48717949 0 0 3 "COL" 5 1985 23.97418165 1 0 4 "COL" 5 1986 18.85459279 0 0 3 "COL" 5 1987 23.31038798 1 0 4 "COL" 5 1988 28.14006597 1 0 4 "COL" 5 1989 25.86138614 1 0 4 "COL" 5 1990 29.13782253 1 0 5 "COL" 5 1991 30.34844055 1 0 4 "COL" 5 1992 27.0305636 1 0 3 "COL" 5 1993 22.44132146 1 0 3 "COL" 5 1994 22.84718466 1 0 3 "COL" 5 1995 20.8971286 1 0 3 "COL" 5 1996 20.79708679 1 0 3 "COL" 5 1997 18.46256908 0 0 3 "COL" 5 1998 18.68125654 0 0 3 "COL" 5 1999 10.87339782 0 0 2 "COL" 5 2000 9.222570802 0 0 3 end
Code:
clear input str3 countrycode float(countrynum year) double inflation float(modbadinflation_L1 extrbadinflation LR_anybadpolicy_L1) "CRI" 6 1980 18.14322881 0 0 4 "CRI" 6 1981 37.04218822 1 0 3 "CRI" 6 1982 90.11332882 0 1 4 "CRI" 6 1983 32.62600649 . 0 2 "CRI" 6 1985 15.05917603 0 0 3 "CRI" 6 1986 11.83042108 0 0 3 "CRI" 6 1987 16.84519374 0 0 3 "CRI" 6 1988 20.82984575 1 0 4 "CRI" 6 1989 16.50832921 0 0 3 "CRI" 6 1990 19.04613599 0 0 3 "CRI" 6 1991 28.70750241 1 0 5 "CRI" 6 1992 21.78890182 1 0 1 "CRI" 6 1993 9.780984243 0 0 1 "CRI" 6 1994 13.53534656 0 0 1 "CRI" 6 1995 23.18545074 1 0 2 "CRI" 6 1996 17.51173477 0 0 0 "CRI" 6 1997 13.24842746 0 0 0 "CRI" 6 1998 11.65882654 0 0 0 "CRI" 6 1999 10.04512158 0 0 0 "CRI" 6 2000 10.96228165 0 0 0 end
Thank you to anyone who takes time to engage with this somewhat lengthy question,
Many thanks
0 Response to Difference-in-differences analysis, pre-trend fixed-effects by group
Post a Comment