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: saving regress results and variable names i.var#i.var


From   "Benhoen2" <[email protected]>
To   <[email protected]>
Subject   st: saving regress results and variable names i.var#i.var
Date   Sun, 3 Oct 2010 23:25:33 -0400

once again, back for some advice...a novice stata user...very thankful for
this listserve...

I want to save regress results to a new stata dataset that I can use in
later calculations.  The reg command contained i.var#i.var in the
independent variable list and produced a 1x4314 e(b) matrix of coefficients.
(FYI this regression took 2 hours to produce and so I am trying carefully to
save off this output before it is gone forever.  I HAVE created a log with
the output so, worst comes to worst, I figure I can convert the log to a
usable excel sheet to the re-import back into stata - granted not a very
elegant solution.)

Specifically, I need to save the results from the interaction (though the
other results can come with it too) into a new matrix and NEED to include
the variable names as shown in the output.  I will be using these names to
create new variables in the new dataset.  The dataset has 105501 cases.  I
have experimented with matsave and keep getting an error.  Here is the
syntax I used:

reg lasp2 acre sqft_1000 ages2 i.blkgrp#i.pv, vce(r)
mat def rpvbg=e(b)
matsave rpvbg, replace p("matrices") saving 

this returns the following output in the results window:

". matsave rpvbg, p("matrices") saving
data in memory will be removed temporarily, and restored later
Press any key to continue, or Break to abort
data in memory restored
error (before svmat was applied)
invalid syntax
r(198);"

*FYI: the dir "matrices" IS defined in the working directory
*FYI2:  I am running Stata SE 11.1, Windows 7, 64 bit.

So the questions are:
1) Is the matsave command the RIGHT command to save these results? 
2) Will it save the variable names as well as the coefficient values?  If
not how can I do this.
3) Why am getting this error?

Thank you, in advance,

Ben

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index