MatLab MAT Files

 

Introduction  Previous page  Next page

 

 

MatLab's MAT files are in many circumstances the best choice of input files for SVAR. They are small and load quickly. However, SVAR requires a particular organization of the data in a MAT file to read it properly.

 

Like in an Excel spreadsheet, MAT files can contain several "sheets" called fields. To inform SVAR about which fields are available, a field named sheets must appear in the MAT file. This field may contain a text string, e.g.,

 

endogenous exogenousi1 exogenousi0 deterministic

 

which SVAR uses to set up a selection dialog from which you can select which sheet to use. The names you give in the sheets field must be the same as the names for the fields containing the data structures in the MAT file. Alternatively, you can let the field sheets be a cell array, i.e., an array with cells where each cell (in this case) is a string containing a unique name corresponding to the name of a field under which a data structure is located.

 

Once the "sheet" has been selected, SVAR assumes that the sheet name is equal to the name of a field. This field is a data structure, where the structure has fields named data and names. The latter field is optional. For example, suppose you've selected a sheet named endogenous for your endogenous variables. Then SVAR will look for the time series observations under endogenous.data in the MAT file and the names for the endogenous variables under endogenous.names.

 

To find the dates for the observations SVAR will look for a field with the name dates. The dates data should be organized in a similar way as for text files. The actual dates data can either be a text string matrix or a cell array with string cells containing text data such as 1982Q4.