Code numeric to numeric data

Minitab can be used to translate or "code" a column of numbers into another column of numbers. The procedure is particularly useful for creating dummy indicator variables for the qualitative predictor variables that you'd like to include in your regression model.

minitab logoMinitab Procedure

  1. In Minitab, select Data >> Recode >>  to Numeric...  
  2. In the box labeled 'Recode values in the following columns', specify the name of the numeric variable that you want to code.
  3. In the box labeled Method, specify a method for recoding the values specified above.
  4. For instance, to recode a ranges of values, type the numeric values in the boxes labeled Lower endpoint and Upper endpoint and the Recoded Value that you want this range to represent. Make sure you do this for every possible value of the variable that you want to code. 
  5. Select OK. The new variable should appear in your worksheet.

Note: if you have more than one numeric variable to create, you have to code each one separately.


Sports Illustrated published results of a study designed to determine how well professional golfers putt. The data set puttgolf.txt contains data on the lengths of putts (x) and the percentage of successful putts (y) made by professional golfers during 15 tournaments. Only putts that were 2 to 20 feet from the hole are included in the data set. When fitting a two-piece piecewise linear regression function — connected at x = 10 — to the data, you have to create a new numeric dummy variable, say "dummy", that takes on value 0 if x ≤ 10 and 1 if x > 10. Use Minitab to code the numeric variable length into the numeric variable dummy.

Minitab Dialog Box

Minitab dialog box for coding numeric data to numeric

Resulting Minitab Worksheet

minitab worksheet

Video Review