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]

Re: st: Esttab - indicate whether control variables are included


From   Laura Sunder-Plassmann <[email protected]>
To   [email protected]
Subject   Re: st: Esttab - indicate whether control variables are included
Date   Thu, 28 Feb 2013 11:33:02 -0600

Hm, this just won't work for me, bizarre. What version of Stata are
you using? I'll try to replicate it on a different version. Thanks for
your help!

On Thu, Feb 28, 2013 at 10:48 AM, Richard Herron
<[email protected]> wrote:
> (And, thanks! That's a neat trick to put strings in the footer!)
>
> On Thu, Feb 28, 2013 at 11:47 AM, Richard Herron
> <[email protected]> wrote:
>> Sorry. Now I understand. The following works for me.
>>
>> *****
>> sysuse auto, clear
>> eststo clear
>> eststo: quietly regress price mpg foreign
>> estadd local hasrep "No"
>> eststo: quietly regress price mpg foreign i.rep78
>> estadd local hasrep "Yes"
>> esttab, drop(*rep78*) scalars("hasrep rep dummies")
>> ******
>>
>> On Thu, Feb 28, 2013 at 11:34 AM, Laura Sunder-Plassmann
>> <[email protected]> wrote:
>>> Thanks, yes, this works, but it treats the row indicating my controls
>>> as part of the regressors (middle of the table). I would ideally like
>>> it in the footer. Scalar seems to accept strings at least to the
>>> extent that it labelled my row correctly, it just did not fill in the
>>> columns.
>>>
>>> On Thu, Feb 28, 2013 at 10:27 AM, Richard Herron
>>> <[email protected]> wrote:
>>>> Try this:
>>>>
>>>> ****
>>>> sysuse auto
>>>> eststo clear
>>>> eststo: quietly regress price mpg foreign
>>>> estadd local hasrep "No"
>>>> eststo: quietly regress price mpg foreign i.rep78
>>>> esttab, indicate("Repair Dummies = *rep78*")
>>>> ****
>>>>
>>>> I use the -indicate()- option rather than generating a scalar (which I
>>>> don't think accepts strings).
>>>>
>>>> Also, depending on which Stata version you use, you can specify repair
>>>> indicators on the fly as -i.rep78- without the -xi:- prefix, although
>>>> this code still works if you add back the -xi- prefix.
>>>>
>>>> On Thu, Feb 28, 2013 at 10:52 AM, Laura Sunder-Plassmann
>>>> <[email protected]> wrote:
>>>>> Hi
>>>>>
>>>>> I want to use esttab (and estadd) to print regression output with rows
>>>>> at the footer indicating whether I have used time and/or group fixed
>>>>> effects. The example here
>>>>> http://repec.org/bocode/e/estout/advanced.html#advanced006 does
>>>>> exactly what I need, but I can't replicate it. This is the code:
>>>>>
>>>>> .sysuse auto
>>>>> .eststo: quietly regress price mpg freign
>>>>> .estadd local hasrep "No"
>>>>> .eststo: xi: quietly regress price mpg foreign i.rep78
>>>>> .estadd local hasrep "Yes"
>>>>> .esttab, drop(_Irep78*) scalars("hasrep rep dummies")
>>>>>
>>>>> This should produce a regression table with a row entitled "rep
>>>>> dummies" last below the observation count row, with the columns saying
>>>>> "No" and "Yes" respectively. Except the columns come out blank when I
>>>>> run this, only the row title is there. I checked that the local macros
>>>>> are not empty.
>>>>>
>>>>> Any ideas what I am doing wrong?
>>>>>
>>>>> (There is another example on the website, just above the one I am
>>>>> looking at, that prints a fixed effects indicator as a row in the main
>>>>> table rather than at the bottom together with the number of
>>>>> observations. I can replicate that example, but I want the indicators
>>>>> to appear in the footer.)
>>>>>
>>>>> Thank you
>>>>> Laura
>>>>> *
>>>>> *   For searches and help try:
>>>>> *   http://www.stata.com/help.cgi?search
>>>>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
>>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> On Thu, Feb 28, 2013 at 11:34 AM, Laura Sunder-Plassmann
>> <[email protected]> wrote:
>>> Thanks, yes, this works, but it treats the row indicating my controls
>>> as part of the regressors (middle of the table). I would ideally like
>>> it in the footer. Scalar seems to accept strings at least to the
>>> extent that it labelled my row correctly, it just did not fill in the
>>> columns.
>>>
>>> On Thu, Feb 28, 2013 at 10:27 AM, Richard Herron
>>> <[email protected]> wrote:
>>>> Try this:
>>>>
>>>> ****
>>>> sysuse auto
>>>> eststo clear
>>>> eststo: quietly regress price mpg foreign
>>>> estadd local hasrep "No"
>>>> eststo: quietly regress price mpg foreign i.rep78
>>>> esttab, indicate("Repair Dummies = *rep78*")
>>>> ****
>>>>
>>>> I use the -indicate()- option rather than generating a scalar (which I
>>>> don't think accepts strings).
>>>>
>>>> Also, depending on which Stata version you use, you can specify repair
>>>> indicators on the fly as -i.rep78- without the -xi:- prefix, although
>>>> this code still works if you add back the -xi- prefix.
>>>>
>>>> On Thu, Feb 28, 2013 at 10:52 AM, Laura Sunder-Plassmann
>>>> <[email protected]> wrote:
>>>>> Hi
>>>>>
>>>>> I want to use esttab (and estadd) to print regression output with rows
>>>>> at the footer indicating whether I have used time and/or group fixed
>>>>> effects. The example here
>>>>> http://repec.org/bocode/e/estout/advanced.html#advanced006 does
>>>>> exactly what I need, but I can't replicate it. This is the code:
>>>>>
>>>>> .sysuse auto
>>>>> .eststo: quietly regress price mpg freign
>>>>> .estadd local hasrep "No"
>>>>> .eststo: xi: quietly regress price mpg foreign i.rep78
>>>>> .estadd local hasrep "Yes"
>>>>> .esttab, drop(_Irep78*) scalars("hasrep rep dummies")
>>>>>
>>>>> This should produce a regression table with a row entitled "rep
>>>>> dummies" last below the observation count row, with the columns saying
>>>>> "No" and "Yes" respectively. Except the columns come out blank when I
>>>>> run this, only the row title is there. I checked that the local macros
>>>>> are not empty.
>>>>>
>>>>> Any ideas what I am doing wrong?
>>>>>
>>>>> (There is another example on the website, just above the one I am
>>>>> looking at, that prints a fixed effects indicator as a row in the main
>>>>> table rather than at the bottom together with the number of
>>>>> observations. I can replicate that example, but I want the indicators
>>>>> to appear in the footer.)
>>>>>
>>>>> Thank you
>>>>> Laura
>>>>> *
>>>>> *   For searches and help try:
>>>>> *   http://www.stata.com/help.cgi?search
>>>>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index