Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Richard Herron <richard.c.herron@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Two way table of regression coefficients or intercepts with -esttab- |

Date |
Fri, 23 Sep 2011 10:27:59 -0400 |

-esttab- and -eststo- are from the -estout- package. http://repec.org/bocode/e/estout/index.html Thanks! On Fri, Sep 23, 2011 at 10:07, Nick Cox <njcoxstata@gmail.com> wrote: > Please remember the request to explain where user-written commands you > refer to come from. > > Nick > > On Fri, Sep 23, 2011 at 2:58 PM, Richard Herron > <richard.c.herron@gmail.com> wrote: >> Can I make a two-way table of regression coefficients with -esttab-? >> Sometimes I like to make a two-way table with either intercepts or >> coefficients and I would like to automate it. >> >> For example, here I generate three random variables, then form >> quintiles on -a- and -b-, then find the mean of -c- in each of the 25 >> groups (intersections of -a_q- and -b_q-) with -regress-. This is >> fairly easy with -table-, but is less extensible to displaying >> intercepts, significance, etc (and I am not sure how to generate a >> LaTeX table from -table-). Can I so this with -esttab- or -estout-? >> >> Thanks! >> >> * --- begin code --- >> >> * generate data >> clear >> set obs 2000 >> generate a = rnormal() >> generate b = rnormal() >> generate c = rnormal() >> >> * generate quantiles for for a and b >> xtile a_q = a, nquantiles(5) >> xtile b_q = b, nquantiles(5) >> >> * I would like something like this two-way table of means, but that is >> extensible to intercepts and/or more coefficients >> table a_q b_q, c(mean c) >> >> * but the best I can do is this very wide table that is not very readable >> eststo clear >> bysort a_q b_q: eststo: quietly regress c >> esttab, not noconstant nogap compress >> >> * --- end code --- > * > * 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/

**Follow-Ups**:**RE: st: Two way table of regression coefficients or intercepts with -esttab-***From:*"Jesper Lindhardsen" <JESLIN01@geh.regionh.dk>

**References**:**st: Two way table of regression coefficients or intercepts with -esttab-***From:*Richard Herron <richard.c.herron@gmail.com>

**Re: st: Two way table of regression coefficients or intercepts with -esttab-***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**Re: st: import .xls data into STATA** - Next by Date:
**st: problem with graph mspline, scheme(s2mono) (bug??)** - Previous by thread:
**Re: st: Two way table of regression coefficients or intercepts with -esttab-** - Next by thread:
**RE: st: Two way table of regression coefficients or intercepts with -esttab-** - Index(es):