Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: "estimates table" output in Latex


From   "Patrick McLeod" <[email protected]>
To   <[email protected]>
Subject   Re: st: "estimates table" output in Latex
Date   Tue, 06 Apr 2004 20:27:03 -0500

I think it would look something like this:

clear;
#delimit ;
set obs 100;
quietly {;
gen x1=uniform(); gen x2=uniform(); gen x3=uniform();
gen y=1+x1+x2+x3+invnorm(uniform());
regress y x1;        estimates store model1;
regress y x1 x2 ;    estimates store model2;
regress y x1 x2 x3 ; estimates store model3;
};
tempfile model1 model2 model3;
parmby "reg y x1", lab saving(model1, replace) idn(1) ids(unadjusted);
parmby "reg y x1 x2", lab saving(model2, replace) idn(2) ids(unadjusted);
parmby "reg y x1 x2 x3", lab saving(model3, replace) idn(3) ids(unadjusted);
dsconcat model1 model2 model3;
list parm estimate stderr t min95 max95;
listtex idnum parm label estimate stderr t min95 max95 using example1.tex, rstyle(tabular) replace;

I just cobbled this together on the fly so it doesn't look too pretty in LaTeX, but I think it would be easy enough fix up. I'm working with a table with 5 equations in it right now so this topic is of interest to me as well.

Regards,

Patrick McLeod
University of North Texas
Academic Computing Services

>>> [email protected] 04/06/04 05:24PM >>>
Roger,

Thanks for your response.  I am familiar with parmest and had a look at
your paper, but it isn't clear to me how to use these commands to produce
output equivalent to "estimates table," at least without having to jump
through a lot of hoops.  If you don't mind, perhaps you could demonstrate
how to use this approach to generate output roughly equivalent to that
produced by the "est table" command in the following simple example?

---
#delimit ;
set obs 100;
quietly {;
gen x1=uniform(); gen x2=uniform(); gen x3=uniform();
gen y=1+x1+x2+x3+invnorm(uniform());
regress y x1;        estimates store model1;
regress y x1 x2 ;    estimates store model2;
regress y x1 x2 x3 ; estimates store model3;
};

estimates table model1 model2 model3, stats(r2 F aic) b(%8.2f) se(%8.2f) ;
---



Cheers, Chris.

Chris Auld
Department of Economics
University of Calgary
[email protected] 


*
*   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/


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index