Matload loads a matrix that has been saved with matsave.
Mat save stata.
Deletion parallels missing value handling in most stata commands.
All is for use by programmers.
Select file save as.
Select file save as and select stata 12 data dta from the list of file types.
Stata s definition of a matrix includes a few details that go beyond the mathematics.
The methods discussed in this page capture all of the output that appears in the results window if you want to copy selected parts of the output the method described in how do i copy stata output and stata graphs into word.
Stata limits matrices to no more than matsize matsize which means a maximum of 800 800 for stata ic and 11 000 11 000 for stata se and stata mp.
To save a dataset for use with stata 11 or stata 12 stata 11 can load stata 12 datasets 1.
Stata does however offer ways to capture the output and save it to another file.
Here s an example that makes a 3 row 4 column matrix of beta estimates for different dependent and independent variables.
Matsave creates a stata dataset.
2save save stata dataset options for save nolabel omits value labels from the saved dataset.
Custom tables can be trickier in stata.
If filename has no extension that is no period followed by text and the value of format is not specified then matlab appends mat if filename does not include a full path matlab saves to the current folder.
Using stata mat c 2 1 5 1 3 4 5 4 2 mat lis c symmetric c 3 3 c1 c2 c3 r1 2 r2 1 3 r3 5 4 2 mat ct c mat lis ct symmetric ct 3 3 r1 r2 r3 c1 2 c2 1 3 c3 5 4 2 inverse of a matrix matrix a 4 2 2 4 6 8 2 2 4.
To stata a matrix is a named entity containing an r c 0 r matsize 0 c matsize rectangular array of double precision numbers including missing values that is bordered by a row and a column.
Name of file specified as a character vector or string scalar.
Matsave and matload are based on stata commands svmat and mkmat.
To save an unnamed dataset or an old dataset under a new name.
Type save filename in the command window.
Matsave saves a matrix from memory to disk as a stata dataset matrix dta.
The variable names correspond to the column names of matrix.
The associations between variables and value label names however are saved along with the dataset label and the variable labels.
Replace permits save to overwrite an existing dataset.
If you do not specify filename the save function saves to a file named matlab mat.
Technical note mkmat provides a useful addition to stata s matrix commands but it will work only with small datasets.