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 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]

Re: st: how to drop coefficients on fixed effects from the estout command


From   Ridhima Gupta <g.ridhima@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to drop coefficients on fixed effects from the estout command
Date   Sat, 18 Jun 2011 15:32:51 +0100

I have around 60 dummies. So I don't wish to type rep78_d1 rep78_d2
rep78_d3 rep78_d4..... so on 60 times. I think its better if I jst
delete them from the output. Don't you think so?

Best Wishes,
Ridhima



On Sat, Jun 18, 2011 at 3:14 PM, Joerg Luedicke
<joerg.luedicke@gmail.com> wrote:
> Using wild cards seems to work, too. And less code is needed:
>
> /*******************************************/
> sysuse auto, clear
> tab  rep78, g(rep78_d)
> reg price  mpg rep78_d1 rep78_d2 rep78_d3 rep78_d4
> est sto M1
> estout M1 using test1.txt, replace drop(rep78_d*)
> /*******************************************/
>
>
> On Sat, Jun 18, 2011 at 10:00 AM, Joerg Luedicke
> <joerg.luedicke@gmail.com> wrote:
>> It will work if you create dummies manually and then put the names of
>> those dummies into -drop()-. This itself is not nice if you have a lot
>> of dummies but it implies that you can put your dummies into a macro
>> and then put that into drop(). Consider the following example:
>>
>> /*******************************************/
>> sysuse auto, clear
>> tab  rep78, g(rep78_d)
>> ds rep78_d1 rep78_d2 rep78_d3 rep78_d4
>> global dum=r(varlist)
>> reg  price mpg $dum
>> est sto M1
>> estout M1 using test1.txt, replace drop($dum)
>> /*******************************************/
>>
>> Maybe there are other and more elegant solutions out there.
>>
>>
>> Joerg
>>
>>
>> On Sat, Jun 18, 2011 at 8:42 AM, Ridhima Gupta <g.ridhima@gmail.com> wrote:
>>> Hello,
>>>
>>> I am estimating a model controlling for village fixed effects using
>>> the i.v_id expression. I want to drop the coefficients on the village
>>> fixed effects in the estout command as I do not wish to report them. I
>>> have tried using the expression drop(i.v_id) and drop (v_id2 v_id3 so
>>> on).
>>> But I get an error saying that coefficient v_id not found.
>>>
>>> How can I successfully drop these coefficients from the output
>>> generated by estout?
>>>
>>>
>>> Thanks in advance for your help.
>>>
>>> Best Wishes,
>>> Ridhima
>>> *
>>> *   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   |   Site index