Stata Log for Money-Income Example

——————————————————————————–
name: <unnamed>
log: C:\Users\pshea\Mon_In.log
log type: text
opened on: 11 Oct 2013, 12:45:08

. /*Telling Stata which is the time series indicator*/
>
> tsset date;
time variable: date, 1 to 708
delta: 1 unit

. /*Taking some logs*/
>
> gen ip_log=ln(ip);

. gen cpi_log=ln(cpi);

. /*Taking some lags*/
>
> gen cpi_lag1=cpi_log[_n-1];
(1 missing value generated)

. gen ip_lag1=ip_log[_n-1];
(1 missing value generated)

. gen ffr_lag1=ffr[_n-1];
(1 missing value generated)

. /*Collecting descriptive statistics*/
>
> summarize ip cpi ffr, detail;

IP
————————————————————-
Percentiles Smallest
1% 19.2421 18.0344
5% 21.2817 18.0612
10% 22.9993 18.0613 Obs 708
25% 37.35725 18.276 Sum of Wgt. 708

50% 52.42365 Mean 57.35473
Largest Std. Dev. 25.34711
75% 84.7074 100.4978
90% 93.5 100.7148 Variance 642.476
95% 97.4499 100.8053 Skewness .2177602
99% 100.1435 100.82 Kurtosis 1.779469

CPI
————————————————————-
Percentiles Smallest
1% 26.78 26.71
5% 28.11 26.72
10% 29.55 26.72 Obs 708
25% 36.2 26.76 Sum of Wgt. 708

50% 101.75 Mean 106.241
Largest Std. Dev. 67.59942
75% 163.7 231.831
90% 207.667 232.34 Variance 4569.681
95% 218.69 232.77 Skewness .3138294
99% 231.198 232.944 Kurtosis 1.683028

FFR
————————————————————-
Percentiles Smallest
1% .09 .07
5% .16 .07
10% 1.01 .07 Obs 708
25% 2.91 .08 Sum of Wgt. 708

50% 4.905 Mean 5.203178
Largest Std. Dev. 3.520133
75% 6.81 18.9
90% 9.61 19.04 Variance 12.39133
95% 11.31 19.08 Skewness 1.046814
99% 17.19 19.1 Kurtosis 4.681257

. /*Calculating the correlation matrix (includes autocorrelations)*/
>
> correlate ip cpi ffr ip_lag1 cpi_lag1 ffr_lag1;
(obs=707)

| ip cpi ffr ip_lag1 cpi_lag1 ffr_lag1
————-+——————————————————
ip | 1.0000
cpi | 0.9725 1.0000
ffr | -0.1721 -0.2494 1.0000
ip_lag1 | 0.9753 0.9336 -0.0182 1.0000
cpi_lag1 | 0.9565 0.9703 -0.0630 0.9641 1.0000
ffr_lag1 | -0.1679 -0.2420 0.9889 -0.0135 -0.0553 1.0000
. /*Running a regression*/
>
> reg ip_log cpi_log ffr;

Source | SS df MS Number of obs = 708
————-+—————————— F( 2, 705) = 4774.68
Model | 159.062895 2 79.5314473 Prob > F = 0.0000
Residual | 11.7431249 705 .016656915 R-squared = 0.9312
————-+—————————— Adj R-squared = 0.9311
Total | 170.806019 707 .241592673 Root MSE = .12906

——————————————————————————
ip_log | Coef. Std. Err. t P>|t| [95% Conf. Interval]
————-+—————————————————————-
cpi_log | .6320997 .0064693 97.71 0.000 .6193982 .6448012
ffr | .0055506 .0013812 4.02 0.000 .0028389 .0082624
_cons | 1.119176 .0302385 37.01 0.000 1.059808 1.178545
——————————————————————————

. /*Now adding the Unit Root tests to the code*/
>
> /*Creating some first differences*/
>
> gen d1ip_log = ip_log-ip_lag1;
(1 missing value generated)

. gen d1ffr= ffr-ffr_lag1;
(1 missing value generated)

. gen d1cpi_log= cpi_log-cpi_lag1;
(1 missing value generated)

. gen d1cpi_lag1=d1cpi_log[_n-1];
(2 missing values generated)

. gen d2cpi_log= d1cpi_log-d1cpi_lag1;
(2 missing values generated)

. /*Choosing lag length for DF test on IP*/
>
> dfgls ip_log;

DF-GLS for ip_log Number of obs = 688
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -1.015 -3.480 -2.825 -2.541
18 -1.115 -3.480 -2.827 -2.543
17 -1.013 -3.480 -2.830 -2.545
16 -0.989 -3.480 -2.832 -2.548
15 -0.917 -3.480 -2.835 -2.550
14 -0.826 -3.480 -2.837 -2.552
13 -0.915 -3.480 -2.840 -2.554
12 -0.921 -3.480 -2.842 -2.556
11 -1.177 -3.480 -2.844 -2.558
10 -1.272 -3.480 -2.847 -2.561
9 -1.244 -3.480 -2.849 -2.563
8 -1.218 -3.480 -2.851 -2.565
7 -1.140 -3.480 -2.853 -2.566
6 -1.103 -3.480 -2.855 -2.568
5 -1.061 -3.480 -2.858 -2.570
4 -1.177 -3.480 -2.860 -2.572
3 -1.128 -3.480 -2.862 -2.574
2 -0.971 -3.480 -2.864 -2.576
1 -0.777 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 12 with RMSE .0080008
Min SC = -9.589322 at lag 2 with RMSE .0081568
Min MAIC = -9.618892 at lag 12 with RMSE .0080008

. /*Conducting DF test for IP_log*/
>
> dfuller ip_log, lag(2) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 705

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -2.285 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.4425

. /*testing for Unit Root on First Difefrence of IP_log*/
>
> dfgls d1ip_log;

DF-GLS for d1ip_log Number of obs = 687
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -4.987 -3.480 -2.825 -2.541
18 -4.962 -3.480 -2.827 -2.543
17 -4.865 -3.480 -2.830 -2.545
16 -5.262 -3.480 -2.832 -2.548
15 -5.502 -3.480 -2.835 -2.550
14 -5.940 -3.480 -2.837 -2.552
13 -6.524 -3.480 -2.840 -2.554
12 -6.501 -3.480 -2.842 -2.556
11 -6.805 -3.480 -2.844 -2.558
10 -6.175 -3.480 -2.847 -2.561
9 -6.102 -3.480 -2.849 -2.563
8 -6.449 -3.480 -2.851 -2.565
7 -6.838 -3.480 -2.853 -2.566
6 -7.508 -3.480 -2.855 -2.568
5 -8.144 -3.480 -2.858 -2.570
4 -8.945 -3.480 -2.860 -2.572
3 -9.014 -3.480 -2.862 -2.574
2 -10.072 -3.480 -2.864 -2.576
1 -12.433 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 17 with RMSE .0080196
Min SC = -9.579618 at lag 2 with RMSE .0081963
Min MAIC = -9.249714 at lag 17 with RMSE .0080196

. dfuller d1ip_log, lag(2) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 704

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -10.765 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.0000

. /*Checking for Non-stationarity of federal Funds Rate*/
>
> dfgls ffr;

DF-GLS for ffr Number of obs = 688
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -1.850 -3.480 -2.825 -2.541
18 -1.993 -3.480 -2.827 -2.543
17 -2.103 -3.480 -2.830 -2.545
16 -2.260 -3.480 -2.832 -2.548
15 -2.077 -3.480 -2.835 -2.550
14 -1.929 -3.480 -2.837 -2.552
13 -1.892 -3.480 -2.840 -2.554
12 -1.543 -3.480 -2.842 -2.556
11 -1.570 -3.480 -2.844 -2.558
10 -1.796 -3.480 -2.847 -2.561
9 -2.008 -3.480 -2.849 -2.563
8 -1.792 -3.480 -2.851 -2.565
7 -1.382 -3.480 -2.853 -2.566
6 -1.536 -3.480 -2.855 -2.568
5 -1.630 -3.480 -2.858 -2.570
4 -1.622 -3.480 -2.860 -2.572
3 -1.808 -3.480 -2.862 -2.574
2 -1.864 -3.480 -2.864 -2.576
1 -2.234 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 16 with RMSE .4530228
Min SC = -1.439934 at lag 13 with RMSE .4554612
Min MAIC = -1.524896 at lag 19 with RMSE .4511563

. dfuller ffr, lag(13) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 694

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -2.634 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.2645

. dfgls d1ffr;

DF-GLS for d1ffr Number of obs = 687
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -3.758 -3.480 -2.825 -2.541
18 -3.779 -3.480 -2.827 -2.543
17 -3.689 -3.480 -2.830 -2.545
16 -3.646 -3.480 -2.832 -2.548
15 -3.535 -3.480 -2.835 -2.550
14 -3.914 -3.480 -2.837 -2.552
13 -4.320 -3.480 -2.840 -2.554
12 -4.583 -3.480 -2.842 -2.556
11 -5.720 -3.480 -2.844 -2.558
10 -6.060 -3.480 -2.847 -2.561
9 -5.817 -3.480 -2.849 -2.563
8 -5.615 -3.480 -2.851 -2.565
7 -6.590 -3.480 -2.853 -2.566
6 -9.004 -3.480 -2.855 -2.568
5 -9.404 -3.480 -2.858 -2.570
4 -10.210 -3.480 -2.860 -2.572
3 -11.955 -3.480 -2.862 -2.574
2 -12.928 -3.480 -2.864 -2.576
1 -15.429 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 15 with RMSE .4601166
Min SC = -1.41058 at lag 12 with RMSE .46436
Min MAIC = -1.298366 at lag 15 with RMSE .4601166

. dfuller d1ffr, lag(12) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 694

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -6.688 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.0000

. /*Checking for Non-stationarity of CPI*/
>
> dfgls cpi_log;

DF-GLS for cpi_log Number of obs = 688
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -1.532 -3.480 -2.825 -2.541
18 -1.616 -3.480 -2.827 -2.543
17 -1.564 -3.480 -2.830 -2.545
16 -1.534 -3.480 -2.832 -2.548
15 -1.559 -3.480 -2.835 -2.550
14 -1.335 -3.480 -2.837 -2.552
13 -1.276 -3.480 -2.840 -2.554
12 -1.287 -3.480 -2.842 -2.556
11 -1.506 -3.480 -2.844 -2.558
10 -1.380 -3.480 -2.847 -2.561
9 -1.238 -3.480 -2.849 -2.563
8 -1.044 -3.480 -2.851 -2.565
7 -0.960 -3.480 -2.853 -2.566
6 -0.849 -3.480 -2.855 -2.568
5 -0.734 -3.480 -2.858 -2.570
4 -0.640 -3.480 -2.860 -2.572
3 -0.479 -3.480 -2.862 -2.574
2 -0.387 -3.480 -2.864 -2.576
1 -0.257 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 15 with RMSE .0022624
Min SC = -12.03733 at lag 12 with RMSE .0022873
Min MAIC = -12.13155 at lag 15 with RMSE .0022624

. dfuller cpi_log, lag(12) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 695

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -1.002 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.9439

. dfgls d1cpi_log;

DF-GLS for d1cpi_log Number of obs = 687
Maxlag = 19 chosen by Schwert criterion

DF-GLS tau 1% Critical 5% Critical 10% Critical
[lags] Test Statistic Value Value Value
——————————————————————————
19 -1.902 -3.480 -2.825 -2.541
18 -1.953 -3.480 -2.827 -2.543
17 -1.861 -3.480 -2.830 -2.545
16 -1.938 -3.480 -2.832 -2.548
15 -1.993 -3.480 -2.835 -2.550
14 -1.976 -3.480 -2.837 -2.552
13 -2.338 -3.480 -2.840 -2.554
12 -2.473 -3.480 -2.842 -2.556
11 -2.483 -3.480 -2.844 -2.558
10 -2.154 -3.480 -2.847 -2.561
9 -2.360 -3.480 -2.849 -2.563
8 -2.641 -3.480 -2.851 -2.565
7 -3.146 -3.480 -2.853 -2.566
6 -3.467 -3.480 -2.855 -2.568
5 -3.934 -3.480 -2.858 -2.570
4 -4.546 -3.480 -2.860 -2.572
3 -5.178 -3.480 -2.862 -2.574
2 -6.640 -3.480 -2.864 -2.576
1 -8.089 -3.480 -2.865 -2.577

Opt Lag (Ng-Perron seq t) = 14 with RMSE .0022752
Min SC = -12.03465 at lag 11 with RMSE .0023011
Min MAIC = -12.11137 at lag 14 with RMSE .0022752

. dfuller d1cpi_log, lag(11) trend;

Augmented Dickey-Fuller test for unit root Number of obs = 695

———- Interpolated Dickey-Fuller ———
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
——————————————————————————
Z(t) -3.511 -3.960 -3.410 -3.120
——————————————————————————
MacKinnon approximate p-value for Z(t) = 0.0382

. /*Re-running regression based on first differences*/
>
> reg d1ip_log d1cpi_log d1ffr;

Source | SS df MS Number of obs = 707
————-+—————————— F( 2, 704) = 27.62
Model | .004059433 2 .002029717 Prob > F = 0.0000
Residual | .051734163 704 .000073486 R-squared = 0.0728
————-+—————————— Adj R-squared = 0.0701
Total | .055793596 706 .000079028 Root MSE = .00857

——————————————————————————
d1ip_log | Coef. Std. Err. t P>|t| [95% Conf. Interval]
————-+—————————————————————-
d1cpi_log | -.2801673 .1026858 -2.73 0.007 -.4817744 -.0785601
d1ffr | .0043668 .000617 7.08 0.000 .0031554 .0055782
_cons | .0032676 .0004499 7.26 0.000 .0023843 .0041509
——————————————————————————

. estat ic;

—————————————————————————–
Model | Obs ll(null) ll(model) df AIC BIC
————-+—————————————————————
. | 707 2336.37 2363.073 3 -4720.147 -4706.464
—————————————————————————–
Note: N=Obs used in calculating BIC; see [R] BIC note

. reg d1ip_log d1cpi_log;

Source | SS df MS Number of obs = 707
————-+—————————— F( 1, 705) = 4.82
Model | .000378757 1 .000378757 Prob > F = 0.0285
Residual | .055414839 705 .000078603 R-squared = 0.0068
————-+—————————— Adj R-squared = 0.0054
Total | .055793596 706 .000079028 Root MSE = .00887

——————————————————————————
d1ip_log | Coef. Std. Err. t P>|t| [95% Conf. Interval]
————-+—————————————————————-
d1cpi_log | -.2326253 .105973 -2.20 0.028 -.4406858 -.0245648
_cons | .003118 .0004648 6.71 0.000 .0022055 .0040305
——————————————————————————

. estat ic;

—————————————————————————–
Model | Obs ll(null) ll(model) df AIC BIC
————-+—————————————————————
. | 707 2336.37 2338.778 2 -4673.555 -4664.433
—————————————————————————–
Note: N=Obs used in calculating BIC; see [R] BIC note

. /*VAR time*/
>
> var d1cpi_log d1ffr d1ip_log, lag(1);

Vector autoregression

Sample: 3 – 708 No. of obs = 706
Log likelihood = 5160.495 AIC = -14.58497
FPE = 9.30e-11 HQIC = -14.55503
Det(Sigma_ml) = 8.99e-11 SBIC = -14.50747

Equation Parms RMSE R-sq chi2 P>chi2
—————————————————————-
d1cpi_log 4 .002468 0.3878 447.2666 0.0000
d1ffr 4 .478673 0.1695 144.08 0.0000
d1ip_log 4 .008218 0.1500 124.627 0.0000
—————————————————————-

——————————————————————————
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
————-+—————————————————————-
d1cpi_log |
d1cpi_log |
L1. | .5997719 .0296472 20.23 0.000 .5416644 .6578794
|
d1ffr |
L1. | .0007004 .0001834 3.82 0.000 .000341 .0010597
|
d1ip_log |
L1. | -.0185678 .0108221 -1.72 0.086 -.0397788 .0026431
|
_cons | .0012745 .0001339 9.52 0.000 .001012 .0015371
————-+—————————————————————-
d1ffr |
d1cpi_log |
L1. | 2.872504 5.749057 0.50 0.617 -8.39544 14.14045
|
d1ffr |
L1. | .3400695 .0355574 9.56 0.000 .2703782 .4097608
|
d1ip_log |
L1. | 9.45195 2.098571 4.50 0.000 5.338827 13.56507
|
_cons | -.0327812 .0259732 -1.26 0.207 -.0836877 .0181254
————-+—————————————————————-
d1ip_log |
d1cpi_log |
L1. | -.1541684 .0987009 -1.56 0.118 -.3476187 .0392819
|
d1ffr |
L1. | .0012632 .0006105 2.07 0.039 .0000667 .0024597
|
d1ip_log |
L1. | .3543674 .0360287 9.84 0.000 .2837525 .4249823
|
_cons | .002032 .0004459 4.56 0.000 .001158 .0029059
——————————————————————————

. irf create order1, step(10) set(C:\Users\pshea\irf1,replace);
(file C:\Users\pshea\irf1.irf created)
(file C:\Users\pshea\irf1.irf now active)
(file C:\Users\pshea\irf1.irf updated)

. irf graph oirf, impulse(d1ffr d1cpi_log d1ip_log) response(d1ffr d1cpi_log d1i
> p_log);

. varsoc d1cpi_log d1ffr d1ip_log;

Selection-order criteria
Sample: 6 – 708 Number of obs = 703
+—————————————————————————+
|lag | LL LR df p FPE AIC HQIC SBIC |
|—-+———————————————————————-|
| 0 | 4861.61 2.0e-10 -13.8225 -13.815 -13.8031 |
| 1 | 5138.35 553.46 9 0.000 9.3e-11 -14.5842 -14.5541 -14.5064 |
| 2 | 5174.8 72.908 9 0.000 8.6e-11 -14.6623 -14.6097* -14.5262* |
| 3 | 5183.53 17.464 9 0.042 8.6e-11 -14.6615 -14.5864 -14.4671 |
| 4 | 5203.81 40.56* 9 0.000 8.3e-11* -14.6936* -14.596 -14.4409 |
+—————————————————————————+
Endogenous: d1cpi_log d1ffr d1ip_log
Exogenous: _cons

. var d1cpi_log d1ffr d1ip_log, lag(1,2);

Vector autoregression

Sample: 4 – 708 No. of obs = 705
Log likelihood = 5188.864 AIC = -14.66061
FPE = 8.62e-11 HQIC = -14.60814
Det(Sigma_ml) = 8.12e-11 SBIC = -14.52483

Equation Parms RMSE R-sq chi2 P>chi2
—————————————————————-
d1cpi_log 7 .002429 0.4091 488.0781 0.0000
d1ffr 7 .469622 0.2051 181.8503 0.0000
d1ip_log 7 .008154 0.1679 142.2689 0.0000
—————————————————————-

——————————————————————————
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
————-+—————————————————————-
d1cpi_log |
d1cpi_log |
L1. | .4876165 .0370439 13.16 0.000 .4150119 .5602212
L2. | .169971 .0366162 4.64 0.000 .0982046 .2417375
|
d1ffr |
L1. | .0005575 .0001933 2.88 0.004 .0001787 .0009363
L2. | .0003819 .0001929 1.98 0.048 3.86e-06 .00076
|
d1ip_log |
L1. | -.02214 .0112671 -1.97 0.049 -.0442232 -.0000569
L2. | .0088354 .0114029 0.77 0.438 -.0135139 .0311847
|
_cons | .0010897 .0001424 7.65 0.000 .0008106 .0013688
————-+—————————————————————-
d1ffr |
d1cpi_log |
L1. | 15.47433 7.163421 2.16 0.031 1.434285 29.51438
L2. | -13.02058 7.080723 -1.84 0.066 -26.89854 .8573825
|
d1ffr |
L1. | .3938822 .0373751 10.54 0.000 .3206283 .467136
L2. | -.1908616 .0373012 -5.12 0.000 -.2639707 -.1177526
|
d1ip_log |
L1. | 8.596961 2.178796 3.95 0.000 4.326599 12.86732
L2. | 4.885415 2.205056 2.22 0.027 .563585 9.207244
|
_cons | -.0409779 .0275353 -1.49 0.137 -.094946 .0129902
————-+—————————————————————-
d1ip_log |
d1cpi_log |
L1. | .0123359 .124382 0.10 0.921 -.2314484 .2561202
L2. | -.2671324 .1229461 -2.17 0.030 -.5081023 -.0261625
|
d1ffr |
L1. | .0007322 .000649 1.13 0.259 -.0005397 .0020041
L2. | .0006323 .0006477 0.98 0.329 -.0006371 .0019018
|
d1ip_log |
L1. | .3135627 .0378315 8.29 0.000 .2394143 .3877112
L2. | .1062108 .0382875 2.77 0.006 .0311687 .1812528
|
_cons | .002182 .0004781 4.56 0.000 .0012449 .003119
——————————————————————————

. irf create order2, step(10) set(C:\Users\pshea\irf2,replace);
(file C:\Users\pshea\irf2.irf created)
(file C:\Users\pshea\irf2.irf now active)
(file C:\Users\pshea\irf2.irf updated)

. irf graph oirf, impulse(d1ffr d1cpi_log d1ip_log) response(d1ffr d1cpi_log d1i
> p_log);

. fcast compute for, step(20) bs;
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . .

. fcast graph ford1ip_log ford1cpi_log ford1ffr;

. /*Alternate Order*/
>
> varsoc d1ip_log d1ffr d1cpi_log;

Selection-order criteria
Sample: 6 – 708 Number of obs = 703
+—————————————————————————+
|lag | LL LR df p FPE AIC HQIC SBIC |
|—-+———————————————————————-|
| 0 | 4861.61 2.0e-10 -13.8225 -13.815 -13.8031 |
| 1 | 5138.35 553.46 9 0.000 9.3e-11 -14.5842 -14.5541 -14.5064 |
| 2 | 5174.8 72.908 9 0.000 8.6e-11 -14.6623 -14.6097* -14.5262* |
| 3 | 5183.53 17.464 9 0.042 8.6e-11 -14.6615 -14.5864 -14.4671 |
| 4 | 5203.81 40.56* 9 0.000 8.3e-11* -14.6936* -14.596 -14.4409 |
+—————————————————————————+
Endogenous: d1ip_log d1ffr d1cpi_log
Exogenous: _cons

. var d1ip_log d1ffr d1cpi_log, lag(1,2);

Vector autoregression

Sample: 4 – 708 No. of obs = 705
Log likelihood = 5188.864 AIC = -14.66061
FPE = 8.62e-11 HQIC = -14.60814
Det(Sigma_ml) = 8.12e-11 SBIC = -14.52483

Equation Parms RMSE R-sq chi2 P>chi2
—————————————————————-
d1ip_log 7 .008154 0.1679 142.2689 0.0000
d1ffr 7 .469622 0.2051 181.8503 0.0000
d1cpi_log 7 .002429 0.4091 488.0781 0.0000
—————————————————————-

——————————————————————————
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
————-+—————————————————————-
d1ip_log |
d1ip_log |
L1. | .3135627 .0378315 8.29 0.000 .2394143 .3877112
L2. | .1062108 .0382875 2.77 0.006 .0311687 .1812528
|
d1ffr |
L1. | .0007322 .000649 1.13 0.259 -.0005397 .0020041
L2. | .0006323 .0006477 0.98 0.329 -.0006371 .0019018
|
d1cpi_log |
L1. | .0123359 .124382 0.10 0.921 -.2314484 .2561202
L2. | -.2671324 .1229461 -2.17 0.030 -.5081023 -.0261625
|
_cons | .002182 .0004781 4.56 0.000 .0012449 .003119
————-+—————————————————————-
d1ffr |
d1ip_log |
L1. | 8.596961 2.178796 3.95 0.000 4.326599 12.86732
L2. | 4.885415 2.205056 2.22 0.027 .563585 9.207244
|
d1ffr |
L1. | .3938822 .0373751 10.54 0.000 .3206283 .467136
L2. | -.1908616 .0373012 -5.12 0.000 -.2639707 -.1177526
|
d1cpi_log |
L1. | 15.47433 7.163421 2.16 0.031 1.434285 29.51438
L2. | -13.02058 7.080723 -1.84 0.066 -26.89854 .8573825
|
_cons | -.0409779 .0275353 -1.49 0.137 -.094946 .0129902
————-+—————————————————————-
d1cpi_log |
d1ip_log |
L1. | -.02214 .0112671 -1.97 0.049 -.0442232 -.0000569
L2. | .0088354 .0114029 0.77 0.438 -.0135139 .0311847
|
d1ffr |
L1. | .0005575 .0001933 2.88 0.004 .0001787 .0009363
L2. | .0003819 .0001929 1.98 0.048 3.86e-06 .00076
|
d1cpi_log |
L1. | .4876165 .0370439 13.16 0.000 .4150119 .5602212
L2. | .169971 .0366162 4.64 0.000 .0982046 .2417375
|
_cons | .0010897 .0001424 7.65 0.000 .0008106 .0013688
——————————————————————————

. irf create order3, step(10) set(C:\Users\pshea\irf3,replace);
(file C:\Users\pshea\irf3.irf created)
(file C:\Users\pshea\irf3.irf now active)
(file C:\Users\pshea\irf3.irf updated)

. irf graph oirf, impulse(d1ffr d1cpi_log d1ip_log) response(d1ffr d1cpi_log d1i
> p_log);

. fcast compute for2, step(20) bs;
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . . .

. fcast graph for2d1ip_log for2d1cpi_log for2d1ffr;

. /*Vector Error Correction Model*/
>
> vecrank d1cpi_log d1ffr d1ip_log;

Johansen tests for cointegration
Trend: constant Number of obs = 705
Sample: 4 – 708 Lags = 2
——————————————————————————-
5%
maximum trace critical
rank parms LL eigenvalue statistic value
0 12 4906.7628 . 564.2020 29.68
1 17 5065.2709 0.36216 247.1858 15.41
2 20 5140.6998 0.19264 96.3281 3.76
3 21 5188.8638 0.12771
——————————————————————————-

. vec d1cpi_log d1ffr d1ip_log, lags(2) rank(2);

Vector error-correction model

Sample: 4 – 708 No. of obs = 705
AIC = -14.52681
Log likelihood = 5140.7 HQIC = -14.47684
Det(Sigma_ml) = 9.31e-11 SBIC = -14.3975

Equation Parms RMSE R-sq chi2 P>chi2
—————————————————————-
D_d1cpi_log 6 .00259 0.1357 109.707 0.0000
D_d1ffr 6 .471853 0.3497 375.8313 0.0000
D_d1ip_log 6 .008151 0.3312 346.1964 0.0000
—————————————————————-

——————————————————————————
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
————-+—————————————————————-
D_d1cpi_log |
_ce1 |
L1. | -.0301497 .0093162 -3.24 0.001 -.0484092 -.0118903
|
_ce2 |
L1. | .001024 .0002405 4.26 0.000 .0005527 .0014952
|
d1cpi_log |
LD. | -.3260051 .0354052 -9.21 0.000 -.395398 -.2566122
|
d1ffr |
LD. | -.0003292 .0002066 -1.59 0.111 -.0007342 .0000758
|
d1ip_log |
LD. | -.0022949 .012199 -0.19 0.851 -.0262045 .0216147
|
_cons | 9.94e-06 .0000975 0.10 0.919 -.0001812 .0002011
————-+—————————————————————-
D_d1ffr |
_ce1 |
L1. | 19.44064 1.69757 11.45 0.000 16.11346 22.76782
|
_ce2 |
L1. | -.792382 .0438158 -18.08 0.000 -.8782594 -.7065045
|
d1cpi_log |
LD. | 4.532426 6.45142 0.70 0.482 -8.112125 17.17698
|
d1ffr |
LD. | .1937298 .0376515 5.15 0.000 .1199343 .2675254
|
d1ip_log |
LD. | -4.529614 2.222859 -2.04 0.042 -8.886337 -.1728915
|
_cons | 1.25e-08 .017771 0.00 1.000 -.0348306 .0348306
————-+—————————————————————-
D_d1ip_log |
_ce1 |
L1. | -.3179434 .0293228 -10.84 0.000 -.375415 -.2604717
|
_ce2 |
L1. | .0013474 .0007568 1.78 0.075 -.000136 .0028308
|
d1cpi_log |
LD. | .2986862 .1114379 2.68 0.007 .0802719 .5171004
|
d1ffr |
LD. | -.000643 .0006504 -0.99 0.323 -.0019177 .0006317
|
d1ip_log |
LD. | -.1075334 .0383963 -2.80 0.005 -.1827888 -.032278
|
_cons | -1.75e-07 .000307 -0.00 1.000 -.0006018 .0006015
——————————————————————————

Cointegrating equations

Equation Parms chi2 P>chi2
——————————————-
_ce1 1 171.4167 0.0000
_ce2 1 36.36524 0.0000
——————————————-

Identification: beta is exactly identified

Johansen normalization restrictions imposed
——————————————————————————
beta | Coef. Std. Err. z P>|z| [95% Conf. Interval]
————-+—————————————————————-
_ce1 |
d1cpi_log | 1 . . . . .
d1ffr | (omitted)
d1ip_log | 1.951218 .1490319 13.09 0.000 1.659121 2.243315
_cons | -.0077706 . . . . .
————-+—————————————————————-
_ce2 |
d1cpi_log | 3.55e-15 . . . . .
d1ffr | 1 . . . . .
d1ip_log | 31.75041 5.265094 6.03 0.000 21.43102 42.06981
_cons | -.0755731 . . . . .
——————————————————————————

. irf create order4, step(10) set(C:\Users\pshea\irf4,replace);
(file C:\Users\pshea\irf4.irf created)
(file C:\Users\pshea\irf4.irf now active)
(file C:\Users\pshea\irf4.irf updated)

. irf graph oirf, impulse(d1ffr d1cpi_log d1ip_log) response(d1ffr d1cpi_log d1i
> p_log);

. fcast compute for3, step(20);

. fcast graph for3d1ip_log for3d1cpi_log for3d1ffr;

.
end of do-file