-------------------------------------------------------------------------------------------
log: /Users/baum/doc/Courses 2007-2008/EC32701S/327dfglsArch.smcl
log type: smcl
opened on: 27 Feb 2008, 08:53:10
. // 327dfglsArch cfb 8226
. webuse lutkepohl, clear
(Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993 Table E.1)
. tsset
time variable: qtr, 1960q1 to 1982q4
delta: 1 quarter
. foreach v in lconsumption lincome linvestment {
2. dfgls `v'
3. kpss `v', qs
4. }
DF-GLS for lconsumption Number of obs = 80
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -1.562 -3.610 -2.763 -2.489
10 -1.772 -3.610 -2.798 -2.523
9 -1.311 -3.610 -2.832 -2.555
8 -1.352 -3.610 -2.865 -2.587
7 -1.625 -3.610 -2.898 -2.617
6 -1.516 -3.610 -2.929 -2.646
5 -1.745 -3.610 -2.958 -2.674
4 -1.625 -3.610 -2.986 -2.699
3 -1.602 -3.610 -3.012 -2.723
2 -0.977 -3.610 -3.035 -2.744
1 -0.460 -3.610 -3.055 -2.762
Opt Lag (Ng-Perron seq t) = 10 with RMSE .009138
Min SC = -9.058841 at lag 3 with RMSE .0096676
Min MAIC = -9.127003 at lag 3 with RMSE .0096676
KPSS test for lconsumption
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: lconsumption is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .831
1 .664
2 .335
3 .232
DF-GLS for lincome Number of obs = 80
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -1.210 -3.610 -2.763 -2.489
10 -1.115 -3.610 -2.798 -2.523
9 -0.955 -3.610 -2.832 -2.555
8 -0.984 -3.610 -2.865 -2.587
7 -1.499 -3.610 -2.898 -2.617
6 -1.535 -3.610 -2.929 -2.646
5 -1.449 -3.610 -2.958 -2.674
4 -1.300 -3.610 -2.986 -2.699
3 -1.199 -3.610 -3.012 -2.723
2 -0.772 -3.610 -3.035 -2.744
1 -0.485 -3.610 -3.055 -2.762
Opt Lag (Ng-Perron seq t) = 8 with RMSE .0108315
Min SC = -8.769153 at lag 1 with RMSE .0118036
Min MAIC = -8.850639 at lag 3 with RMSE .0112812
KPSS test for lincome
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: lincome is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .941
1 .753
2 .381
3 .266
DF-GLS for linvestment Number of obs = 80
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -2.925 -3.610 -2.763 -2.489
10 -2.671 -3.610 -2.798 -2.523
9 -2.766 -3.610 -2.832 -2.555
8 -3.259 -3.610 -2.865 -2.587
7 -3.536 -3.610 -2.898 -2.617
6 -3.115 -3.610 -2.929 -2.646
5 -3.054 -3.610 -2.958 -2.674
4 -3.016 -3.610 -2.986 -2.699
3 -2.071 -3.610 -3.012 -2.723
2 -1.675 -3.610 -3.035 -2.744
1 -1.752 -3.610 -3.055 -2.762
Opt Lag (Ng-Perron seq t) = 7 with RMSE .0388771
Min SC = -6.169137 at lag 4 with RMSE .0398949
Min MAIC = -6.136371 at lag 1 with RMSE .0440319
KPSS test for linvestment
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: linvestment is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .363
1 .294
2 .152
3 .107
. foreach v in lconsumption lincome linvestment {
2. dfgls D.`v'
3. kpss D.`v', qs
4. }
DF-GLS for D.lconsumption Number of obs = 79
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -1.725 -3.614 -2.761 -2.487
10 -1.799 -3.614 -2.796 -2.521
9 -1.578 -3.614 -2.831 -2.554
8 -2.318 -3.614 -2.865 -2.586
7 -2.443 -3.614 -2.898 -2.617
6 -2.140 -3.614 -2.929 -2.647
5 -2.323 -3.614 -2.959 -2.675
4 -2.204 -3.614 -2.987 -2.701
3 -2.503 -3.614 -3.013 -2.724
2 -2.727 -3.614 -3.037 -2.746
1 -4.546 -3.614 -3.058 -2.765
Opt Lag (Ng-Perron seq t) = 9 with RMSE .0092478
Min SC = -9.088757 at lag 2 with RMSE .0097807
Min MAIC = -8.755024 at lag 9 with RMSE .0092478
KPSS test for D.lconsumption
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: D.lconsumption is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .232
1 .237
2 .243
3 .202
DF-GLS for D.lincome Number of obs = 79
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -2.124 -3.614 -2.761 -2.487
10 -2.223 -3.614 -2.796 -2.521
9 -2.473 -3.614 -2.831 -2.554
8 -2.923 -3.614 -2.865 -2.586
7 -3.057 -3.614 -2.898 -2.617
6 -2.483 -3.614 -2.929 -2.647
5 -2.516 -3.614 -2.959 -2.675
4 -2.677 -3.614 -2.987 -2.701
3 -3.056 -3.614 -3.013 -2.724
2 -3.477 -3.614 -3.037 -2.746
1 -5.194 -3.614 -3.058 -2.765
Opt Lag (Ng-Perron seq t) = 7 with RMSE .0107856
Min SC = -8.81231 at lag 1 with RMSE .0115454
Min MAIC = -8.265601 at lag 4 with RMSE .0112039
KPSS test for D.lincome
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: D.lincome is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .189
1 .186
2 .17
3 .148
DF-GLS for D.linvestment Number of obs = 79
Maxlag = 11 chosen by Schwert criterion
DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
------------------------------------------------------------------------------
11 -2.343 -3.614 -2.761 -2.487
10 -2.251 -3.614 -2.796 -2.521
9 -2.560 -3.614 -2.831 -2.554
8 -2.699 -3.614 -2.865 -2.586
7 -2.404 -3.614 -2.898 -2.617
6 -2.316 -3.614 -2.929 -2.647
5 -2.442 -3.614 -2.959 -2.675
4 -2.606 -3.614 -2.987 -2.701
3 -2.825 -3.614 -3.013 -2.724
2 -4.736 -3.614 -3.037 -2.746
1 -7.190 -3.614 -3.058 -2.765
Opt Lag (Ng-Perron seq t) = 3 with RMSE .0383252
Min SC = -6.302057 at lag 3 with RMSE .0383252
Min MAIC = -5.451721 at lag 4 with RMSE .0383195
KPSS test for D.linvestment
Maxlag = 3 chosen by Schwert criterion
Autocovariances weighted by Quadratic Spectral kernel
Critical values for H0: D.linvestment is trend stationary
10%: 0.119 5% : 0.146 2.5%: 0.176 1% : 0.216
Lag order Test statistic
0 .0437
1 .0459
2 .0585
3 .0627
.
. webuse wpi1,clear
. g t2 = t^2
. label var t Quarter
. tsline D.ln_wpi, ti(delta log WPI)
. graph export a0.pdf, replace
(file /Users/baum/doc/Courses 2007-2008/EC32701S/a0.pdf written in PDF format)
.
. arch D.ln_wpi t t2, arch(1/3)
(setting optimization to BHHH)
Iteration 0: log likelihood = 377.38222
Iteration 1: log likelihood = 381.81567
Iteration 2: log likelihood = 382.98108
Iteration 3: log likelihood = 383.39867
Iteration 4: log likelihood = 383.68964
(switching optimization to BFGS)
Iteration 5: log likelihood = 383.84711
Iteration 6: log likelihood = 384.43755
BFGS stepping has contracted, resetting BFGS Hessian (0)
Iteration 7: log likelihood = 384.73254
Iteration 8: log likelihood = 384.73521 (backed up)
Iteration 9: log likelihood = 384.7392 (backed up)
Iteration 10: log likelihood = 384.7632 (backed up)
Iteration 11: log likelihood = 384.76321 (backed up)
Iteration 12: log likelihood = 384.77229 (backed up)
Iteration 13: log likelihood = 384.77288 (backed up)
BFGS stepping has contracted, resetting BFGS Hessian (1)
Iteration 14: log likelihood = 384.78546
(switching optimization to BHHH)
Iteration 15: log likelihood = 384.78546 (backed up)
Iteration 16: log likelihood = 384.78571
Iteration 17: log likelihood = 384.78708
Iteration 18: log likelihood = 384.78773
Iteration 19: log likelihood = 384.78832
(switching optimization to BFGS)
Iteration 20: log likelihood = 384.78873
Iteration 21: log likelihood = 384.79108
BFGS stepping has contracted, resetting BFGS Hessian (2)
Iteration 22: log likelihood = 384.79126
Iteration 23: log likelihood = 384.79126 (backed up)
Iteration 24: log likelihood = 384.79128 (backed up)
Iteration 25: log likelihood = 384.79129 (backed up)
Iteration 26: log likelihood = 384.7913 (backed up)
Iteration 27: log likelihood = 384.79131 (backed up)
Iteration 28: log likelihood = 384.79131
Iteration 29: log likelihood = 384.79131
(switching optimization to BHHH)
Iteration 30: log likelihood = 384.79131
Iteration 31: log likelihood = 384.79131
Iteration 32: log likelihood = 384.79131
Iteration 33: log likelihood = 384.79131
Iteration 34: log likelihood = 384.79131
ARCH family regression
Sample: 1960q2 - 1990q4 Number of obs = 123
Distribution: Gaussian Wald chi2(2) = 13.72
Log likelihood = 384.7913 Prob > chi2 = 0.0010
------------------------------------------------------------------------------
| OPG
D.ln_wpi | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ln_wpi |
t | .0004825 .0001345 3.59 0.000 .0002189 .000746
t2 | -3.27e-06 9.98e-07 -3.27 0.001 -5.22e-06 -1.31e-06
_cons | -.0041354 .0037849 -1.09 0.275 -.0115537 .0032828
-------------+----------------------------------------------------------------
ARCH |
arch |
L1. | .3154317 .1925627 1.64 0.101 -.0619842 .6928476
L2. | .3066475 .1721862 1.78 0.075 -.0308312 .6441262
L3. | .0495785 .113572 0.44 0.662 -.1730185 .2721756
_cons | .0000521 7.49e-06 6.96 0.000 .0000374 .0000667
------------------------------------------------------------------------------
. predict double a1, var
. tsline a1, ti(ARCH(3) conditional variance)
. graph export a1.pdf, replace
(file /Users/baum/doc/Courses 2007-2008/EC32701S/a1.pdf written in PDF format)
.
. arch D.ln_wpi t t2, arch(1/2) garch(1)
(setting optimization to BHHH)
Iteration 0: log likelihood = 375.13972
Iteration 1: log likelihood = 382.16516
Iteration 2: log likelihood = 384.41492
Iteration 3: log likelihood = 384.52589
Iteration 4: log likelihood = 384.57617
(switching optimization to BFGS)
Iteration 5: log likelihood = 384.60365
BFGS stepping has contracted, resetting BFGS Hessian (0)
Iteration 6: log likelihood = 384.70874
Iteration 7: log likelihood = 384.71096 (backed up)
Iteration 8: log likelihood = 384.7446 (backed up)
Iteration 9: log likelihood = 384.76367 (backed up)
Iteration 10: log likelihood = 384.76373 (backed up)
Iteration 11: log likelihood = 384.76472 (backed up)
Iteration 12: log likelihood = 384.77457
Iteration 13: log likelihood = 384.77481
BFGS stepping has contracted, resetting BFGS Hessian (1)
Iteration 14: log likelihood = 384.78136
(switching optimization to BHHH)
Iteration 15: log likelihood = 384.78137 (backed up)
Iteration 16: log likelihood = 384.78276
Iteration 17: log likelihood = 384.7832
Iteration 18: log likelihood = 384.78343
Iteration 19: log likelihood = 384.78361
(switching optimization to BFGS)
Iteration 20: log likelihood = 384.78376
BFGS stepping has contracted, resetting BFGS Hessian (2)
Iteration 21: log likelihood = 384.78422
Iteration 22: log likelihood = 384.78424 (backed up)
Iteration 23: log likelihood = 384.78441 (backed up)
Iteration 24: log likelihood = 384.78456 (backed up)
Iteration 25: log likelihood = 384.78456 (backed up)
Iteration 26: log likelihood = 384.78459 (backed up)
Iteration 27: log likelihood = 384.7846
BFGS stepping has contracted, resetting BFGS Hessian (3)
Iteration 28: log likelihood = 384.78462
Iteration 29: log likelihood = 384.78462 (backed up)
(switching optimization to BHHH)
Iteration 30: log likelihood = 384.78462 (backed up)
Iteration 31: log likelihood = 384.78463
Iteration 32: log likelihood = 384.78464
Iteration 33: log likelihood = 384.78464
Iteration 34: log likelihood = 384.78464
(switching optimization to BFGS)
BFGS stepping has contracted, resetting BFGS Hessian (4)
Iteration 35: log likelihood = 384.78464
Iteration 36: log likelihood = 384.78464 (backed up)
Iteration 37: log likelihood = 384.78464 (backed up)
Iteration 38: log likelihood = 384.78464 (backed up)
Iteration 39: log likelihood = 384.78464 (backed up)
Iteration 40: log likelihood = 384.78464
ARCH family regression
Sample: 1960q2 - 1990q4 Number of obs = 123
Distribution: Gaussian Wald chi2(2) = 13.35
Log likelihood = 384.7846 Prob > chi2 = 0.0013
------------------------------------------------------------------------------
| OPG
D.ln_wpi | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ln_wpi |
t | .0004775 .0001353 3.53 0.000 .0002124 .0007426
t2 | -3.23e-06 1.00e-06 -3.21 0.001 -5.20e-06 -1.26e-06
_cons | -.0040632 .0037915 -1.07 0.284 -.0114945 .0033681
-------------+----------------------------------------------------------------
ARCH |
arch |
L1. | .3194582 .1908861 1.67 0.094 -.0546717 .6935881
L2. | .2770551 .2799849 0.99 0.322 -.2717052 .8258153
garch |
L1. | .1141558 .3592885 0.32 0.751 -.5900366 .8183483
_cons | .0000462 .0000213 2.17 0.030 4.40e-06 .0000879
------------------------------------------------------------------------------
. predict double a2, var
. tsline a2, ti(GARCH(2,1) conditional variance)
. graph export a2.pdf, replace
(file /Users/baum/doc/Courses 2007-2008/EC32701S/a2.pdf written in PDF format)
.
. arch D.ln_wpi, ar(1) ma(1 4) arch(1) garch(1) archm dist(t)
(setting optimization to BHHH)
Iteration 0: log likelihood = 386.74057
Iteration 1: log likelihood = 393.74963
Iteration 2: log likelihood = 399.76967
Iteration 3: log likelihood = 402.51128
Iteration 4: log likelihood = 403.5754
(switching optimization to BFGS)
BFGS stepping has contracted, resetting BFGS Hessian (0)
Iteration 5: log likelihood = 403.85795
BFGS stepping has contracted, resetting BFGS Hessian (1)
Iteration 6: log likelihood = 403.84861 (backed up)
Iteration 7: log likelihood = 403.84861 (backed up)
Iteration 8: log likelihood = 403.85025 (backed up)
Iteration 9: log likelihood = 403.88769 (backed up)
Iteration 10: log likelihood = 403.90941 (backed up)
Iteration 11: log likelihood = 403.91141 (backed up)
Iteration 12: log likelihood = 403.91176 (backed up)
Iteration 13: log likelihood = 403.91539
Iteration 14: log likelihood = 403.92268
(switching optimization to BHHH)
Iteration 15: log likelihood = 403.92411
Iteration 16: log likelihood = 403.95777
Iteration 17: log likelihood = 403.97032
Iteration 18: log likelihood = 403.97836
Iteration 19: log likelihood = 403.98108
(switching optimization to BFGS)
BFGS stepping has contracted, resetting BFGS Hessian (2)
Iteration 20: log likelihood = 403.98076 (backed up)
Iteration 21: log likelihood = 403.98077 (backed up)
Iteration 22: log likelihood = 403.98077 (backed up)
Iteration 23: log likelihood = 403.98083 (backed up)
BFGS stepping has contracted, resetting BFGS Hessian (3)
Iteration 24: log likelihood = 403.98069 (backed up)
Iteration 25: log likelihood = 403.9807 (backed up)
Iteration 26: log likelihood = 403.9807 (backed up)
Iteration 27: log likelihood = 403.98076 (backed up)
Iteration 28: log likelihood = 403.98084 (backed up)
Iteration 29: log likelihood = 403.98086
(switching optimization to BHHH)
Iteration 30: log likelihood = 403.98086
Iteration 31: log likelihood = 403.98073 (backed up)
Iteration 32: log likelihood = 403.98079
Iteration 33: log likelihood = 403.98087
Iteration 34: log likelihood = 403.98089
(switching optimization to BFGS)
BFGS stepping has contracted, resetting BFGS Hessian (4)
Iteration 35: log likelihood = 403.98087 (backed up)
Iteration 36: log likelihood = 403.98087 (backed up)
Iteration 37: log likelihood = 403.98087 (backed up)
BFGS stepping has contracted, resetting BFGS Hessian (5)
Iteration 38: log likelihood = 403.98086 (backed up)
Iteration 39: log likelihood = 403.98086 (backed up)
BFGS stepping has contracted, resetting BFGS Hessian (6)
Iteration 40: log likelihood = 403.98086 (backed up)
Iteration 41: log likelihood = 403.98086 (backed up)
Iteration 42: log likelihood = 403.98086 (backed up)
Iteration 43: log likelihood = 403.98087 (backed up)
Iteration 44: log likelihood = 403.98089
(switching optimization to BHHH)
Iteration 45: log likelihood = 403.9809
Iteration 46: log likelihood = 403.98083 (backed up)
Iteration 47: log likelihood = 403.98084
Iteration 48: log likelihood = 403.98082 (backed up)
Iteration 49: log likelihood = 403.98083
ARCH family regression -- ARMA disturbances
Sample: 1960q2 - 1990q4 Number of obs = 123
Distribution: t Wald chi2(4) = 139.83
Log likelihood = 403.9809 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| OPG
D.ln_wpi | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ln_wpi |
_cons | .0058501 .0031999 1.83 0.068 -.0004216 .0121218
-------------+----------------------------------------------------------------
ARCHM |
sigma2 | 7.598189 29.54178 0.26 0.797 -50.30265 65.49902
-------------+----------------------------------------------------------------
ARMA |
ar |
L1. | .7563752 .1061037 7.13 0.000 .5484157 .9643346
ma |
L1. | -.311195 .1452882 -2.14 0.032 -.5959546 -.0264353
L4. | .2325188 .1026414 2.27 0.023 .0313453 .4336923
-------------+----------------------------------------------------------------
ARCH |
arch |
L1. | .2675287 .1704147 1.57 0.116 -.0664779 .6015353
garch |
L1. | .6933457 .1541304 4.50 0.000 .3912556 .9954358
_cons | 8.24e-06 7.75e-06 1.06 0.288 -6.95e-06 .0000234
-------------+----------------------------------------------------------------
/lndfm2 | 1.437649 .6495162 2.21 0.027 .1646208 2.710677
-------------+----------------------------------------------------------------
df | 6.210785 2.734973 3.178946 17.03946
------------------------------------------------------------------------------
. predict double a3, var
. tsline a3, ti("GARCH(1,1)-M conditional variance, t errors")
. graph export a3.pdf, replace
(file /Users/baum/doc/Courses 2007-2008/EC32701S/a3.pdf written in PDF format)
.
. label var a1 "ARCH(3)"
. label var a3 "GARCH(1,1)-M"
. tsline a1 a3, scheme(s2mono)
. graph export a4.pdf,replace
(file /Users/baum/doc/Courses 2007-2008/EC32701S/a4.pdf written in PDF format)
.
. log close
log: /Users/baum/doc/Courses 2007-2008/EC32701S/327dfglsArch.smcl
log type: smcl
closed on: 27 Feb 2008, 08:53:27
-------------------------------------------------------------------------------------------