Recode Values of Variable Dialog Box

You can access Recode Values of Variable dialog box in the following ways:
  • Ribbon bar. Select the Data tab. In the Transformations group, click Recode to display the Recode Values of Variable dialog box.
  • Classic menus. On the Data menu, select Recode to display the Recode Values of Variable dialog box.
Option Description
Category Use the options in the Category group boxes to specify a recode category. You can use up to 256 categories to recode a variable.
Include/Exclude cases When you choose Include cases, the case number (or range of case numbers) that you type into the blank Category line will replace the original values with your specifications. Exclude cases will replace the original values for cases (observations) that are not included in the case number (or range of case numbers) with the New Value that you have specified.
Include/Exclude if When you choose Include if and the recode condition evaluates to true, the original values of the recoded variable for cases (observations) that meet the condition are replaced with the New Value (see below) that you have specified. Exclude if assigns the New Value to the original values for cases (observations) that do not meet the specified recode condition.
Recode condition Specify the recode condition in the blank Category line following the standard Statistica case selection conditions syntax summary.
  • Operators: =, <>, <, >, <=, >=, NOT, AND, OR
  • Variable Names: Specify either variable numbers (e.g., v1, v2, v3, . . . ) or variable names (e.g., GENDER, Date, time, . . .)
  • Examples: v1=0 OR v2>=0; (v1<1 OR v9='YES' ) AND v4<>0
Note: Be sure to use single quotation marks to reference the text values of variables, example, 'Yes'.
New Value Use the options in the New Value group box to specify the value to replace the original value(s).
value Select the value option button to specify a specific value as the new value.
MD code Select the MD code option button to specify the missing data value as the new value.
Open Click the Open button to display the Open Conditions dialog box, from which you can select a file (containing all of the recode categories) to open into the Recode Values of Variables dialog box. Files opened from this dialog box are text files with the file name extension *.txt.
Save As Click the Save As button to display the Save Recode Conditions dialog box, from which you can save the current condition in each Category to a file. The files can be saved as Rules Files (*.srx), Configuration Files (*.ini), or Text Files (*.txt).
Other Use the options in the Other group box if no conditions are met by a case (observation) when the variable is recoded.
MD code Select the MD code option button to set the original value of that case to the missing data value.
value Select the value option button to set the original value of that case to a specific value.
unchanged Select the unchanged option button to leave that case as the original value.
OK After making your selections, click the OK button.
Cancel Click the Cancel button to close this dialog box. Any selections made will be disregarded.