Recode to numeric values

Data > Recode > To Numeric

Specify the columns to recode

In Recode values in the following columns, enter one or more columns that contain the values to recode. The columns must all be the same data type: numeric, date/time, or text.

Specify the method and the values

Select the method of recoding, then enter the values to recode and the recoded values.

Recode ranges of values

(Numeric or date/time source data only) Recode each range of numeric or date/time values to one numeric value. For example, you can change all values that are less than 0 to 0. Complete the following steps to specify the values to recode and the recoded values.

  1. For each range of numeric or date/time values, enter the Lower endpoint value, Upper endpoint value, and Recoded value in the table. For example, you can enter the values that are shown in the following table.
    Lower endpoint Upper endpoint Recoded value
    0 10 1
    10 100 2
    100 1000 3
    1000 999999 *
  2. For Endpoints to include, indicate how you want the values that you enter in the table to be recoded. For example, if you enter the values that are shown in the preceding table and you select Lower endpoint only, then 0 is recoded as 1, 10 is recoded as 2, and so on.

Recode individual values

Recode individual values to different individual numeric values. For example, you can change each instance of Red to 3.

To recode individual values, under Recoded value, enter the new value beside the corresponding Current value.

Recode a single value

Recode one numeric value to a different numeric value. For example, you can change each instance of -999 to a missing value (denoted by *). Complete the following steps to specify the value to recode and the recoded value.

  1. From Current value, select the value that you want to change.
  2. In Recoded value, enter the new numeric value.

Recode least frequent values

Recode the values that occur least frequently to a single value. For example, you can change the values that occur fewer than 5 times to a missing value (denoted by *). Complete the following steps to specify the values to recode and the recoded values.

  1. In Recode values into one category that occur less than this number of times, enter a number. Values that occur fewer than this number of times are recoded. For example, if you enter 5, the values that occur 4 times or fewer are recoded.
  2. In Recoded value, enter the new value (for example, *).

Recode least frequent percentage

Recode the values that occur least frequently to a single value. For example, you can change the 20% least frequent values to a missing value (denoted by *). Minitab uses the Pareto chart method to determine the values to recode. Minitab orders the values from most frequent to least frequent, then determines the cumulative percentage for each value. When the cumulative percentage surpasses the percentage that you specify, the remaining values are recoded.

Complete the following steps to specify the values to recode and the recoded values.

  1. In Recode remaining values into one category after this percent, enter a percentage. For example, if you enter 80, then each unique value after the first 80% of the unique values is recoded.
  2. In Recoded value, enter the new value (for example, *).

Specify the storage location

From Storage location for the recoded columns, select one of the following storage locations:
  • In the original columns: Replace the original columns with the recoded columns.
  • At the end of the current worksheet: Put the recoded columns after the last column that contains values in the worksheet.
  • In specified columns of the current worksheet: Put the recoded columns in the columns that you specify. In Columns, enter a column number (for example, C3) or name for each column of data to recode. If a column name has more than one word, enclose the name in single quotation marks.
  • In a new worksheet: Put the recoded columns in a new worksheet. In Name, enter a name for the new worksheet.
  • At the end of a specified worksheet: Put the recoded columns after the last column that contains values in the open worksheet that you specify. In Name, select the worksheet to put the recoded columns in.

Specify whether to show a summary table

Select Show summary table to display a summary of the executed command in the Session window.

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy