Note: If you need to recode similar values within multiple columns, use the Recode option in Cols > Standardize Attributes. See Standardize Attributes in The Column Info Window.
1.
|
2.
|
Select the Type column by clicking once on the column heading.
|
3.
|
Select Cols > Recode.
|
4.
|
In the Recode window, enter the desired values in the New Value boxes. For this example, enter Technical in the Computer row, and Drug in the Pharmaceutical row.
|
Figure 3.40 Recode Window
•
|
If the data table contains value labels, the labels appear in a column in the Recode window called New Labels. Editing the labels also modifies the Value Labels column property. You can also select Replace values with value labels to modify the data in the New Values column.
|
•
|
If you enter a non-numeric value in a column with a Numeric data type, you are prompted to convert the data type to Character. Click Yes to convert the column and display the new value. Click No to keep the column Numeric and display a missing value.
|
When you are finished recoding data, click Done to view the following options:
searches for specific values. Click the down arrow to select search options. For details about each option, see Search Filter Options for details. Note that you can type a regular expression to customize the filter.
becomes active when multiple values are selected. Click Group to make highlighted values part of the same group. If you previously edited a value before grouping, the edited value becomes the group representative in the New Value column. Otherwise, the group representative is the value that occurs most often.
removes leading and trailing whitespace characters and removes duplicate interior whitespace characters. That is, if more than one whitespace character is present, the Collapse Whitespace command replaces the two spaces with one space.
specifies point at which the items are split. For example, if you match on a comma, and the data is “first, second, third”, then First occurrence matches “second, third”. Last occurrence matches “third”.
See Example of Splitting on a Comma for an example.
enables you to customize how data is grouped. Choose from the grouping options list. See Grouping Options for Recode.
right-click selected values to select a different grouping value, or group representative. The Group To command displays the Old Values that occur most often in the data table with their corresponding New Values (if they are different). The list displays the first 8 possible group representatives.
when two values are highlighted, select Swap New Values to make the new value of the first value adopt the new value of the second value, and vice versa.
right-click a single value from a group and select Make Representative to make the selected value the New Value.
Select the following Group Similar Values commands to increase the accuracy of grouping:
1.
|
2.
|
Select the Name column.
|
3.
|
Select Cols > Recode.
|
4.
|
From the red triangle menu, select Group Similar Values.
|
5.
|
Select the Max Character Difference option and type “6”.
|
6.
|
Click OK.
|
Figure 3.41 Grouped by Character Difference
In this example, the grouped values have no more than 6 characters different between them. The values shown in the New Value column represents the grouped values in the recoded data table.
7.
|
Right-click Almond Roca and select Make Representative to change the new value to represent a different value within the group.
|
Figure 3.42 Make Representative
To remove values from a group, right-click and select Remove from Group.
8.
|
1.
|
2.
|
Select the Name column.
|
3.
|
Select Cols > Recode.
|
4.
|
From the red triangle menu, select Group Similar Values.
|
5.
|
Select the Difference Ratio option and type “.5”.
|
6.
|
Click OK.
|
Figure 3.43 Grouped by Difference Ratio
7.
|
From the red triangle menu, select Redone to save the recoded data in a new column in the data table.
|
The Aircraft Incidents.jmp sample data table contains a column of city and state names separated by a comma. You can split the values in that column on the comma and recode the column with only state names.
1.
|
2.
|
3.
|
Select Split on from the red triangle menu.
|
4.
|
5.
|
Do not change the default First occurrence setting. In these data, the state is the first occurrence after the comma.
|
6.
|
Select Text after to recode the column with only state names.
|
7.
|
Do not change the default Keep text if no match setting. You do not want to delete unmatched text.
|
8.
|
Click OK.
|
Figure 3.44 Recoded City, State Name
2.
|
Select Formula Column from the list.
|
3.
|
Click Recode.
|
4.
|
In this example, the sex column was recoded.
Figure 3.45 Recoded Column
In this example, you want to recode the gender column
Figure 3.46 Recoding the gender Column
7.
|
Figure 3.47 Replacing All Occurrences