GAUSS ecmFit Example

Introduction

The following is an example of implementing the ecmFit procedure for estimating error correction models.

Load data

This example loads the data using the GAUSS function csvReadM. The function csvReadM utilizes the GAUSS formula string syntax while allows users to load and transform specific variables directly from the dataset.

new;
library tsmt;

// Get file name with full path
fname =  getGAUSSHome() $+ "pkgs/tsmt/examples/ecmmt.csv";

// Load all rows (from 1 to the end) of columns 2 and 3
y = csvReadM(fname, 1, 2);

// Difference the data
y = vmdiffmt(y, 1);

Estimate The Model

// Estimate model with AR order set to 1
call ecmFit(y, 1);

Output

The output reads:

==========================================================================
 ECM Version 3.0.0
========================================================================== Residual Covariance Matrix 8003.3 7241.5 7241.5 8097.1 Zeta Plane [1,.,.] 0.26261 0.00000 0.00000 0.26558 Pi 1.3944 0.00000 0.00000 1.3673 Augmented Dickey-Fuller UNIT ROOT Test for Y1 Critical Values ADF Stat 1% 5% 10% 90% 95% 99% No Intercept -18.6669 -2.6065 -1.9639 -1.6348 0.8909 1.2930 1.9716 Intercept -18.6410 -3.4269 -2.8628 -2.5722 -0.4634 -0.0922 0.6131 Intercept and Time Trend -18.6184 -3.9930 -3.4200 -3.1352 -1.2386 -0.9299 -0.3372 Augmented Dickey-Fuller UNIT ROOT Test for Y2 Critical Values ADF Stat 1% 5% 10% 90% 95% 99% No Intercept -18.8509 -2.6065 -1.9639 -1.6348 0.8909 1.2930 1.9716 Intercept -18.8246 -3.4269 -2.8628 -2.5722 -0.4634 -0.0922 0.6131 Intercept and Time Trend -18.8006 -3.9930 -3.4200 -3.1352 -1.2386 -0.9299 -0.3372 Phillips-Perron UNIT ROOT Test for Y1 PPt 1% 5% No Intercept -38.1615 -2.6065 -1.9639 Intercept -49.4585 -3.4269 -2.8628 Intercept and Time Trend -49.4051 -3.9930 -3.4200 Phillips-Perron UNIT ROOT Test for Y2 PPt 1% 5% No Intercept -36.1496 -2.6065 -1.9639 Intercept -47.6308 -3.4269 -2.8628 Intercept and Time Trend -47.5694 -3.9930 -3.4200 Augmented Dickey-Fuller COINTEGRATION Test for Y1 Y2 Critical Values ADF Stat 1% 5% 10% 90% 95% 99% No Intercept -17.5257 -3.3620 -2.7755 -2.4614 -0.2868 0.1329 1.0347 Intercept -17.5257 -3.9024 -3.3271 -3.0372 -0.9965 -0.6055 0.1185 Intercept and Time Trend -17.5264 -4.3298 -3.8116 -3.5188 -1.5945 -1.2902 -0.5767 Johansen's Trace and Maximum Eigenvalue Statistics. r = # of CI Equations Critical Values r Trace Max. Eig 1% 5% 10% 90% No Intercept 0 635.4352 335.6915 1 299.7437 299.7437 1.0524 1.7046 2.1927 9.3918 Intercept 0 635.4463 335.7033 1 299.7430 299.7430 2.2515 3.3599 4.0975 12.8635 Intercept and Time Trend 0 635.4759 335.7050 1 299.7709 299.7709 4.0389 5.3796 6.1879 16.1762 Dep. Variable(s) : D(Y1 ) D(Y2 ) No. of Observations : 366 366 Degrees of Freedom : 355 355 Mean of Y : -0.0040 -0.0020 Std. Dev. of Y : 5.6821 5.6408 Y Sum of Squares : 11784.4965 11613.7893 SSE : 8003.2952 8097.1416 MSE : 22.2005 22.4609 sqrt(MSE) : 4.7117 4.7393 R-Squared : 0.3209 0.3028 Adjusted R-Squared : 0.3017 0.2832 Model Selection (Information) Criteria ...................................... Likelihood Function : -3662.5588 Akaike AIC : 7303.1176 Schwarz BIC : 7390.0466 Likelihood Ratio : 7325.1176 Characteristic Equation(s) for Stationarity and Invertibility AR Roots and Moduli: Real : -1.3 -1.3 Imag.: 1.5 -1.5 Mod. : 2.0 2.0 MULTIVARIATE ACF LAG01 LAG02 LAG03 -0.06832 -0.05948 -0.1725 -0.139 -0.2508 -0.2182 -0.06776 -0.07195 -0.1549 -0.1576 -0.2526 -0.2456 LAG04 LAG05 LAG06 0.02011 0.008796 0.01458 0.0204 -0.07357 -0.04992 0.05702 0.0323 -0.02637 -0.04106 -0.0441 -0.03693 LAG07 LAG08 LAG09 -0.04169 -0.0379 -0.01503 -0.05778 0.07288 0.05431 -0.06037 -0.03542 -0.0007025 -0.03612 0.04379 0.0148 LAG10 LAG11 LAG12 -0.003824 0.02044 0.08261 0.05255 -0.05834 -0.03262 0.03214 0.05593 0.09985 0.08299 -0.1043 -0.07912 ACF INDICATORS: SIGNIFICANCE = 0.95 (using Bartlett's large sample standard errors) LAG01 LAG02 LAG03 LAG04 LAG05 LAG06
-+-+ -+-+ -+-+ -+-+ -+-+ -+-+
-+-+ -+-+ -+-+ -+-+ -+-+ -+-+
LAG07 LAG08 LAG09 LAG10 LAG11 LAG12
-+-+ -+-+ -+-+ -+-+ -+-+ -+-+
-+-+ -+-+ -+-+ -+-+ -+-+ -+-+
Multivariate Goodness of Fit Test Lag Qs P-Value 2 25.7435 0.0000 3 56.8257 0.0000 4 61.2333 0.0000 5 70.2656 0.0000 6 75.1898 0.0000 7 80.6586 0.0000 8 85.1005 0.0000 9 90.4321 0.0000 10 94.3758 0.0000 11 100.8592 0.0000 12 108.3529 0.0000

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy