Bookmark and Share

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   Thu, 29 Sep 2011 11:45:29 +0100

Thanks for the reply. I didn't provide a work-around, just commentary
and some questions.

However, you do not,  I think, quite address the key question raised
by Paul, which is whether previously saved temporary variables are the
cause of the problem. You can check this easily by

d __*

before you call -egen-. If you have such variables, you should
-rename- them with permanent names (-search renvars- also for an extra
utility).

The satisfactory test with the auto dataset is consistent with Paul's
idea and indicates that your -egen- code is not corrupted  but it
doesn't amount to proof.

My guess is that upgrading to Stata 12, although naturally a good idea
otherwise, is going to make no difference, and that this problem would
recur in Stata 12 in similar circumstances.

Nick

On Thu, Sep 29, 2011 at 11:24 AM, Barry Quinn <[email protected]> wrote:
> Thanks for swift response to this and apologies for late reply.
>
> Firstly I am using Stata 11.2 which is up to date.
>
> Nick:
> Thanks for the work around for my problem
>  Your test using auto data doesn't produce the above error.
> Here are the results from the command you mentioned.
> . su insample oneyear
>
>    Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>    insample |      1525    .6557377     .475283          0          1
>     oneyear |      1525    .4754098    .4995588          0          1
>
> Paul:
> Thanks for your work around, which does work.
> The problem being that I have estimated average treatment effects for 8 outcome variables across 10 different samples.
> Which unfortunately gives me 80 datasets to first and second call in stata.
>
> I agree with Nick that this is a worrying problem and I have also tested it on an older version of stata (11.1) with the same result.
>
> Budgeting constraints mean I cannot get my school to purchase stata 12 licences at present.
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index