Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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 <lsunderplassmann@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Esttab - indicate whether control variables are included
Date   Thu, 28 Feb 2013 10:34:43 -0600

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
<richard.c.herron@gmail.com> 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
> <lsunderplassmann@gmail.com> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index