------------------------------------------------------------------------------------------------------- log: n:\www\econ30331\taylor_rule.log log type: text opened on: 4 Nov 2008, 13:26:51 . . * index the data for time series use . tsset index time variable: index, 1 to 154 delta: 1 unit . . . . . *generate ln(gdp) . gen gdprl=ln(gdp_r) . label var gdprl "ln of real dgp" . . *get lag of fed fund rate . * will use later . gen ffr1=ffr[_n-1] (1 missing value generated) . label var ffr1 "lag of fed fund rate" . . *get lag of gdprl . * will use later . gen gdprl1=gdprl[_n-1] (1 missing value generated) . label var gdprl1 "lag of gdprl" . . . * generate 1 year inflation . * by taking differene between current . * and a 4 period lag . * report in percent . gen gdp_def4=gdp_def[_n-4] (4 missing values generated) . gen inflation=100*(ln(gdp_def)-ln(gdp_def4)) (4 missing values generated) . label var inflation "one-year inflation rate in percent" . . . * reduce the data to the post-Greenspan years . keep if year>=1987 (68 observations deleted) . . * run a regression of gdprl on a trend . reg gdprl index Source | SS df MS Number of obs = 86 -------------+------------------------------ F( 1, 84) =10808.47 Model | 2.91287537 1 2.91287537 Prob > F = 0.0000 Residual | .022637942 84 .000269499 R-squared = 0.9923 -------------+------------------------------ Adj R-squared = 0.9922 Total | 2.93551331 85 .034535451 Root MSE = .01642 ------------------------------------------------------------------------------ gdprl | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- index | .0074137 .0000713 103.96 0.000 .0072719 .0075555 _cons | 8.253915 .0081458 1013.28 0.000 8.237716 8.270113 ------------------------------------------------------------------------------ . * output residuals (output gap) . predict gdprl_res, residuals . . * scale gap in percent by . * multiplying by 100 . gen gap=100*gdprl_res . . * run taylor rule regression . reg ffr inflation gap Source | SS df MS Number of obs = 86 -------------+------------------------------ F( 2, 83) = 19.78 Model | 125.327921 2 62.6639604 Prob > F = 0.0000 Residual | 262.987021 83 3.16851832 R-squared = 0.3227 -------------+------------------------------ Adj R-squared = 0.3064 Total | 388.314942 85 4.56841108 Root MSE = 1.78 ------------------------------------------------------------------------------ ffr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- inflation | 1.120342 .2535686 4.42 0.000 .6160043 1.62468 gap | .5149623 .1183526 4.35 0.000 .2795636 .7503609 _cons | 2.06164 .6535725 3.15 0.002 .7617106 3.361569 ------------------------------------------------------------------------------ . estat dwatson Durbin-Watson d-statistic( 3, 86) = .0693391 . * test the taylor rule parameters using . * an f-test . test (gap=0.5) (inflation=1.5)(_cons=1.0) ( 1) gap = .5 ( 2) inflation = 1.5 ( 3) _cons = 1 F( 3, 83) = 0.89 Prob > F = 0.4480 . . * correct for AR(1) in errors; . . prais ffr inflation gap, corc twostep Iteration 0: rho = 0.0000 Iteration 1: rho = 0.9643 Cochrane-Orcutt AR(1) regression -- twostep estimates Source | SS df MS Number of obs = 85 -------------+------------------------------ F( 2, 82) = 11.23 Model | 4.47345645 2 2.23672822 Prob > F = 0.0000 Residual | 16.3318273 82 .199168626 R-squared = 0.2150 -------------+------------------------------ Adj R-squared = 0.1959 Total | 20.8052838 84 .24768195 Root MSE = .44628 ------------------------------------------------------------------------------ ffr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- inflation | .7559721 .2229863 3.39 0.001 .3123813 1.199563 gap | .3110593 .0930983 3.34 0.001 .1258571 .4962616 _cons | 1.878748 1.450736 1.30 0.199 -1.007228 4.764725 -------------+---------------------------------------------------------------- rho | .9642664 ------------------------------------------------------------------------------ Durbin-Watson statistic (original) 0.069339 Durbin-Watson statistic (transformed) 0.926851 . test (gap=0.5) (inflation=1.5)(_cons=1.0) ( 1) gap = .5 ( 2) inflation = 1.5 ( 3) _cons = 1 F( 3, 82) = 5.15 Prob > F = 0.0026 . . . end of do-file . gen gap1=gap[_n-1] (1 missing value generated) . gen ffr1=ffr[_n-] ffr1 already defined r(110); . gen gap1=gap[_n-1] gap1 already defined r(110); . gen dgap=gap-gap1 (1 missing value generated) . gen dffr=ffr-ffr1 . gen inf1=inflation[_n-1] (1 missing value generated) . gen dinf=inflation-inf1 (1 missing value generated) . reg dffr dinf dgap Source | SS df MS Number of obs = 85 -------------+------------------------------ F( 2, 82) = 10.79 Model | 4.34733648 2 2.17366824 Prob > F = 0.0001 Residual | 16.5175133 82 .201433089 R-squared = 0.2084 -------------+------------------------------ Adj R-squared = 0.1890 Total | 20.8648498 84 .248391069 Root MSE = .44881 ------------------------------------------------------------------------------ dffr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- dinf | .7438243 .2221156 3.35 0.001 .3019657 1.185683 dgap | .3023183 .0927441 3.26 0.002 .1178206 .4868159 _cons | -.0396178 .0487203 -0.81 0.418 -.1365379 .0573023 ------------------------------------------------------------------------------ . estat dwatson Durbin-Watson d-statistic( 3, 85) = .9333669 . reg ffr inf1 gap1 Source | SS df MS Number of obs = 85 -------------+------------------------------ F( 2, 82) = 20.17 Model | 127.376824 2 63.6884119 Prob > F = 0.0000 Residual | 258.960655 82 3.15805677 R-squared = 0.3297 -------------+------------------------------ Adj R-squared = 0.3134 Total | 386.337479 84 4.5992557 Root MSE = 1.7771 ------------------------------------------------------------------------------ ffr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- inf1 | 1.104947 .2535116 4.36 0.000 .6006317 1.609263 gap1 | .538482 .1189918 4.53 0.000 .3017694 .7751945 _cons | 2.066679 .6547507 3.16 0.002 .7641713 3.369187 ------------------------------------------------------------------------------ . prais ffr inf1 gap1 Iteration 0: rho = 0.0000 Iteration 1: rho = 0.9652 Iteration 2: rho = 0.9711 Iteration 3: rho = 0.9712 Iteration 4: rho = 0.9712 Prais-Winsten AR(1) regression -- iterated estimates Source | SS df MS Number of obs = 85 -------------+------------------------------ F( 2, 82) = 19.59 Model | 7.33663828 2 3.66831914 Prob > F = 0.0000 Residual | 15.355613 82 .187263574 R-squared = 0.3233 -------------+------------------------------ Adj R-squared = 0.3068 Total | 22.6922513 84 .270145849 Root MSE = .43274 ------------------------------------------------------------------------------ ffr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- inf1 | .7209421 .2169219 3.32 0.001 .2894153 1.152469 gap1 | .3931855 .0903221 4.35 0.000 .2135061 .5728648 _cons | 3.022637 1.326052 2.28 0.025 .3846976 5.660576 -------------+---------------------------------------------------------------- rho | .9711861 ------------------------------------------------------------------------------ Durbin-Watson statistic (original) 0.063674 Durbin-Watson statistic (transformed) 0.996617 . clear . log close log: n:\www\econ30331\taylor_rule.log log type: text closed on: 4 Nov 2008, 14:00:32 -----------------------------------------------------------------------------------------------------