FILENAME surgical URL "http://www.stat.wmich.edu/naranjo/stat6620/surgicalunitdata.txt"; DATA one; INFILE surgical; INPUT x1 x2 x3 x4 x5 x6 x7 x8 y; logy=log(y); RUN; PROC REG DATA=one; TITLE "Model Building: Surgical Unit data (Chap. 9, p.272/350)"; MODEL logy = x1-x5 / SELECTION=RSQUARE SSE ADJRSQ CP AIC PRESS; RUN; PROC REG DATA=one; MODEL logy = x1-x8 / SELECTION=FORWARD; MODEL logy = x1-x8 / SELECTION=BACKWARD; MODEL logy = x1-x8 / SELECTION=STEPWISE; RUN; **************************************************************************************** Model Building: Surgical Unit data (Chap. 9, p.272/350) 1 The REG Procedure Dependent Variable: logy R-Square Selection Method Number of Observations Read 54 Number of Observations Used 54 Number in Adjusted Model R-Square R-Square C(p) AIC SSE Variables in Model 1 0.4273 0.4162 69.0323 -103.8110 7.33373 x3 1 0.4215 0.4103 70.2356 -103.2679 7.40786 x4 1 0.2210 0.2061 111.8887 -87.2053 9.97416 x2 1 0.0607 0.0426 145.2169 -77.0963 12.02755 x1 1 0.0210 0.0022 153.4549 -74.8644 12.53510 x5 ------------------------------------------------------------------------------------ 2 0.6632 0.6500 22.0014 -130.4785 4.31287 x2 x3 2 0.5992 0.5835 35.2956 -121.0890 5.13194 x3 x4 2 0.5484 0.5307 45.8554 -114.6436 5.78254 x1 x3 2 0.4830 0.4627 59.4441 -107.3420 6.61976 x2 x4 2 0.4459 0.4242 67.1527 -103.6003 7.09470 x3 x5 2 0.4300 0.4076 70.4635 -102.0697 7.29868 x1 x4 2 0.4216 0.3989 72.2120 -101.2785 7.40641 x4 x5 2 0.2630 0.2341 105.1724 -88.1939 9.43713 x1 x2 2 0.2361 0.2062 110.7557 -86.2606 9.78113 x2 x5 2 0.0803 0.0442 143.1444 -76.2348 11.77663 x1 x5 ------------------------------------------------------------------------------------ 3 0.7572 0.7427 4.4537 -146.1614 3.10851 x1 x2 x3 3 0.7177 0.7007 12.6736 -138.0109 3.61495 x2 x3 x4 3 0.6760 0.6566 21.3264 -130.5825 4.14806 x2 x3 x5 3 0.6119 0.5886 34.6639 -120.8226 4.96980 x1 x3 x4 3 0.6013 0.5774 36.8629 -119.3702 5.10528 x3 x4 x5 3 0.5650 0.5389 44.4130 -114.6614 5.57046 x1 x3 x5 3 0.4870 0.4563 60.6095 -105.7631 6.56834 x1 x2 x4 3 0.4834 0.4524 61.3726 -105.3779 6.61536 x2 x4 x5 3 0.4300 0.3958 72.4630 -100.0699 7.29865 x1 x4 x5 3 0.2772 0.2339 104.2084 -87.2491 9.25452 x1 x2 x5 ------------------------------------------------------------------------------------ 4 0.7688 0.7500 4.0424 -146.8058 2.95995 x1 x2 x3 x5 4 0.7591 0.7395 6.0573 -144.5872 3.08409 x1 x2 x3 x4 4 0.7217 0.6989 13.8477 -136.7764 3.56407 x2 x3 x4 x5 4 0.6159 0.5846 35.8206 -119.3901 4.91785 x1 x3 x4 x5 4 0.4872 0.4453 62.5792 -103.7784 6.56648 x1 x2 x4 x5 ------------------------------------------------------------------------------------ 5 0.7690 0.7450 6.0000 -144.8535 2.95734 x1 x2 x3 x4 x5 Model Building: Surgical Unit data (Chap. 9, p.272/350) 2 The REG Procedure Model: MODEL1 Dependent Variable: logy Number of Observations Read 54 Number of Observations Used 54 Forward Selection: Step 1 Variable x3 Entered: R-Square = 0.4273 and C(p) = 117.4783 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 1 5.47078 5.47078 38.79 <.0001 Error 52 7.33373 0.14103 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 5.26489 0.19401 103.86327 736.45 <.0001 x3 0.01512 0.00243 5.47078 38.79 <.0001 Bounds on condition number: 1, 1 ---------------------------------------------------------------------------------------- Forward Selection: Step 2 Variable x2 Entered: R-Square = 0.6632 and C(p) = 50.4918 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 2 8.49164 4.24582 50.21 <.0001 Error 51 4.31287 0.08457 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.35094 0.21437 34.83799 411.96 <.0001 x2 0.01413 0.00236 3.02086 35.72 <.0001 x3 0.01538 0.00188 5.66129 66.95 <.0001 Model Building: Surgical Unit data (Chap. 9, p.272/350) 3 The REG Procedure Model: MODEL1 Dependent Variable: logy Forward Selection: Step 2 Bounds on condition number: 1.0006, 4.0022 ---------------------------------------------------------------------------------------- Forward Selection: Step 3 Variable x8 Entered: R-Square = 0.7780 and C(p) = 18.9015 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 3 9.96253 3.32084 58.42 <.0001 Error 50 2.84198 0.05684 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.29102 0.17614 33.73340 593.48 <.0001 x2 0.01494 0.00194 3.35315 58.99 <.0001 x3 0.01447 0.00155 4.94031 86.92 <.0001 x8 0.42927 0.08438 1.47089 25.88 <.0001 Bounds on condition number: 1.0208, 9.1267 ---------------------------------------------------------------------------------------- Forward Selection: Step 4 Variable x1 Entered: R-Square = 0.8299 and C(p) = 5.7340 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 4 10.62670 2.65668 59.77 <.0001 Error 49 2.17781 0.04445 Corrected Total 53 12.80451 Model Building: Surgical Unit data (Chap. 9, p.272/350) 4 The REG Procedure Model: MODEL1 Dependent Variable: logy Forward Selection: Step 4 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.85273 0.19265 17.77526 399.94 <.0001 x1 0.07333 0.01897 0.66417 14.94 0.0003 x2 0.01419 0.00173 2.98915 67.25 <.0001 x3 0.01545 0.00140 5.44592 122.53 <.0001 x8 0.35315 0.07717 0.93070 20.94 <.0001 Bounds on condition number: 1.1026, 17.052 ---------------------------------------------------------------------------------------- Forward Selection: Step 5 Variable x6 Entered: R-Square = 0.8375 and C(p) = 5.5282 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 5 10.72329 2.14466 49.46 <.0001 Error 48 2.08122 0.04336 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.86739 0.19054 17.86320 411.99 <.0001 x1 0.07125 0.01879 0.62359 14.38 0.0004 x2 0.01390 0.00172 2.82872 65.24 <.0001 x3 0.01511 0.00140 5.07420 117.03 <.0001 x6 0.08682 0.05817 0.09659 2.23 0.1421 x8 0.36285 0.07650 0.97544 22.50 <.0001 Bounds on condition number: 1.1087, 26.833 ---------------------------------------------------------------------------------------- Forward Selection: Step 6 Variable x5 Entered: R-Square = 0.8435 and C(p) = 5.7725 Model Building: Surgical Unit data (Chap. 9, p.272/350) 5 The REG Procedure Model: MODEL1 Dependent Variable: logy Forward Selection: Step 6 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 6 10.80017 1.80003 42.21 <.0001 Error 47 2.00434 0.04265 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.05439 0.23474 12.72167 298.31 <.0001 x1 0.07152 0.01863 0.62835 14.73 0.0004 x2 0.01376 0.00171 2.76443 64.82 <.0001 x3 0.01511 0.00139 5.07517 119.01 <.0001 x5 -0.00345 0.00257 0.07688 1.80 0.1858 x6 0.08723 0.05769 0.09750 2.29 0.1372 x8 0.35107 0.07637 0.90108 21.13 <.0001 Bounds on condition number: 1.1145, 38.409 ---------------------------------------------------------------------------------------- Forward Selection: Step 7 Variable x7 Entered: R-Square = 0.8460 and C(p) = 7.0288 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 7 10.83274 1.54753 36.10 <.0001 Error 46 1.97177 0.04286 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.03736 0.23615 12.52870 292.29 <.0001 x1 0.07144 0.01868 0.62689 14.62 0.0004 x2 0.01361 0.00172 2.67549 62.42 <.0001 x3 0.01514 0.00139 5.09344 118.83 <.0001 x5 -0.00371 0.00259 0.08758 2.04 0.1597 x6 0.08695 0.05784 0.09689 2.26 0.1396 x7 0.05806 0.06662 0.03256 0.76 0.3880 x8 0.38781 0.08741 0.84378 19.68 <.0001 Model Building: Surgical Unit data (Chap. 9, p.272/350) 6 The REG Procedure Model: MODEL1 Dependent Variable: logy Forward Selection: Step 7 Bounds on condition number: 1.4524, 57.081 ---------------------------------------------------------------------------------------- No other variable met the 0.5000 significance level for entry into the model. Summary of Forward Selection Variable Number Partial Model Step Entered Vars In R-Square R-Square C(p) F Value Pr > F 1 x3 1 0.4273 0.4273 117.478 38.79 <.0001 2 x2 2 0.2359 0.6632 50.4918 35.72 <.0001 3 x8 3 0.1149 0.7780 18.9015 25.88 <.0001 4 x1 4 0.0519 0.8299 5.7340 14.94 0.0003 5 x6 5 0.0075 0.8375 5.5282 2.23 0.1421 6 x5 6 0.0060 0.8435 5.7725 1.80 0.1858 7 x7 7 0.0025 0.8460 7.0288 0.76 0.3880 Model Building: Surgical Unit data (Chap. 9, p.272/350) 7 The REG Procedure Model: MODEL2 Dependent Variable: logy Number of Observations Read 54 Number of Observations Used 54 Backward Elimination: Step 0 All Variables Entered: R-Square = 0.8461 and C(p) = 9.0000 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 8 10.83400 1.35425 30.93 <.0001 Error 45 1.97051 0.04379 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.05095 0.25174 11.33894 258.94 <.0001 x1 0.06855 0.02542 0.31845 7.27 0.0098 x2 0.01346 0.00195 2.09285 47.79 <.0001 x3 0.01495 0.00181 2.98863 68.25 <.0001 x4 0.00793 0.04671 0.00126 0.03 0.8659 x5 -0.00357 0.00275 0.07359 1.68 0.2014 x6 0.08415 0.06075 0.08403 1.92 0.1728 x7 0.05731 0.06748 0.03159 0.72 0.4002 x8 0.38819 0.08837 0.84489 19.29 <.0001 Bounds on condition number: 3.0249, 106 ---------------------------------------------------------------------------------------- Backward Elimination: Step 1 Variable x4 Removed: R-Square = 0.8460 and C(p) = 7.0288 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 7 10.83274 1.54753 36.10 <.0001 Error 46 1.97177 0.04286 Corrected Total 53 12.80451 Model Building: Surgical Unit data (Chap. 9, p.272/350) 8 The REG Procedure Model: MODEL2 Dependent Variable: logy Backward Elimination: Step 1 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.03736 0.23615 12.52870 292.29 <.0001 x1 0.07144 0.01868 0.62689 14.62 0.0004 x2 0.01361 0.00172 2.67549 62.42 <.0001 x3 0.01514 0.00139 5.09344 118.83 <.0001 x5 -0.00371 0.00259 0.08758 2.04 0.1597 x6 0.08695 0.05784 0.09689 2.26 0.1396 x7 0.05806 0.06662 0.03256 0.76 0.3880 x8 0.38781 0.08741 0.84378 19.68 <.0001 Bounds on condition number: 1.4524, 57.081 ---------------------------------------------------------------------------------------- Backward Elimination: Step 2 Variable x7 Removed: R-Square = 0.8435 and C(p) = 5.7725 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 6 10.80017 1.80003 42.21 <.0001 Error 47 2.00434 0.04265 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.05439 0.23474 12.72167 298.31 <.0001 x1 0.07152 0.01863 0.62835 14.73 0.0004 x2 0.01376 0.00171 2.76443 64.82 <.0001 x3 0.01511 0.00139 5.07517 119.01 <.0001 x5 -0.00345 0.00257 0.07688 1.80 0.1858 x6 0.08723 0.05769 0.09750 2.29 0.1372 x8 0.35107 0.07637 0.90108 21.13 <.0001 Bounds on condition number: 1.1145, 38.409 ---------------------------------------------------------------------------------------- Backward Elimination: Step 3 Model Building: Surgical Unit data (Chap. 9, p.272/350) 9 The REG Procedure Model: MODEL2 Dependent Variable: logy Backward Elimination: Step 3 Variable x5 Removed: R-Square = 0.8375 and C(p) = 5.5282 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 5 10.72329 2.14466 49.46 <.0001 Error 48 2.08122 0.04336 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.86739 0.19054 17.86320 411.99 <.0001 x1 0.07125 0.01879 0.62359 14.38 0.0004 x2 0.01390 0.00172 2.82872 65.24 <.0001 x3 0.01511 0.00140 5.07420 117.03 <.0001 x6 0.08682 0.05817 0.09659 2.23 0.1421 x8 0.36285 0.07650 0.97544 22.50 <.0001 Bounds on condition number: 1.1087, 26.833 ---------------------------------------------------------------------------------------- Backward Elimination: Step 4 Variable x6 Removed: R-Square = 0.8299 and C(p) = 5.7340 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 4 10.62670 2.65668 59.77 <.0001 Error 49 2.17781 0.04445 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.85273 0.19265 17.77526 399.94 <.0001 x1 0.07333 0.01897 0.66417 14.94 0.0003 x2 0.01419 0.00173 2.98915 67.25 <.0001 x3 0.01545 0.00140 5.44592 122.53 <.0001 x8 0.35315 0.07717 0.93070 20.94 <.0001 Model Building: Surgical Unit data (Chap. 9, p.272/350) 10 The REG Procedure Model: MODEL2 Dependent Variable: logy Backward Elimination: Step 4 Bounds on condition number: 1.1026, 17.052 ---------------------------------------------------------------------------------------- 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 7 0.0001 0.8460 7.0288 0.03 0.8659 2 x7 6 0.0025 0.8435 5.7725 0.76 0.3880 3 x5 5 0.0060 0.8375 5.5282 1.80 0.1858 4 x6 4 0.0075 0.8299 5.7340 2.23 0.1421 Model Building: Surgical Unit data (Chap. 9, p.272/350) 11 The REG Procedure Model: MODEL3 Dependent Variable: logy Number of Observations Read 54 Number of Observations Used 54 Stepwise Selection: Step 1 Variable x3 Entered: R-Square = 0.4273 and C(p) = 117.4783 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 1 5.47078 5.47078 38.79 <.0001 Error 52 7.33373 0.14103 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 5.26489 0.19401 103.86327 736.45 <.0001 x3 0.01512 0.00243 5.47078 38.79 <.0001 Bounds on condition number: 1, 1 ---------------------------------------------------------------------------------------- Stepwise Selection: Step 2 Variable x2 Entered: R-Square = 0.6632 and C(p) = 50.4918 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 2 8.49164 4.24582 50.21 <.0001 Error 51 4.31287 0.08457 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.35094 0.21437 34.83799 411.96 <.0001 x2 0.01413 0.00236 3.02086 35.72 <.0001 x3 0.01538 0.00188 5.66129 66.95 <.0001 Model Building: Surgical Unit data (Chap. 9, p.272/350) 12 The REG Procedure Model: MODEL3 Dependent Variable: logy Stepwise Selection: Step 2 Bounds on condition number: 1.0006, 4.0022 ---------------------------------------------------------------------------------------- Stepwise Selection: Step 3 Variable x8 Entered: R-Square = 0.7780 and C(p) = 18.9015 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 3 9.96253 3.32084 58.42 <.0001 Error 50 2.84198 0.05684 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 4.29102 0.17614 33.73340 593.48 <.0001 x2 0.01494 0.00194 3.35315 58.99 <.0001 x3 0.01447 0.00155 4.94031 86.92 <.0001 x8 0.42927 0.08438 1.47089 25.88 <.0001 Bounds on condition number: 1.0208, 9.1267 ---------------------------------------------------------------------------------------- Stepwise Selection: Step 4 Variable x1 Entered: R-Square = 0.8299 and C(p) = 5.7340 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 4 10.62670 2.65668 59.77 <.0001 Error 49 2.17781 0.04445 Corrected Total 53 12.80451 Model Building: Surgical Unit data (Chap. 9, p.272/350) 13 The REG Procedure Model: MODEL3 Dependent Variable: logy Stepwise Selection: Step 4 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.85273 0.19265 17.77526 399.94 <.0001 x1 0.07333 0.01897 0.66417 14.94 0.0003 x2 0.01419 0.00173 2.98915 67.25 <.0001 x3 0.01545 0.00140 5.44592 122.53 <.0001 x8 0.35315 0.07717 0.93070 20.94 <.0001 Bounds on condition number: 1.1026, 17.052 ---------------------------------------------------------------------------------------- Stepwise Selection: Step 5 Variable x6 Entered: R-Square = 0.8375 and C(p) = 5.5282 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 5 10.72329 2.14466 49.46 <.0001 Error 48 2.08122 0.04336 Corrected Total 53 12.80451 Parameter Standard Variable Estimate Error Type II SS F Value Pr > F Intercept 3.86739 0.19054 17.86320 411.99 <.0001 x1 0.07125 0.01879 0.62359 14.38 0.0004 x2 0.01390 0.00172 2.82872 65.24 <.0001 x3 0.01511 0.00140 5.07420 117.03 <.0001 x6 0.08682 0.05817 0.09659 2.23 0.1421 x8 0.36285 0.07650 0.97544 22.50 <.0001 Bounds on condition number: 1.1087, 26.833 ---------------------------------------------------------------------------------------- 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. Model Building: Surgical Unit data (Chap. 9, p.272/350) 14 The REG Procedure Model: MODEL3 Dependent Variable: logy 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 x3 1 0.4273 0.4273 117.478 38.79 <.0001 2 x2 2 0.2359 0.6632 50.4918 35.72 <.0001 3 x8 3 0.1149 0.7780 18.9015 25.88 <.0001 4 x1 4 0.0519 0.8299 5.7340 14.94 0.0003 5 x6 5 0.0075 0.8375 5.5282 2.23 0.1421