# Minitab Help 5: Multiple Linear Regression

Minitab Help 5: Multiple Linear Regression##
Minitab^{®}

### IQ and physical characteristics

- Create a simple matrix of scatter plots.
- Perform a linear regression analysis of PIQ on Brain, Height, and Weight.
- Click "Options" in the regression dialog to choose between Sequential (Type I) sums of squares and Adjusted (Type III) sums of squares in the Anova table.

### Underground air quality

- Create a simple matrix of scatter plots.
- Select Graph > 3D Scatterplot (Simple) to create a 3D scatterplot of the data.
- Perform a linear regression analysis of Vent on O2 and CO2.
- Click "Options" in the regression dialog to choose between Sequential (Type I) sums of squares and Adjusted (Type III) sums of squares in the Anova table.

### Soapsuds example (using matrices)

- Perform a linear regression analysis of suds on soap.
- Click "Storage" in the regression dialog and check "Design matrix" to store the design matrix, X.
- To create \(X^T\): Select Calc > Matrices > Transpose, select "XMAT" to go in the "Transpose from" box, and type "M2" in the "Store result in" box.
- To calculate \(X^{T} X\): Select Calc > Matrices > Arithmetic, click "Multiply," select "M2" to go in the left-hand box, select "XMAT" to go in the right-hand box, and type "M3" in the "Store result in" box. Display the result by selecting Data > Display Data.
- To calculate \(X^{T} Y\): Select Calc > Matrices > Arithmetic, click "Multiply," select "M2" to go in the left-hand box, select "suds" to go in the right-hand box, and type "M4" in the "Store result in" box. Display the result by selecting Data > Display Data.
- To calculate \(\left(X^{T}X\right)^{-1} \colon \) Select Calc > Matrices > Invert, select "M3" to go in the "Invert from" box, and type "M5" in the "Store result in" box. Display the result by selecting Data > Display Data.
- To calculate b = \(\left(X^{T}X\right)^{-1} X^{T} Y \colon \) Select Calc > Matrices > Arithmetic, click "Multiply," select "M5" to go in the left-hand box, select "M4" to go in the right-hand box, and type "M6" in the "Store result in" box. Display the result by selecting Data > Display Data.

### Pastry sweetness

- Obtain a sample correlation
- Create a basic scatterplot.
- Perform a linear regression analysis of Rating on Moisture and Sweetness.
- Click "Storage" in the regression dialog and check "Fits" to store the fitted (predicted) values.
- To create a scatterplot of the data with points marked by Sweetness and two lines representing the fitted regression equation for each group:
- Select Calc > Calculator, type "FITS_2" in the "Store result in variable" box, and type "IF('Sweetness'=2,'FITS')" in the "Expression" box. Repeat for FITS_4 (Sweetness=4).
- Create a basic scatter plot but select "With Groups" instead of "Simple." Select Rating as the "Y variable," Moisture as the "X variable," and Sweetness as the "Categorical variable for grouping."
- Select Editor > Add > Calculated Line and select "FITS_2" to go in the "Y column" and "Moisture" to go in the "X column." Repeat for FITS_4 (Sweetness=4).

- Perform a linear regression analysis of Rating on Moisture.
- Perform a linear regression analysis of Rating on Sweetness.

### Female stat students

- Create a simple matrix of scatter plots.
- Perform a linear regression analysis of Height on momheight and dadheight.
- Create residual plots and select "Residuals versus fits" (with regular residuals).

### Hospital infections

- Perform a linear regression analysis of InfctRsk on Stay, Age, and Xray.

### Physiological measurements (using matrices)

- Perform a linear regression analysis of BodyFat on Triceps, Thigh, and Midarm.
- Click "Storage" in the regression dialog and check "Design matrix" to store the design matrix, X.
- To create \(X^T\): Select Calc > Matrices > Transpose, select "XMAT" to go in the "Transpose from" box, and type "M2" in the "Store result in" box.
- To calculate \(X^{T} X\): Select Calc > Matrices > Arithmetic, click "Multiply," select "M2" to go in the left-hand box, select "XMAT" to go in the right-hand box, and type "M3" in the "Store result in" box. Display the result by selecting Data > Display Data.
- To calculate \(\left(X^{T}X\right)^{-1} \colon \) Select Calc > Matrices > Invert, select "M3" to go in the "Invert from" box, and type "M4" in the "Store result in" box. Display the result by selecting Data > Display Data.

### Peruvian blood pressure

- Use Calc > Calculator to calculate FracLife variable.
- Perform a linear regression analysis of Systol on nine predictors.
- Perform a linear regression analysis of Systol on four predictors.
- Find an F-based P-value.

### Measurements of college students

- Perform a linear regression analysis of Height on LeftArm, LeftFoot, HeadCirc, and nose.
- Create residual plots and select "Residuals versus fits" (with regular residuals).
- Perform a linear regression analysis of Height on LeftArm and LeftFoot.
- Find an F-based P-value.
- Perform a linear regression analysis of Height on LeftFoot.