The next step is to model the trend as a function of hour. The
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
Figure 18.166 shows that the fitted equation can be expressed as
![\[ {\widehat{\bar{X}}}_ t = 9.99 + 0.14\times \log (t) \]](images/qcug_shewhart0362.png)
where
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
[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.