Molly McPup

Introduction to Research Methods in Political Science:
The POWERMUTT* Project
(for use with SPSS)

*Politically-Oriented Web-Enhanced Research Methods for Undergraduates — Topics & Tools
Resources for introductory research methods courses in political science and related disciplines

SITE
MAP

RECODE

There are two ways to recode variables, by recoding into the same variables, and by recoding into different variables.  The latter is generally preferred, since recoding into the same variables will permanently replace the original values of the variables if the file containing the recoded variables is saved.


Recoding into Different Variables  (Note: if you have more than one variable to be recoded in the same way, you may recode them all at once.)

From the menu bar, click on “Transform,” “Recode,” and “Into Different Variables.”  Select the variable or variables you wish to recode from the left window of the dialog box, and click on the right arrow.  Select one of the variables from the right window and, under “Output Variable,” name the new variable and click on “Change.”  You may also wish to provide a label for the new variable at this time.

Optional: If you wish to carry out a recode only for certain cases, click on “If.”  This will open up a new dialog box. In the right window, type in the formula describing the cases you wish to recode.  (For example, var1 = 1 and var2 >= 3 will recode only those cases for which the value of var1 is 1 and the value of var2 is 3 or more.)  Click on “Continue.”  All cases except those specified will have the value “sysmis” for the newly created variable(s).

Click on “Old and New Values….”  In the new dialog box which is then displayed, select the old value from the left side of the box.  On the right side of the box, enter the new value and click on “Add.”  When you have recoded all values, click on “Continue,” then on “OK.”  Any values not recoded will have the value “sysmis.”

After you have created new recoded variables, you will probably want to supply labels for the values of these variables.  See “Viewing and Editing a Data File” in “SPSS: GETTING STARTED.”


Recoding into the Same Variables

From the menu bar, click on “Transform,” “Recode,” and “Into Same Variables.”  Select the variable or variables you wish to recode from the left window of the dialog box, and click on the right arrow.

Optional: If you wish to carry out a recode only for certain cases, click on “If.”  This will open up a new dialog box.  In the right window, type in the formula describing the cases you wish to recode.  (For example, var1 = 1 and var2 >= 3 will recode only those cases for which the value of var1 is 1 and the value of var2 is 3 or more.)  Click on “Continue.”  All cases except those specified will retain their original values.

Click on “Old and New Values….”  In the new dialog box which is then displayed, select the old value from the left side of the box.  On the right side of the box, enter the new value and click on “Add.”  When you have recoded all values, click on “Continue,” then on “OK.”  Any values not recoded will remain unchanged.

 


Last updated April 28, 2013 .
© 2003---2013  John L. Korey.  Licensed under a  Description: Creative Commons License Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.