Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: __0000004 already defined - error?


From   Johannes Geyer <[email protected]>
To   [email protected]
Subject   st: __0000004 already defined - error?
Date   Wed, 28 Nov 2007 11:07:10 +0100

Dear Statalist,

I have a problem with an error seemingly due to an internal Stata variable 
(Version: Intercooled 9.2). I have a do file that reads:

/********************************************************/
#d;

use DATA, clear;

local varlist var1 var2 var3; 
foreach money of local varlist {;
replace `money'    = `money'/0.939      if  year == 1995;
replace `money'    = `money'/0.953      if  year == 1996;
replace `money'    = `money'/0.971      if  year == 1997;
replace `money'    = `money'/0.98       if  year == 1998;
replace `money'    = `money'/0.986      if  year == 1999;
replace `money'    = `money'/1.02       if  year == 2001;
replace `money'    = `money'/1.034      if  year == 2002;
replace `money'    = `money'/1.045      if  year == 2003;
replace `money'    = `money'/1.062      if  year == 2004;
};

tab var1 if var2 > 0 & var2 != .;
tab var1 if var3 == .;

replace var1 = l.var1 if var1 == . & var4 < 5;
replace var1 = f.var1 if var1 == . & var4 < 5;
replace var1 = l2.var1 if var1 == . & var4 < 5;
replace var1 = f2.var1 if var1 == . & var4 < 5;

tab var4 if var1 > 0 & var1 != .;
tab var4 if var1 == .;

   gen var5  = var6 *  var7;
   replace var5 = 0 if var5 < 0 | var5 == .;

   gen var8 = var1 * var7;
   replace var8 = 0 if var8 < 0 | var8 == .;

compare var5 var8;
__000004 already defined
r(110);
/***********************/

Here the do file stops - do you have any idea why this happens?

Thank you,
best regards

Johannes


----------------------
Johannes Geyer
Deutsches Institut f�r Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research 
Department of Public Economics
DIW Berlin
Mohrenstra�e 58
10117 Berlin
Tel: +49-30-89789-258

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index