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: Compare regression outputs of different models


From   iank131 <[email protected]>
To   [email protected]
Subject   st: Compare regression outputs of different models
Date   Thu, 11 Aug 2011 15:15:32 +0800

Hello,

I am still new to Stata and StataList. I am using Stata10. I have two questions:

1. I am running a robust regression (rreg) and have several but
slightly different models to run on the same data set. I want to
compare the different models by lining them up vertically side by
side, but Stata gives the output model by model and then you need to
cut and paste the desired details from this output to another
application. However, I would like to find a quick way to save these
outputs and then generate a table in Stata in which I can see the see
the coefficients of each independent variable, their corresponding
standard errors below (not beside) the coefficient, and a star or
stars next to the coefficient if its significance is below say 10%,
5%, 1%, etc. Please see my example below.

2. How do you get stata to automatically calculate the r-squared and
adjusted r-squared after running rreg? It seems you need to manually
calculate it because there is no option for it in the command. I would
also like to save this in my generated table described above.

For example:

use auto
* Model 1
rreg price mpg weight, nolog
* Model 2
rreg price mpg weight length, nolog
* Model 3
rreg price mpg weight length foreign, nolog

My desired output in one table generated by Stata is:

price                        Model 1                Model 2
         Model 3

mpg                        -50.5272               -48.0738
      -23.87354
                               (41.58937)            (40.42094)
        (65.77032)

weight                    .1032098              -1.014287*
    3.28141***
                              ( .3095952)            (.5621602)
        ( .9267939  )

length                                                    37.41137*
             -27.0968

(19.12697)                (30.63898)

foreign
                     3346.348***

                          (597.8505 )

_cons                    5747.529***            1996.01
   480.0023
                             (1736.373)             (2836.495)
        (4781.245)

r-squared                   x                            xx
                    xxx

adj r-squared             y                            yy
                    yyy

* p<.1
** p<.05
*** p< .01

I appreciate any help you can give me.

Thanks,

Ian Kwan
PhD Candidate
University of Navarra

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