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: _00001 already define error using egen xx=group()
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: _00001 already define error using egen xx=group()
Date
Mon, 26 Sep 2011 09:47:41 +0100
An easy way to exclude B == 0 & D == 0 is
... if !(B == 0 & D == 0)
but this problem should still be fixed as soon as possible.
Nick
On Mon, Sep 26, 2011 at 8:32 AM, Barry Quinn <[email protected]> wrote:
>
> I have been running the egen xx= group() command to produce coding which allows me to choose 3 of the four possible pairs when combining two binary variables.
> Recently the above error has started to appear.
>
> Example:
>
> Say I have two binary variables D(0,1) & B(0,1)
> I want to run a command choosing the groups (D=0 & B=1) , (D=1 & B=0) , (D=1 & B=1) and not the group (D=0 & B=0).
> I find the egen group() command does this well by creating a variable from 1 to 4 for each possible combination of the two binary variables and then I run my command using
> ......if xx>1
>
> My problem is when I run this command I get the error
> __000000 already defined
> __000001 already defined
>
> For reference here is the full code I am running and the resultant error:
>
> .clear
> . use panelcleanappend
> . capture drop w
> . gen w=runiform()
> . sort treat w
> . capture drop insample
> . gen insample=_n<=1000
> . drop id1
> . egen id1=group(insample oneyear)
> __000000 already defined
> __000001 already defined
>
> Any help with this error or a possible another way to choose the above groups would be appreciated
>
*
* 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/