How do I correctly code to replace a value using data from a double type variable?

J

Jeff

Guest
I am trying to recode an integer variable using data from a double type variable. I cannot figure out the correct syntax. region1 is the integer variable with values between 1 and 15. regionde is the double variable with 3 letter codes in each observation. What is the proper way to code it?

I have tried a variety of different commands using both recode and replace with no success.

recode region1 .=1 if regionde=="DEF"

Continue reading...
 
Top