' This program generates figure 4.6 in the CPB publication "Roads to recovery". ' To run this code, place the Excel file with the data into the same folder as this program (and make it the current directory) ' After completion, figure 4.6 can be found as "_fig46" workfile RTR a 1960 2001 read(t=xls,b2,s=lpheks) RTR_Productivity_Data.xls 58 ' Load labour productivity data from the Conference Board read(t=xls,b2,s=dumbank) RTR_Productivity_Data.xls 192 ' Load banking crisis dummies used by Cerra and Saxena (2008) !ylags = 4 ' Lags on labour productivity !dlags = 4 ' Lags on banking crisis dummy ' List of countries for which we have labour productivity datae %lijst1 = "ARG AUS AUT BEL BGD BGR BRA BRB CAN CHE CHL COL CRI CYP CZE DEU DNK" %lijst2 = "ECU ESP FIN FRA GBR GRC HKG HUN IRL ISL ISR ITA JAM JPN KOR " %lijst3 = "LCA LKA LTU LUX LVA MEX MLT MYS NLD NOR NZL PER POL PRT ROM RUS" %lijst4 = "SGP SVK SVN SWE THA TTO TUR URY USA VEN" ' ********************* Code to generate estimates and bootstrapped 90% confidence interval pool _poel {%lijst1} {%lijst2} {%lijst3} {%lijst4} _poel.ls(cx=f) ?_GRRT_WB ?_GRRT_WB(-1 to -!ylags) ?_BANKCRISIS_CAPSYST(0 to -!dlags) scalar zcof1 = _poel.@coefs(1) ' This is C for !ny = 1 to !ylags scalar zgrrt{!ny} = _poel.@coefs(!ny+1) next for !nd = 0 to !dlags scalar zbc{!nd} = _poel.@coefs(2+!ylags+!nd) next vector(30) zzBC = 0 ' Create banking crisis dummy series for IRF vector(30) zzGR = 0 ' Create growth series for IRF vector(30) zzLEV = 0 ' Create level series for IRF zzBC(9) = 1 for !forper=9 to 30 for !ny = 1 to !ylags zzGR(!forper) = zzGR(!forper) + zgrrt{!ny}*zzGR(!forper -{!ny}) next for !nd = 0 to !dlags zzGR(!forper) = zzGR(!forper) + zbc{!nd}*zzBC(!forper -{!nd}) next zzLEV(!forper) = zzLEV(!forper-1) + zzGR(!forper) next ' Resampling for Monte Carlo bounds _poel.genr ?_res = 0 ' Set up residual series for each country, even if they are not in the regression. Otherwise Eviews goes nuts. _poel.makeresids(n=groepnaam) ?_res ' Retrieve residuals from estimation _poel.genr ?_fitval = ?_grrt_wb - ?_res ' Generate fitted values. Fitted values for series not included are identical to the original series. matrix(30,1000) zzzBSIRF matrix(30,1000) zzzBSIRFa ' Count length of strings to enable looping scalar aaaa = @len(%lijst1) scalar aaab = @len(%lijst2) scalar aaac = @len(%lijst3) scalar aaad = @len(%lijst4) for !iter1=1 to 1000 for !itz=1 to aaaa step 4 %cname = @mid(%lijst1, !itz, 3) {%cname}_res.resample(fixna) next for !itz=1 to aaab step 4 %cname = @mid(%lijst2, !itz, 3) {%cname}_res.resample(fixna) next for !itz=1 to aaac step 4 %cname = @mid(%lijst3, !itz, 3) {%cname}_res.resample(fixna) next for !itz=1 to aaad step 4 %cname = @mid(%lijst4, !itz, 3) {%cname}_res.resample(fixna) next _poel.genr ?_newval = ?_fitval - ?_res_b ' Generate artificial dataset ' Run regression with new dataset _poel.ls(cx=f) ?_newval ?_newval(-1 to -!ylags) ?_BANKCRISIS_CAPSYST(0 to -!dlags) scalar zcof1new = _poel.@coefs(1) ' This is C for !ny = 1 to !ylags scalar zgrrt{!ny}new = _poel.@coefs(!ny+1) next for !nd = 0 to !dlags scalar zbc{!nd}new = _poel.@coefs(2+!ylags+!nd) next vector(30) zzBCnew = 0 ' Create banking crisis dummy series for IRF vector(30) zzGRnew = 0 ' Create growth series for IRF vector(30) zzLEVnew = 0 ' Create level series for IRF zzBCnew(9) = 1 for !forper=9 to 30 for !ny = 1 to !ylags zzGRnew(!forper) = zzGRnew(!forper) + zgrrt{!ny}new*zzGRnew(!forper -{!ny}) next for !nd = 0 to !dlags zzGRnew(!forper) = zzGRnew(!forper) + zbc{!nd}new*zzBCnew(!forper -{!nd}) next zzLEVnew(!forper) = zzLEVnew(!forper-1) + zzGRnew(!forper) next colplace(zzzBSIRF, zzLEVnew, !iter1) next for !iter2=1 to 30 rowvector period = @rowextract(zzzBSIRF,!iter2) rowvector zperiod = @sort(period) rowplace(zzzBSIRFa,zperiod,!iter2) next vector lower = @columnextract(zzzBSIRFa, 51) vector upper = @columnextract(zzzBSIRFa, 950) vector centre = 0.5*(upper-lower) vector lower_c = zzLEV - centre vector upper_c = zzLEV + centre matrix(30,3) _poel_IRFs colplace(_poel_IRFs, zzLEV, 1) colplace(_poel_IRFs, lower_c, 2) colplace(_poel_IRFs, upper_c, 3) freeze(mode=overwrite,_fig46) _poel_IRFs.line