INTRODUCTION
The GAUSS time series module TSMT provides a number of routines for performing:
- Pre-estimation data analysis.
- Model parameter estimation.
- Post-estimation diagnosis.
These tutorials are aimed at illustrating the use of the GAUSS application TSMT 3.0 for performing the fundamentals of time-series analysis.
LOAD THE TSMT LIBRARY
In order to use the procedures in the TSMT library, the library must be actively loaded. This is done using the GAUSS library
statement:
// Make the functions in the 'tsmt' // library available for use library tsmt;
DATA MATRIX INPUTS
Both independent and dependent data matrices (when applicable) can be directly inputted as arguments into TSMT functions.
In functions where independent data is optional, it is included as an optional argument to the function. As an example, consider the varmaFit
procedure:
// Inputs in square brackets are optional vout = varmaFit(y, p [, d, q, x, vmc]);
Now consider using varmaFit to run a VAR(3) model with dependent data and without exogenous data. In this case, only the dependent data matrix and the AR order are required:
// Create file name with full path fname = getGAUSSHome() $+ "pkgs/tsmt/examples/mink.csv";
© 2024 Aptech Systems, Inc. All rights reserved.
// Load two variables into the matrix 'y' y = loadd(fname, "LogMink + LogMusk"); // Perform estimation call varmaFit(y, 3);
DATA DIRECT FROM A DATASET
Formula strings allow you to represent a model or collection of variables in a compact and intuitive manner using the variable names in the dataset.
In a model with a dependent variable, the dependent variable will be listed first, followed by a tilde ~
and then the independent variables. For a simple example, consider the case of a linear model:
The correct formula string would be: "weight ~ height"
. Complete details regarding the use of formula strings is provided in Section 9.11 of the GAUSS help or in the Formula String Tutorials.
As an example of the use of a formula string in TSMT let’s again consider varmaFit
:
// Create file name with full path fname = getGAUSSHome() $+ "pkgs/tsmt/var_enders_trans.dat"; // Perform estimation using all variables in the file call varmaFit(fname, ".", 3 );
CONCLUSION
You have learned how:
- The TSMT functions are made available with the library statement.
- Data can be passed to TSMT functions as matrices, or as a dataset name with a formula string.