Command Reference : Matrix Language : Matrix Views and Procs
Matrix Views and Procs
Matrix Graph and Statistics Views
Matrix Input and Output
The individual object descriptions list the various views and procs for the various matrix objects. Listings are available for matrices (“Matrix”), vectors (“Vector”), symmetric matrices (“Sym”), rowvectors (“Rowvector”), and coefs (“Coef”).
Matrix Graph and Statistics Views
All of the matrix objects, with the exception of the scalar object, have windows and views. For example, you may display line and bar graphs for each column of the matrix Z:
Each column will be plotted against the row number of the matrix.
Additionally, you can compute descriptive statistics for each column of a matrix, as well as the correlation and covariance matrix between the columns of the matrix:
By default, EViews performs listwise deletion by column when computing correlations and covariances, so that each group of column statistics is computed using the largest possible set of observations.
The full syntax for the commands to display and print these and other views is provided in the reference for the specific object (e.g., matrix, sym) Object Reference.
Matrix Input and Output
EViews provides you with the ability to read and write files directly from matrix objects using the read and write procedures.
You must supply the name of the source file. If you do not include the optional path specification, EViews will look for the file in the default directory. The input specification follows the source file name. Path specifications may point to local or network drives. If the path specification contains a space, you must enclose the entire expression in double quotes “”.
In reading from a file, EViews first fills the matrix with NAs, places the first data element in the “(1,1)” element of the matrix, then continues to read the data by row or by column, depending upon the options set.
The following command reads data into MAT1 from an Excel file CPS88 in the network drive specified in the path directory. The data are read by column, and the upper left data cell is A2.,s=sheet3) "\\net1\dr 1\cps88.xls"
To read the same file by row, you should use the t” option:,t,s=sheet3) "\\net1\dr 1\cps88.xls"
To write data from a matrix, use the write keyword, enter the desired options, then the name of the output file. For example:
mat1.write mydt.txt
writes the data in MAT1 into the ASCII file “Mydt.TXT” located in the default directory.
There are many more options for controlling reading and writing of matrix data; “Basic Data Handling” offers extensive discussion. See also the descriptions for the matrix procs Matrix::read and Matrix::write