------------------------------------------------------------------------------------- log: N:\www\econ30331\tbill3.log log type: text opened on: 17 Mar 2010, 09:28:32 . . * set the data for time series . tsset time time variable: time, 1 to 238 delta: 1 unit . . * look for a random walk . * run a regression of tbill3 . * on lagged tbill3 . . . * lag of tbill3 . gen tbill3_1=tbill3[_n-1] (1 missing value generated) . . * run y on ylag regression . reg tbill3 tbill3_1 Source | SS df MS Number of obs = 237 -------------+------------------------------ F( 1, 235) = 2168.19 Model | 2093.52849 1 2093.52849 Prob > F = 0.0000 Residual | 226.907271 235 .965562855 R-squared = 0.9022 -------------+------------------------------ Adj R-squared = 0.9018 Total | 2320.43576 236 9.83235493 Root MSE = .98263 ------------------------------------------------------------------------------ tbill3 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- tbill3_1 | .9461329 .020319 46.56 0.000 .9061022 .9861636 _cons | .267287 .1118341 2.39 0.018 .0469616 .4876124 ------------------------------------------------------------------------------ . test tbill3_=1 ( 1) tbill3_1 = 1 F( 1, 235) = 7.03 Prob > F = 0.0086 . . * now construct the 1st difference . * the lag the 1st difference . . gen dtbill3=tbill3-tbill3_1 (1 missing value generated) . gen dtbill3_1=dtbill3[_n-1] (2 missing values generated) . . . * now run regression of . * difference on lag difference . reg dtbill3 dtbill3_1 Source | SS df MS Number of obs = 236 -------------+------------------------------ F( 1, 234) = 6.76 Model | 6.5658913 1 6.5658913 Prob > F = 0.0099 Residual | 227.126927 234 .970627894 R-squared = 0.0281 -------------+------------------------------ Adj R-squared = 0.0239 Total | 233.692819 235 .994437526 Root MSE = .9852 ------------------------------------------------------------------------------ dtbill3 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- dtbill3_1 | -.1676192 .0644471 -2.60 0.010 -.2945898 -.0406485 _cons | .0279394 .0641498 0.44 0.664 -.0984455 .1543243 ------------------------------------------------------------------------------ . test (dtbill3_1=1) ( 1) dtbill3_1 = 1 F( 1, 234) = 328.24 Prob > F = 0.0000 . . end of do-file . log close log: N:\www\econ30331\tbill3.log log type: text closed on: 17 Mar 2010, 09:28:35 -------------------------------------------------------------------------------------