| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: outputting formatted data to file
Steffen wrote
I'm trying to output some results to a file in formatted style.
However, it seems the only way to do this straight away is to use
binary in stead of ascii. My working but extreemly unaesthetical
solution has been this:
for strings:
file write slope_values %20s (trim("Intercept +OXi"))
for scalars:
file write slope_values %20.3f (real(string(`intercept_wOXi')))
There has to be a better way. I've been able to dig up something
about a function called 'macval()', but I haven't been able to find
anything about it in the help files (search and help doesn't turn up
anything).
If you look at the code of outtable (ssc type outtable.ado) you will
see that there is no difficulty writing ASCII formatted data to an
external file.
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/