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: Data entry into TeX files (other than tables and graphs)


From   Richard Herron <[email protected]>
To   [email protected]
Subject   st: Data entry into TeX files (other than tables and graphs)
Date   Sat, 29 Oct 2011 21:56:40 -0400

Can I save estimate parameters to a text file so that I can enter them
into a TeX file using \input{}? That is, I want to add the number of
observations or regression coefficients -- e(N) or e(b) -- in the text
of a paper without having to cut and paste. (I already know how to add
tables and graphs.)

I can save a specific value to file with -outfile-.

*begin code
sysuse auto, clear
outfile mpg using temp in 1/1, replace noquote
*end code

But I can't save estimate results.

*more code
regress mpg rep78
display e(N)
outfile e(N) using temp2, replace noquote
*end more code

The last line gives the following error.

factor variables and time-series operators not allowed
r(101);

Is there a away to script all data entry into TeX files? Or do I have
to cut and paste? Thanks!
*
*   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