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]

st: From: Matthew Baker <matthew.baker@hunter.cuny.edu>


From   owner-statalist@hsphsun2.harvard.edu
To   statalist@hsphsun2.harvard.edu
Subject   st: From: Matthew Baker <matthew.baker@hunter.cuny.edu>
Date   Thu, 1 Nov 2012 11:21:38 -0400

Dear Listers --

For various reasons, I am trying to pull matrices from mata into
stata, and then quickly (and perhaps a bit haphazardly) display and
store them as estimation results. My hope is that this can be done
without having to write an entire estimation command, as the matrices
are rather large and clumsy. Anyways, here is a little code that shows
what I am trying to do:

/* begin example */
clear all
mata:
b=1,2,3
V=I(3)
st_matrix("b",b)
st_matrix("V",V)
end
mat colnames b=b1 b2 b3
mat colnames V=b1 b2 b3
mat rownames V=b1 b2 b3
ereturn post b V
ereturn display
est store basemodel

/* end example */

While all the commands work up until the last one, the last command
gives me an error:

last estimation results not found, nothing to store
r(301);

To elaborate, the idea is to trick stata into thinking it has produced
estimation results so I can use estout, etc. to make nice tables and
things from the matrices. Any advice?

Thanks!

Matt Baker

--
Dr. Matthew J. Baker
Department of Economics
Hunter College and the Graduate Center, CUNY
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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