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

st: RE: Reporting Multiple Models In A Single Table


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Reporting Multiple Models In A Single Table
Date   Mon, 8 Mar 2004 23:08:28 -0000

Patrick McLeod 
 
> I have a question regarding reporting the estimation results 
> of multiple models in a single table. Say I have four 
> different models I estimate using -regress-. I store each of 
> these models after estimation using -est store modelx- where 
> x=1 through 4 for each of my four models.
> 
> Is there a way I can integrate each of these model's 
> estimation reports (the F, Prob > F, # of obs., R^2, root 
> MSE, and independent variable statistics) into a single table 
> of output using the four stored models and the -tabulate- or 
> -tabstat- command?
> 
> Or do I need to just whip up a table in Open Office (or 
> Microsoft Word would be comparable) and type them all in by hand?

You never need to type them in by hand. The question is 
whether the alternatives are easier, as may not be the 
case for a small number of models. 

In addition to other favourites in various longitudes, one 
possibility is -makematrix- from SSC. That can't pick up 
Prob > F, as it's not an e() leftover, but it can do this,
and some more. (Naturally, control over # of dp is available.) 

. makematrix , from(e(N) e(F) e(rmse) e(r2)) rhs(headroom-gear)  : regress mpg 

                      N          F       rmse         r2
    headroom         74  14.876037  5.3033778  .17123291
       trunk         74  36.800962  4.7389945  .33824114
      weight         74  134.61824  3.4388896  .65153125
      length         74    124.327  3.5278698  .63326492
        turn         74  77.139026   4.047687  .51722898
displacement         74  71.406715  4.1277922  .49793146
  gear_ratio         74  44.068099  4.5882401  .37967451

But the most versatile alternative, ultimately, is to 
devise your own output routine with say a -foreach- loop. 

Nick 
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index