Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Best way to export a simple Stata model


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Best way to export a simple Stata model
Date   Sat, 11 Feb 2012 22:48:47 -0500

Unfortunately my colleague does not have Stata. I managed to code most
of it up by hand, but in order to calculate the standard error of the
forecast, I need to export a matrix from mata to a csv or text file.
Suppose I do the following:

sysuse auto;
putmata X = (1 mpg);
mata;
M = invsym(X'*X);
end;

Is there a way to make M symmetric and export it? I tried using
user-written mat2txt and mat2csv, but I am getting the following
error:

mat2txt, m(M) saving(matrix_M.txt) replace;
M not found

Any suggestions?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index