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: _00001 already define error using egen xx=group()


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: _00001 already define error using egen xx=group()
Date   Mon, 26 Sep 2011 08:50:03 +0100

This is a very worrying kind of error message. You are getting
messages about temporary variables that could mean that not just this
calculation but much else in Stata will not work properly.

Is this Stata 12? (Statalist convention is that you are presumed to be
using the latest version unless you state otherwise.)

Show the result of

. su insample oneyear

Did you -update- your Stata recently? You may have done this
incompletely. Run -update query-.

I can't repeat your calculation without your data. Does this work properly?

clear
sysuse auto
egen group = group(foreign rep78)

On Mon, Sep 26, 2011 at 8:32 AM, Barry Quinn <b.quinn@qub.ac.uk> 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/


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