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]

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

**References**:**st: _00001 already define error using egen xx=group()***From:*Barry Quinn <b.quinn@qub.ac.uk>

- Prev by Date:
**Re: st: _00001 already define error using egen xx=group()** - Next by Date:
**st: AUTO: Martha Hewett/MnCEE is out of the office. (returning 09/27/2011)** - Previous by thread:
**Re: st: _00001 already define error using egen xx=group()** - Next by thread:
**Re: st: _00001 already define error using egen xx=group()** - Index(es):