Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Problem with -recode- and temporary variables

From   Nick Cox <>
To   "''" <>
Subject   st: RE: Problem with -recode- and temporary variables
Date   Thu, 11 Nov 2010 19:32:30 +0000

I can't reproduce this in Stata 11.1. -recode- is much banged upon, so I guess the problem is in how your Stata is set up. 

. clear 

. set obs 9 
obs was 0, now 9

. gen region = _n 

. recode region (1/4 9=0 "Blue")(4/8=1 "Red"), gen(redblue) 
(9 differences between region and redblue)


. update query 


Alan Neustadtl

I am trying to recode a variable and getting an error that a temporary
variable is already defined.  I have rebooted and restarted Stata but
still get the same error message.

If anyone can shed some light I would appreciate it.  The code I am running is:

. recode region (1/4 9=0 "Blue")(4/8=1 "Red"), gen(redblue)
__000000 already defined

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index