GAUSS arimaFit Example


This example estimates an AR(2) model following the example found on page 76 of Enders, W. "Applied econometric time series: 3rd Edition". The GAUSS dataset "enders_sim2.dat" contains the data used in the example and released with the textbook.

Estimate The Model

This example uses the formula string syntax which requires no data loading prior to calling the procedure. This greatly simplifies the required code. In addition, because the model is strictly an AR model, the only additional input is the AR order.

library tsmt;

// Filename with full path
dataset = getGAUSSHome() $+ "pkgs/tsmt/examples/enders_sim2.dat";

// Name of the variable to load from the dataset
var_name = "ar2";

// Run arima estimation for AR(2) model
call arimaFit(dataset, var_name, 2);


The output from arimaFit reads

Model: ARIMA(2,0,0)

Final Results:

Log Likelihood: 200.167329 Number of Residuals: 100
AIC : -396.334658 Error Variance : 0.088081041
SBC : -391.124317 Standard Error : 0.296784502

DF: 98 SSE: 8.631942002

Coefficients Std. Err. T-Ratio Approx. Prob.
AR[1,1] 0.69112 0.08760 7.88919 0.00000
AR[2,1]-0.48468 0.08780 -5.52013 0.00000

Constant: -0.01830559

AR Roots and Moduli:

Real : 0.71296 0.71296
Imag.: 1.24695 -1.24695
Mod. : 1.43638 1.43638

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