# Create interaction variables

Create interaction variablesIn order to enter interaction terms into a regression model in Minitab, you have to first create column(s) in the worksheet that contain the interaction term(s).

### Minitab Procedure

- Select
**Calc**>>**Calculator...** - In the box labeled
**Store the result in variable**, specify the column (or the name of the new variable,*x1x2*, for example) in which you want to store the interaction term. - In the box labeled
**Expression**, multiply the two predictor variables that go into the interaction terms. For example, if you want to create an interaction between*x1*and*x2*, use the calculator to multiply them together: '*x1*'*'*x2*'. - Select
**OK**. The new variable,*x1x2*, should appear in your worksheet.

### Example

The data set birthsmokers.txt contains data on the birthweight (*y* = *Wgt*), gestation length (*x*_{1} = *Gest*) and (*x*_{2} = *Smoke*, 1 if mother smoked, 0 if not) of babies born to 32 mothers. If you wanted to fit a multiple regression model that allowed for an interaction between gestation length and smoking, you'd first have to create a variable in your worksheet, *GestSmoke* say, that contained the interaction term. Use Minitab's calculator to create the interaction term in your worksheet.