Step 2: Modeling the Trend
The next step is to model the trend as a function of
hour. The chart in Figure 47.23 suggests
that the mean level of the process (saved as DIAMTERX in
the OUTLIMITS= data set SUBMEANS) grows as the log of HOUR.
The following
statements fit a simple linear regression model in which
DIAMTERX 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 47.24.
data submeans;
set submeans;
loghour=log(hour);
proc reg data=submeans ;
model diamterx=loghour;
output out=regdata predicted=fitted ;
proc print data=regdata noobs;
run;
X |
and s Chart for Diameter |
|
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 47.24: Trend Analysis for DIAMETER from PROC REG
Figure 47.24 shows that the fitted equation can be
expressed as
where is the fitted subgroup
average.* A
listing of the OUT= data set REGDATA created by
the REG procedure is shown in Figure 47.25.
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 |
6 |
10.2390 |
0.05095 |
8 |
1.79176 |
10.2359 |
7 |
10.2684 |
0.09619 |
8 |
1.94591 |
10.2570 |
8 |
10.2916 |
0.07510 |
8 |
2.07944 |
10.2752 |
9 |
10.2655 |
0.07053 |
8 |
2.19722 |
10.2914 |
10 |
10.3504 |
0.12049 |
8 |
2.30259 |
10.3058 |
11 |
10.3406 |
0.12849 |
8 |
2.39790 |
10.3188 |
12 |
10.2865 |
0.05592 |
8 |
2.48491 |
10.3307 |
13 |
10.2720 |
0.07849 |
8 |
2.56495 |
10.3417 |
14 |
10.4225 |
0.12093 |
8 |
2.63906 |
10.3518 |
15 |
10.4006 |
0.06253 |
8 |
2.70805 |
10.3613 |
16 |
10.3554 |
0.11340 |
8 |
2.77259 |
10.3701 |
17 |
10.3827 |
0.08683 |
8 |
2.83321 |
10.3784 |
18 |
10.3763 |
0.09874 |
8 |
2.89037 |
10.3863 |
19 |
10.3976 |
0.11531 |
8 |
2.94444 |
10.3937 |
20 |
10.3950 |
0.09185 |
8 |
2.99573 |
10.4007 |
|
Figure 47.25: Listing of the Output Data Set REGDATA from the REG Procedure
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.