Create a half-normal probability distribution plot to identify significant effects in an experiment to study factors that might influence flow rate in a chemical manufacturing process. The four factors are reactants `A`

, `B`

, `C`

, and `D`

. Each factor is present at two levels (high and low concentration). The experiment contains only one replication at each factor level.

Load the sample data.

The first four columns of the table `flowrate`

contain the design matrix for the factors and their interations. The design matrix is coded to use `1`

for the high factor level and `-1`

for the low factor level. The fifth column of `flowrate`

contains the measured flow rate.

Fit a linear regression model using `rate`

as the response variable. Use predictor variables `A`

, `B`

, `C`

, `D`

, and all of their interation terms.

Calculate and store the absolute value of the factor effect estimates. To obtain the factor effect estimates, multiply the coefficient estimates obtained during the model fitting by two. This step is necessary because the regression coefficients measure the effect of a one-unit change in `x`

on the mean of `y`

. However, the effects estimates measure a two-unit change in `x`

due to the design matrix coding of -1 and 1. Exclude the baseline measurement. Note that the factor order in `mdl`

may be different from the order in the original design matrix.

Create a half-normal probability plot using the absolute value of the effects estimates, excluding the baseline.

Label the points and format the plot. First, return the index values for the sorted effects estimates (from lowest to highest). Then use these index values to sort the probability values stored in the graphics handle (`h(1).YData`

).

Add text labels to the plot at each point. For each point, the x-value is the effects estimate and the y-value is the corresponding probability.

The points located far from the reference line represent the significant effects.