Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Transfer scalars into table


From   "Mentzakis, Emmanouil" <e.mentzakis@abdn.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Transfer scalars into table
Date   Thu, 14 Feb 2008 14:02:40 -0000

Dear all, 
 
Within a loop a number of scalars are created (as in the exmple below).
How can I put them in a table and export it to a word file?

 
***********                   
* example *                   
***********                   
clear                                              
sysuse auto                   
global vars "foreign weight length"                   
                   
reg price $vars                   
foreach x of global vars {                   
  scalar `x'_log = _b[`x']                   
  dis "`x'_log=" "     " `x'_log                   
}                   
                   
Thank you 
Manos

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index