Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: From: Matthew Baker <[email protected]>


From   [email protected]
To   [email protected]
Subject   st: From: Matthew Baker <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index