The SHEWHART Procedure


Step 2: Modeling the Trend

The next step is to model the trend as a function of hour. The $\bar{X}$ chart in Figure 18.165 suggests that the mean level of the process (saved as DiameterX in the OUTLIMITS= data set submeans) grows as the log of hour. The following statements fit a simple linear regression model in which DiameterX is the response variable and loghour (the log transformation of hour) is the predictor variable. Part of the printed output produced by PROC REG is shown in Figure 18.166.

data submeans;
   set submeans;
   loghour=log(hour);
run;
proc reg data=submeans ;
   model Diameterx=loghour;
   output out=regdata predicted=fitted ;
run;

Figure 18.166: Trend Analysis for Diameter from PROC REG

The REG Procedure
Model: MODEL1
Dependent Variable: DiameterX Mean of Diameter

Parameter Estimates
Variable Label DF Parameter
Estimate
Standard
Error
t Value Pr > |t|
Intercept Intercept 1 9.99056 0.02185 457.29 <.0001
loghour   1 0.13690 0.00967 14.16 <.0001



Figure 18.166 shows that the fitted equation can be expressed as

\[ {\widehat{\bar{X}}}_ t = 9.99 + 0.14\times \log (t) \]

where ${\widehat{\bar{X}}}_ t$ is the fitted subgroup average.[39] A partial listing of the OUT= data set REGDATA created by the REG procedure is shown in Figure 18.167.

Figure 18.167: Partial Listing of the Output Data Set regdata from the REG Procedure

hour DiameterX DiameterS DiameterN loghour fitted
1 9.9992 0.09726 8 0.00000 9.9906
2 10.1060 0.07290 8 0.69315 10.0855
3 10.1428 0.06601 8 1.09861 10.1410
4 10.1565 0.08141 8 1.38629 10.1803
5 10.1583 0.15454 8 1.60944 10.2109





[39] Although this example does not check for the existence of a trend, you should do so by using the hypothesis tests provided by the REG procedure.