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]

From |
iank131 <iank131@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Compare regression outputs of different models |

Date |
Thu, 11 Aug 2011 17:11:25 +0800 |

Many thanks Maarten! Very helpful indeed. That was my first StataList post. Very fast response indeed. Thanks again, Ian. On Thu, Aug 11, 2011 at 3:47 PM, Maarten Buis <maartenlbuis@gmail.com> wrote: > On Thu, Aug 11, 2011 at 9:15 AM, iank131 wrote: >> 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 <snip> 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. >> >> 2. How do you get stata to automatically calculate the r-squared and >> adjusted r-squared after running rreg? > > There exist within Stata several user written solutions for this type > of problem. I like -estout- written by Ben Jann, in particular because > of the very extensive set of examples available from > <http://repec.org/bocode/e/estout/>. You can get that program by > typing in Stata -ssc install estout-. The basic trick is to prefix > your estimation commands with -eststo :- to store these models, and > than display them using -esttab-. The R-squared and adjusted R-squared > are not displayed in the output but they returned by -rreg-, in e(r2) > and e(r2_a), so programs like -estout- can access and display them. > > *--------------------- begin example ----------------------- > eststo clear > > sysuse auto, clear > * Model 1 > eststo: rreg price mpg weight > * Model 2 > eststo: rreg price mpg weight length > * Model 3 > eststo: rreg price mpg weight length foreign > > esttab > > // adding R^2 and adj. R^2 > esttab , r2 ar2 > > // you can also include this table in your article/paper > // e.g. -rtf- function creates an .rtf file which can be > // read in all/most versions of M$ Word. > esttab using "c:/temp/foo", r2 ar2 rtf replace > *---------------------- end example ------------------------- > (For more on examples I sent to the Statalist see: > http://www.maartenbuis.nl/example_faq ) > > Hope this helps, > Maarten > > -------------------------- > Maarten L. Buis > Institut fuer Soziologie > Universitaet Tuebingen > Wilhelmstrasse 36 > 72074 Tuebingen > Germany > > > http://www.maartenbuis.nl > -------------------------- > * > * 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/

**References**:**st: Compare regression outputs of different models***From:*iank131 <iank131@gmail.com>

**Re: st: Compare regression outputs of different models***From:*Maarten Buis <maartenlbuis@gmail.com>

- Prev by Date:
**Re: st: output ttest using esttab** - Next by Date:
**Re: st: output ttest using esttab** - Previous by thread:
**Re: st: Compare regression outputs of different models** - Next by thread:
**st: output ttest using esttab** - Index(es):