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]

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


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: Problem with -recode- and temporary variables
Date   Thu, 11 Nov 2010 19:44:00 +0000

Not the question, but 4 is both Blue and Red? 

Nick 
[email protected] 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: 11 November 2010 19:33
To: '[email protected]'
Subject: st: RE: Problem with -recode- and temporary variables

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)

Try 

. update query 

Nick 
[email protected] 

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
r(110);

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

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