Statalist


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

Re: st: AW: omit regression coefficients in output


From   Ben Jann <ben.jann@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: omit regression coefficients in output
Date   Mon, 20 Apr 2009 21:26:12 +0200

Or how about this:

prog myesttab
    capt _on_colon_parse `0'
    if _rc==0 {
        local 0 `"`s(before)'"'
        quietly `s(after)'
    }
    syntax [, Level(cilevel) * ]
    local t = cond(e(df_r)<., "t", "z")
    _coef_table_header
    esttab ., cells(( ///
        b(label(Coef.)) ///
        se(label(Std. Err.)) ///
        t(fmt(2) label(`t')) ///
        p(fmt(3) label(P>|`t'|)) ///
        ci(label([`level'% Conf. Interval]) ///
            par("{ralign 12:" "}{ralign 12:" "}")) ///
        )) ///
        modelwidth(11 11 8 7 24) ///
        level(`level') nonumber nomtitles noobs ///
        `options'
end

You could use it as before, e.g.

  sysuse auto, clear
  quietly xi: reg price mpg weight i.rep78
  myesttab, indicate(rep78=_Irep78*)

but you could also type:

  myesttab, indicate(rep78=_Irep78*): xi: reg price mpg weight i.rep78

ben

On Mon, Apr 20, 2009 at 9:11 PM, Ben Jann <ben.jann@gmail.com> wrote:
> Try this:
>
> prog myesttab
>    syntax [, Level(cilevel) * ]
>    local t = cond(e(df_r)<., "t", "z")
>    _coef_table_header
>    esttab ., cells(( ///
>        b(label(Coef.)) ///
>        se(label(Std. Err.)) ///
>        t(fmt(2) label(`t')) ///
>        p(fmt(3) label(P>|`t'|)) ///
>        ci(label([`level'% Conf. Interval]) ///
>            par("{ralign 12:" "}{ralign 12:" "}")) ///
>        )) ///
>        modelwidth(11 11 8 7 24) ///
>        level(`level') nonumber nomtitles noobs ///
>        `options'
> end
>
> sysuse auto, clear
> quietly xi: reg price mpg weight i.rep78
> myesttab, indicate(rep78 = _Irep78*)
> myesttab, drop(_Irep78*)
>
>
> ben
>
> On Mon, Apr 20, 2009 at 6:49 PM, John Bunge <jota.be@web.de> wrote:
>> in order to stop speculations:
>>
>> - my model includes dozens of variables
>> - i cannot exclude the coeffients i want to omit by xtreg or areg as they are not dummies
>> - no, my intention is not to suppress relevant results in publications, i just want to compress tables i am looking at in order to keep track of the most relevant coefficient
>>
>> thanks for all suggestions!
>>
>>
>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: "Maarten buis" <maartenbuis@yahoo.co.uk>
>>> Gesendet: 20.04.09 18:33:27
>>> An: statalist@hsphsun2.harvard.edu
>>> Betreff: RE: st: AW: omit regression coefficients in output
>>
>>
>>>
>>> --- John Bunge wrote:
>>> > i was however wondering if there is a way to omit
>>> > coefficients in the standard regression output
>>> > table in stata's output window
>>>
>>> This type of request sometimes comes about when
>>> people actually want to do a fixed effects
>>> regression, i.e. want to suppress person/
>>> state/company/etc. dummies. If that is the,
>>> than case you should look at -xtreg-.
>>>
>>> -- Maarten
>>>
>>> -----------------------------------------
>>> Maarten L. Buis
>>> Institut fuer Soziologie
>>> Universitaet Tuebingen
>>> Wilhelmstrasse 36
>>> 72074 Tuebingen
>>> Germany
>>>
>>> http://home.fsw.vu.nl/m.buis/
>>> -----------------------------------------
>>>
>>>
>>>
>>>
>>> *
>>> *   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/
>>
>

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