1          options ls=99 ps=256 nocenter nodate nonumber;
2          
3          data surgical; Title1 'Surgical example from Chapter 8';
4          input x1 x2 x3 x4 y;
5          *   label x1='blood clotting score';
6          *   label x2='Prognostic data (inc age)';
7          *   label x3='enzyme function score';
8          *   label x4='liver function score';
9          *   label Y='Survival time';
10         logy=log(y);
11         cards;
NOTE: The data set WORK.SURGICAL has 54 observations and 6 variables.
NOTE: DATA statement used:
      real time           0.05 seconds
      cpu time            0.05 seconds
66         ;
67         proc print data=surgical; title2 'Raw data listing'; run;
NOTE: There were 54 observations read from the data set WORK.SURGICAL.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
      real time           0.03 seconds
      cpu time            0.03 seconds

Surgical example from Chapter 8
Raw data listing

Obs     x1     x2     x3     x4      y       logy
  1     6.7    62     81    2.59    200    5.29832
  2     5.1    59     66    1.70    101    4.61512
  3     7.4    57     83    2.16    204    5.31812
  4     6.5    73     41    2.01    101    4.61512
  5     7.8    65    115    4.30    509    6.23245
  6     5.8    38     72    1.42     80    4.38203
  7     5.7    46     63    1.91     80    4.38203
  8     3.7    68     81    2.57    127    4.84419
  9     6.0    67     93    2.50    202    5.30827
 10     3.7    76     94    2.40    203    5.31321
 11     6.3    84     83    4.13    329    5.79606
 12     6.7    51     43    1.86     65    4.17439
 13     5.8    96    114    3.95    830    6.72143
 14     5.8    83     88    3.95    330    5.79909
 15     7.7    62     67    3.40    168    5.12396
 16     7.4    74     68    2.40    217    5.37990
 17     6.0    85     28    2.98     87    4.46591
 18     3.7    51     41    1.55     34    3.52636
 19     7.3    68     74    3.56    215    5.37064
 20     5.6    57     87    3.02    172    5.14749
 21     5.2    52     76    2.85    109    4.69135
 22     3.4    83     53    1.12    136    4.91265
 23     6.7    26     68    2.10     70    4.24850
 24     5.8    67     86    3.40    220    5.39363
 25     6.3    59    100    2.95    276    5.62040
 26     5.8    61     73    3.50    144    4.96981
 27     5.2    52     86    2.45    181    5.19850
 28    11.2    76     90    5.59    574    6.35263
 29     5.2    54     56    2.71     72    4.27667
 30     5.8    76     59    2.58    178    5.18178
 31     3.2    64     65    0.74     71    4.26268
 32     8.7    45     23    2.52     58    4.06044
 33     5.0    59     73    3.50    116    4.75359
 34     5.8    72     93    3.30    295    5.68698
 35     5.4    58     70    2.64    115    4.74493
 36     5.3    51     99    2.60    184    5.21494
 37     2.6    74     86    2.05    118    4.77068
 38     4.3     8    119    2.85    120    4.78749
 39     4.8    61     76    2.45    151    5.01728
 40     5.4    52     88    1.81    148    4.99721
 41     5.2    49     72    1.84     95    4.55388
 42     3.6    28     99    1.30     75    4.31749
 43     8.8    86     88    6.40    483    6.18002
 44     6.5    56     77    2.85    153    5.03044
 45     3.4    77     93    1.48    191    5.25227
 46     6.5    40     84    3.00    123    4.81218
 47     4.5    73    106    3.05    311    5.73979
 48     4.8    86    101    4.10    398    5.98645
 49     5.1    67     77    2.86    158    5.06260
 50     3.9    82    103    4.55    310    5.73657
 51     6.6    77     46    1.95    124    4.82028
 52     6.4    85     40    1.21    125    4.82831
 53     6.4    59     85    2.33    198    5.28827
 54     8.8    78     72    3.20    313    5.74620
 

69         options ls=99 ps=56; title2 'Scatter plots';
70         proc plot data=surgical; plot y*x1 y*x2 y*x3 y*x4; run;
NOTE: There were 54 observations read from the data set WORK.SURGICAL.
NOTE: The PROCEDURE PLOT printed pages 2-5.
NOTE: PROCEDURE PLOT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
71         proc plot data=surgical; plot logy*x1 logy*x2 logy*x3 logy*x4; run;
72         options ls=99 ps=256;
NOTE: There were 54 observations read from the data set WORK.SURGICAL.
NOTE: The PROCEDURE PLOT printed pages 6-9.
NOTE: PROCEDURE PLOT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 Surgical example from Chapter 8
Scatter plots

                         Plot of y*x1.  Legend: A = 1 obs, B = 2 obs, etc.

  y |
    |
900 +
    |
    |
    |                                   A
800 +
    |
    |
    |
700 +
    |
    |
    |
600 +
    |                                                                                    A
    |
    |
500 +                                                     A
    |                                                              A
    |
    |
400 +                          A
    |
    |
    |                                   A    A                     A
300 +                  A     A          A
    |                                        A
    |
    |                                   A             AA
200 +              A A                    A   A A      A
    |                              AA A A                A
    |                          A  A  A  A      A
    |      A       A A     A     A   A        AB
100 +                             AB           A
    |            A  A              A   AA A     B
    |                                                             A
    |                A
  0 +
    |
    --+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--
      2        3        4        5        6        7        8        9       10       11       12
                                                   x1


                         Plot of y*x2.  Legend: A = 1 obs, B = 2 obs, etc.

  y |
    |
900 +
    |
    |
    |                                                                                         A
800 +
    |
    |
    |
700 +
    |
    |
    |
600 +
    |                                                                     A
    |
    |
500 +                                                          A
    |                                                                               A
    |
    |
400 +                                                                               A
    |
    |
    |                                                                       A    AA
300 +                                                                 AA        A
    |                                                    A
    |
    |                                                            AA     A
200 +                                                  A A  A    A        AA
    |                                            AA    A    A             A
    |                                             A   A    B     A
    | A                               A                 AA        A     A  A     A A
100 +                                          A  A      A             A
    |                   A A         A       A    A  A         A                    A
    |                                      A
    |                                            A
  0 +
    |
    --+---------+---------+---------+---------+---------+---------+---------+---------+---------+--
      8        18        28        38        48        58        68        78        88        98
                                                   x2


 Surgical example from Chapter 8
Scatter plots

                         Plot of y*x3.  Legend: A = 1 obs, B = 2 obs, etc.

         y |
           |
       900 +
           |
           |
           |                                                                         A
       800 +
           |
           |
           |
       700 +
           |
           |
           |
       600 +
           |                                                       A
           |
           |
       500 +                                                                         A
           |                                                     A
           |
           |
       400 +                                                               A
           |
           |
           |                                         A       A   A
       300 +                                                         A      A  A
           |                                                              A
           |
           |                                      A    A        A
       200 +                                                AA A     BA
           |                               A     A              B        A
           |                                          A AB       A
           |                 A    A    A            A A     A A A                       A
       100 +                  A                  A   A  A
           |        A          A         A    A A A  A                   A
           |    A
           |                  A
         0 +
           |
           ---+--------------+--------------+--------------+--------------+--------------+--
             20             40             60             80             100            120
                                                   x3


                         Plot of y*x4.  Legend: A = 1 obs, B = 2 obs, etc.

  y |
    |
900 +
    |
    |
    |                                                    A
800 +
    |
    |
    |
700 +
    |
    |
    |
600 +
    |                                                                          A
    |
    |
500 +                                                         A
    |                                                                                    A
    |
    |
400 +                                                      A
    |
    |
    |                                           A        A  A
300 +                                         A  A               A
    |                                       A
    |
    |                                A            A A
200 +                    A        A AA AA
    |                                 A B    A    A
    |                         A       A    B        A
    |                AA        A A     AA  A A      A
100 +                       A A A          A
    |           A      AA     AA A       A   A
    |                                  A
    |                     A
  0 +
    |
    --+------------+------------+------------+------------+------------+------------+------------+-
      0            1            2            3            4            5            6            7
                                                   x4
 Surgical example from Chapter 8
Scatter plots
                       Plot of logy*x1.  Legend: A = 1 obs, B = 2 obs, etc.
logy |
 7.0 +
     |
     |
     |                                   A
     |
     |
 6.5 +
     |
     |                                                                                    A
     |                                                     A
     |                                                              A
     |
 6.0 +                          A
     |
     |                                   A    A
     |                  A     A                                     A
     |                                   A
     |                                        A
 5.5 +
     |                                   A              A
     |                A                    A     A     AA
     |              A                A         A
     |                              A  A A
     |                             A                      A
 5.0 +                          A     A  A      A
     |              A
     |                A                        AB
     |      A               A     A   A
     |                              A
     |                             AA           A
 4.5 +                                     A
     |                                  AA
     |               A
     |            A                 A            A
     |                                           A
     |                                                             A
 4.0 +
     |
     |
     |
     |
     |
 3.5 +                A
     --+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-
       2        3        4        5        6        7        8        9       10       11       12
                                                   x1

                       Plot of logy*x2.  Legend: A = 1 obs, B = 2 obs, etc.
logy |
 7.0 +
     |
     |
     |                                                                                         A
     |
     |
 6.5 +
     |
     |                                                                     A
     |                                                          A
     |                                                                               A
     |
 6.0 +                                                                               A
     |
     |                                                                            AA
     |                                                                  A    A   A
     |                                                                 A
     |                                                    A
 5.5 +
     |                                                            A      A
     |                                                  A    A    AA       A
     |                                            A       A                 A
     |                                             A    A                  A
     |                                                       A    A
 5.0 +                                             A   A    B
     |                                                                            A
     |                                 A                           A        A       A
     | A                                                 AA              A
     |                                             A
     |                                          A         A             A
 4.5 +                                                                              A
     |                               A       A
     |                     A
     |                   A                           A         A
     |                                            A
     |                                      A
 4.0 +
     |
     |
     |
     |
     |
 3.5 +                                            A
     --+---------+---------+---------+---------+---------+---------+---------+---------+---------+-
       8        18        28        38        48        58        68        78        88        98
                                                   x2
 Surgical example from Chapter 8
Scatter plots

                       Plot of logy*x3.  Legend: A = 1 obs, B = 2 obs, etc.
      logy |
       7.0 +
           |
           |
           |                                                                         A
           |
           |
       6.5 +
           |
           |                                                       A
           |                                                                         A
           |                                                     A
           |
       6.0 +                                                               A
           |
           |                                                 A   A
           |                                         A                      A  A
           |                                                         A
           |                                                              A
       5.5 +
           |                                      A             A
           |                                           A    AA       AA
           |                                                   A     A   A
           |                               A                    B
           |                                     A       A
       5.0 +                                          A AA       A
           |                           A
           |                 A    A                         A A
           |                                        A A         A                       A
           |                                            A
           |                  A                  A   A
       4.5 +        A
           |                                  A      A
           |                                                             A
           |                             A      A A
           |                   A
           |    A
       4.0 +
           |
           |
           |
           |
           |
       3.5 +                  A
           ---+--------------+--------------+--------------+--------------+--------------+--
             20             40             60             80             100            120
                                                   x3

                       Plot of logy*x4.  Legend: A = 1 obs, B = 2 obs, etc.
logy |
 7.0 +
     |
     |
     |                                                   A
     |
     |
 6.5 +
     |
     |                                                                         A
     |                                                        A
     |                                                                                   A
     |
 6.0 +                                                     A
     |
     |                                                   A  A
     |                                        A A                A
     |                                           A
     |                                      A
 5.5 +
     |                               A            A
     |                            A  A AA           A
     |                   A          A   A
     |                                A A    A
     |                                     A      A
 5.0 +                        A       A    A        A
     |               A
     |                A        A       A     A
     |                           A      A  A        A
     |                                     A
     |                      A A A
 4.5 +                                       A
     |                  A      A
     |                 A
     |          A                A       A
     |                        A
     |                                 A
 4.0 +
     |
     |
     |
     |
     |
 3.5 +                    A
     -+------------+------------+------------+------------+------------+------------+------------+-
      0            1            2            3            4            5            6            7
                                                   x4

74         proc transreg data=surgical; title2 'Box-Cox transformation';
75            MODEL  BOXCOX(Y) = identity(X1 X2 X3 X4); run;
NOTE: Algorithm converged.
NOTE: There were 54 observations read from the data set WORK.SURGICAL.
NOTE: The PROCEDURE TRANSREG printed pages 10-11.
NOTE: PROCEDURE TRANSREG used:
      real time           0.04 seconds
      cpu time            0.04 seconds


Surgical example from Chapter 8
Box-Cox transformation

The TRANSREG Procedure

     Transformation Information
            for BoxCox(y)

  Lambda      R-Square    Log Like 
   -3.00          0.28    -353.091  
   -2.75          0.32    -335.979  
   -2.50          0.36    -319.102  
   -2.25          0.41    -302.473  
   -2.00          0.48    -286.098  
   -1.75          0.55    -269.960  
   -1.50          0.62    -254.005  
   -1.25          0.70    -238.105  
   -1.00          0.78    -222.020  
   -0.75          0.86    -205.344  
   -0.50          0.91    -187.536  
   -0.25          0.95    -168.735  
    0.00 +        0.97    -154.624 <
    0.25          0.97    -160.106  
    0.50          0.94    -180.331  
    0.75          0.90    -201.921  
    1.00          0.84    -222.037  
    1.25          0.77    -240.961  
    1.50          0.69    -259.200  
    1.75          0.62    -277.117  
    2.00          0.55    -294.936  
    2.25          0.49    -312.792  
    2.50          0.44    -330.763  
    2.75          0.39    -348.891  
    3.00          0.35    -367.194  
< - Best Lambda
* - Confidence Interval
+ - Convenient Lambda


Surgical example from Chapter 8
Box-Cox transformation

The TRANSREG Procedure

      TRANSREG Univariate Algorithm Iteration History for BoxCox(y)
Iteration    Average    Maximum                Criterion
   Number     Change     Change    R-Square       Change    Note
-------------------------------------------------------------------------
        1    0.00000    0.00000     0.97236                 Converged    
Algorithm converged.                                                      
77         proc corr data=surgical; title2 'Simple correlations';
78            var x1 x2 x3 x4; with y logy; run;

NOTE: The PROCEDURE CORR printed page 12.
NOTE: PROCEDURE CORR used:
      real time           0.02 seconds
      cpu time            0.02 seconds


Surgical example from Chapter 8
Simple correlations

The CORR Procedure
   2 With Variables:    y        logy                       
   4      Variables:    x1       x2       x3       x4       

                                    Simple Statistics
Variable           N          Mean       Std Dev           Sum       Minimum       Maximum
y                 54     197.16667     145.29940         10647      34.00000     830.00000
logy              54       5.07983       0.63041     274.31096       3.52636       6.72143
x1                54       5.78333       1.60303     312.30000       2.60000      11.20000
x2                54      63.24074      16.90253          3415       8.00000      96.00000
x3                54      77.11111      21.25378          4164      23.00000     119.00000
x4                54       2.74426       1.07036     148.19000       0.74000       6.40000


         Pearson Correlation Coefficients, N = 54 
                 Prob > |r| under H0: Rho=0

                x1            x2            x3            x4
y          0.37252       0.55398       0.58024       0.72233
            0.0055        <.0001        <.0001        <.0001

logy       0.34643       0.59290       0.66509       0.72620
            0.0103        <.0001        <.0001        <.0001






80         proc reg data=surgical lineprinter;  title2 'Full model';
81            model logy = x1 x2 x3 x4; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.
82            options ls=99 ps=56;  plot residual.*predicted.; run;
83         options ls=99 ps=256;
84         
NOTE: The PROCEDURE REG printed pages 13-14.
NOTE: PROCEDURE REG used:
      real time           0.06 seconds
      cpu time            0.06 seconds


Surgical example from Chapter 8
Full model

The REG Procedure
Model: MODEL1
Dependent Variable: logy 
                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     4       20.48086        5.12022     430.98    <.0001
Error                    49        0.58214        0.01188                     
Corrected Total          53       21.06300                                    

Root MSE              0.10900    R-Square     0.9724
Dependent Mean        5.07983    Adj R-Sq     0.9701
Coeff Var             2.14568                       

                        Parameter Estimates
                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|
Intercept     1        1.12536        0.11568       9.73      <.0001
x1            1        0.15779        0.01253      12.60      <.0001
x2            1        0.02131        0.00101      21.19      <.0001
x3            1        0.02182     0.00091252      23.91      <.0001
x4            1        0.00442        0.02236       0.20      0.8442

           ------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+------
  RESIDUAL |                                                                                      |
           |                                                                                      |
       0.4 +                                                                                      +
           |                                                                                      |
           |                                                                                      |
           |                                                                                      |
           |                              1                                                       |
       0.3 +                                                                                      +
           |                                                                                      |
           |                                       1                                              |
           |                                                                                      |
           |                                       1                                              |
       0.2 +                              1                                                       +
           |                                                                                      |
           |                                    1                                                 |
           |                                                                                1     |
R          |                                                                                      |
e      0.1 +              1                                                                       +
s          |                                                                                      |
i          |                                                       1  11                          |
d          |                                              1  1    1        1                      |
u          |                     1                 1 1 1   1 2        1                           |
a      0.0 +                         1    1   111    1   1  1                                     +
l          |                             1 1  1     1  1               2                          |
           |                    1     1 1    1  1                                   1             |
           |                       1                                                              |
           |                                                1 1                                   |
      -0.1 +                                      1                                               +
           |                                                                        1             |
           |                          1                                                   1       |
           |                         1                                                            |
           |       1                                                                              |
      -0.2 +                                                                                      +
           |                                        1                                             |
           |                                                     1                                |
           |                                                                                      |
           |                                                                                      |
      -0.3 +                                                                                      +
           |                                                                                      |
           ------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+------
                3.6  3.8  4.0  4.2  4.4  4.6  4.8  5.0  5.2  5.4  5.6  5.8  6.0  6.2  6.4  6.6
                                     Predicted Value of logy        PRED
85         proc reg data=surgical; title2 'Cp selection criteria';
86          model logy = x1 x2 x3 x4 / selection=cp; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.
NOTE: The PROCEDURE REG printed page 15.
NOTE: PROCEDURE REG used:
      real time           0.05 seconds
      cpu time            0.05 seconds

Surgical example from Chapter 8
Cp selection criteria

The REG Procedure
Model: MODEL1
Dependent Variable: logy 

C(p) Selection Method
Number in Model   C(p)    R-Square    Variables in Model
       3       3.0390      0.9723    x1 x2 x3          
       4       5.0000      0.9724    x1 x2 x3 x4       
       3     161.6520      0.8829    x2 x3 x4          
       2     283.6276      0.8129    x2 x3             
       3     451.8957      0.7192    x1 x3 x4          
       2     507.8069      0.6865    x3 x4             
       2     573.2766      0.6496    x2 x4             
       3     574.5468      0.6500    x1 x2 x4          
       2     580.0075      0.6458    x1 x3             
       1     787.9471      0.5274    x4                
       2     789.1422      0.5278    x1 x4             
       1     938.6707      0.4424    x3                
       2     948.2417      0.4381    x1 x2             
       1     1099.691      0.3515    x2                
       1     1510.148      0.1200    x1                
87         proc reg data=surgical; title2 'RSquare selection criteria';
88          model logy = x1 x2 x3 x4 / selection = RSquare; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.
NOTE: The PROCEDURE REG printed page 16.
NOTE: PROCEDURE REG used:
      real time           0.05 seconds
      cpu time            0.05 seconds

R-Square Selection Method
Number in Model        R-Square    Variables in Model
       1                 0.5274    x4                
       1                 0.4424    x3                
       1                 0.3515    x2                
       1                 0.1200    x1                
-------------------------------------------
       2                 0.8129    x2 x3             
       2                 0.6865    x3 x4             
       2                 0.6496    x2 x4             
       2                 0.6458    x1 x3             
       2                 0.5278    x1 x4             
       2                 0.4381    x1 x2             
-------------------------------------------
       3                 0.9723    x1 x2 x3          
       3                 0.8829    x2 x3 x4          
       3                 0.7192    x1 x3 x4          
       3                 0.6500    x1 x2 x4          
-------------------------------------------
       4                 0.9724    x1 x2 x3 x4       
89         proc reg data=surgical; title2 'Adjusted RSquare selection criteria';
90          model logy = x1 x2 x3 x4 / selection = AdjRSq; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.
91         
NOTE: The PROCEDURE REG printed page 17.
NOTE: PROCEDURE REG used:
      real time           0.05 seconds
      cpu time            0.05 seconds


Surgical example from Chapter 8
Adjusted RSquare selection criteria

The REG Procedure
Model: MODEL1
Dependent Variable: logy 
 
Adjusted R-Square Selection Method

Number in    Adjusted
  Model      R-Square    R-Square    Variables in Model
       3       0.9707      0.9723    x1 x2 x3          
       4       0.9701      0.9724    x1 x2 x3 x4       
       3       0.8758      0.8829    x2 x3 x4          
       2       0.8056      0.8129    x2 x3             
       3       0.7023      0.7192    x1 x3 x4          
       2       0.6742      0.6865    x3 x4             
       2       0.6358      0.6496    x2 x4             
       2       0.6319      0.6458    x1 x3             
       3       0.6290      0.6500    x1 x2 x4          
       1       0.5183      0.5274    x4                
       2       0.5093      0.5278    x1 x4             
       1       0.4316      0.4424    x3                
       2       0.4160      0.4381    x1 x2             
       1       0.3391      0.3515    x2                
       1       0.1031      0.1200    x1                





92         proc rsquare data=surgical; title2 'various selection criteria';
93            model logy = x1 x2 x3 x4 / cp sse mse adjrsq; run;

NOTE: 54 observations read.
NOTE: 54 observations used in computations.
NOTE: PROCEDURE RSQUARE used:
      real time           0.03 seconds
      cpu time            0.03 seconds
      
NOTE: The PROCEDURE RSQUARE printed page 18.



 Surgical example from Chapter 8
various selection criteria

The RSQUARE Procedure
Model: MODEL1
Dependent Variable: logy 

R-Square Selection Method
Number in                Adjusted
  Model      R-Square    R-Square        C(p)            MSE            SSE    Variables in Model
       1       0.5274      0.5183    787.9471        0.19144        9.95512    x4                
       1       0.4424      0.4316    938.6707        0.22588       11.74577    x3                
       1       0.3515      0.3391    1099.691        0.26267       13.65876    x2                
       1       0.1200      0.1031    1510.148        0.35644       18.53513    x1                
-------------------------------------------------------------------------------------------------
       2       0.8129      0.8056    283.6276        0.07725        3.93986    x2 x3             
       2       0.6865      0.6742    507.8069        0.12947        6.60319    x3 x4             
       2       0.6496      0.6358    573.2766        0.14473        7.38099    x2 x4             
       2       0.6458      0.6319    580.0075        0.14629        7.46096    x1 x3             
       2       0.5278      0.5093    789.1422        0.19501        9.94556    x1 x4             
       2       0.4381      0.4160    948.2417        0.23207       11.83572    x1 x2             
-------------------------------------------------------------------------------------------------
       3       0.9723      0.9707      3.0390        0.01165        0.58260    x1 x2 x3          
       3       0.8829      0.8758    161.6520        0.04934        2.46698    x2 x3 x4          
       3       0.7192      0.7023    451.8957        0.11830        5.91518    x1 x3 x4          
       3       0.6500      0.6290    574.5468        0.14745        7.37232    x1 x2 x4          
-------------------------------------------------------------------------------------------------
       4       0.9724      0.9701      5.0000        0.01188        0.58214    x1 x2 x3 x4       

95         proc reg data=surgical; title2 'Backward stepwise regression';
96           model logy = x1 x2 x3 x4 / selection=backward cp sse mse adjrsq; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.
NOTE: The PROCEDURE REG printed page 19.
NOTE: PROCEDURE REG used:
      real time           0.06 seconds
      cpu time            0.06 seconds

Surgical example from Chapter 8
Backward stepwise regression

The REG Procedure
Model: MODEL1
Dependent Variable: logy 
 
Backward Elimination: Step 0
All Variables Entered: R-Square = 0.9724 and C(p) = 5.0000

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     4       20.48086        5.12022     430.98    <.0001
Error                    49        0.58214        0.01188                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      1.12536      0.11568      1.12432    94.64  <.0001
x1             0.15779      0.01253      1.88484   158.65  <.0001
x2             0.02131      0.00101      5.33305   448.90  <.0001
x3             0.02182   0.00091252      6.79019   571.55  <.0001
x4             0.00442      0.02236   0.00046344     0.04  0.8442
Bounds on condition number: 2.5553, 29.286
---------------------------------------------------------------------------------------
 Backward Elimination: Step 1
Variable x4 Removed: R-Square = 0.9723 and C(p) = 3.0390

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     3       20.48040        6.82680     585.89    <.0001
Error                    50        0.58260        0.01165                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      1.11358      0.09817      1.49935   128.68  <.0001
x1             0.15940      0.00939      3.35726   288.13  <.0001
x2             0.02140   0.00088086      6.87836   590.31  <.0001
x3             0.02193   0.00070561     11.25312   965.76  <.0001
Bounds on condition number: 1.0308, 9.1864
---------------------------------------------------------------------------------------

All variables left in the model are significant at the 0.1000 level.

                          Summary of Backward Elimination
        Variable     Number     Partial      Model
Step    Removed      Vars In    R-Square    R-Square     C(p)      F Value    Pr > F
  1     x4               3       0.0000      0.9723      3.0390       0.04    0.8442







98         proc reg data=surgical; title2 'Stepwise regression';
99           model logy = x1 x2 x3 x4 / selection=stepwise; run;
NOTE: 54 observations read.
NOTE: 54 observations used in computations.


Surgical example from Chapter 8
Stepwise regression

The REG Procedure
Model: MODEL1
Dependent Variable: logy 
 
Stepwise Selection: Step 1

Variable x4 Entered: R-Square = 0.5274 and C(p) = 787.9471

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     1       11.10788       11.10788      58.02    <.0001
Error                    52        9.95512        0.19144                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      3.90609      0.16520    107.03572   559.10  <.0001
x4             0.42771      0.05615     11.10788    58.02  <.0001

Bounds on condition number: 1, 1
---------------------------------------------------------------------------------------
 Stepwise Selection: Step 2
Variable x3 Entered: R-Square = 0.6865 and C(p) = 507.8069

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     2       14.45981        7.22991      55.84    <.0001
Error                    51        6.60319        0.12947                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      3.19784      0.19450     34.99819   270.31  <.0001
x3             0.01301      0.00256      3.35193    25.89  <.0001
x4             0.32010      0.05079      5.14258    39.72  <.0001

Bounds on condition number: 1.2098, 4.8392
---------------------------------------------------------------------------------------

Stepwise Selection: Step 3
Variable x2 Entered: R-Square = 0.8829 and C(p) = 161.6520

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     3       18.59602        6.19867     125.63    <.0001
Error                    50        2.46698        0.04934                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      2.16970      0.16440      8.59420   174.18  <.0001
x2             0.01819      0.00199      4.13621    83.83  <.0001
x3             0.01612      0.00161      4.91401    99.60  <.0001
x4             0.18846      0.03449      1.47288    29.85  <.0001

Bounds on condition number: 1.4642, 11.822
---------------------------------------------------------------------------------------

Stepwise Selection: Step 4
Variable x1 Entered: R-Square = 0.9724 and C(p) = 5.0000

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     4       20.48086        5.12022     430.98    <.0001
Error                    49        0.58214        0.01188                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      1.12536      0.11568      1.12432    94.64  <.0001
x1             0.15779      0.01253      1.88484   158.65  <.0001
x2             0.02131      0.00101      5.33305   448.90  <.0001
x3             0.02182   0.00091252      6.79019   571.55  <.0001
x4             0.00442      0.02236   0.00046344     0.04  0.8442

Bounds on condition number: 2.5553, 29.286
---------------------------------------------------------------------------------------

 Stepwise Selection: Step 5
Variable x4 Removed: R-Square = 0.9723 and C(p) = 3.0390

                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     3       20.48040        6.82680     585.89    <.0001
Error                    50        0.58260        0.01165                     
Corrected Total          53       21.06300                                    

             Parameter     Standard
Variable      Estimate        Error   Type II SS  F Value  Pr > F
Intercept      1.11358      0.09817      1.49935   128.68  <.0001
x1             0.15940      0.00939      3.35726   288.13  <.0001
x2             0.02140   0.00088086      6.87836   590.31  <.0001
x3             0.02193   0.00070561     11.25312   965.76  <.0001

Bounds on condition number: 1.0308, 9.1864
---------------------------------------------------------------------------------------


All variables left in the model are significant at the 0.1500 level.

No other variable met the 0.1500 significance level for entry into the model.



                                  Summary of Stepwise Selection
 
        Variable     Variable     Number     Partial      Model
Step    Entered      Removed      Vars In    R-Square    R-Square     C(p)      F Value    Pr > F

  1     x4                            1       0.5274      0.5274     787.947      58.02    <.0001
  2     x3                            2       0.1591      0.6865     507.807      25.89    <.0001
  3     x2                            3       0.1964      0.8829     161.652      83.83    <.0001
  4     x1                            4       0.0895      0.9724      5.0000     158.65    <.0001
  5                  x4               3       0.0000      0.9723      3.0390       0.04    0.8442