Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Data entry into TeX files (other than tables and graphs)


From   "Roger B. Newson" <r.newson@imperial.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Data entry into TeX files (other than tables and graphs)
Date   Mon, 31 Oct 2011 11:31:28 +0000

This can be done using the -parmest- and -listtab- packages, both downloadable from SSC. Another possibility is to use the -estout- package, which you can also download from SSC. I would check the on-line help for these packages to see which does what you want.

I hope this helps.

Best wishes

Roger


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

On 30/10/2011 01:56, Richard Herron wrote:
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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index