/* Example: Durability of Pavement (Table 8.5-6) Y: change in rut depth X1: viscosity of asphalt X2: percentage of asphalt in surface course X3: percentage of asphalt in base course X4: percentage of fines in surface course X5: percentage of voids in surface course X6: indicate variable: two sets of runs */ ods html; data raw; input Y X1 X2 X3 X4 X5 X6 @@; datalines; 6.75 2.8 4.68 4.87 8.4 4.916 -1 13 1.4 5.19 4.5 6.5 4.563 -1 14.75 1.4 4.82 4.73 7.9 5.321 -1 12.6 3.3 4.85 4.76 8.3 4.865 -1 8.25 1.7 4.86 4.95 8.4 3.776 -1 10.67 2.9 5.16 4.45 7.4 4.397 -1 7.28 3.7 4.82 5.05 6.8 4.867 -1 12.67 1.7 4.86 4.7 8.6 4.828 -1 12.58 0.92 4.76 4.84 6.7 4.865 -1 20.6 0.68 5.16 4.76 7.7 4.034 -1 3.58 6 4.57 4.82 7.4 5.45 -1 7 4.3 4.61 4.65 6.7 4.853 -1 26.2 0.6 5.07 5.1 7.5 4.257 -1 11.67 1.8 4.66 5.09 8.2 5.144 -1 7.67 6 5.42 4.41 5.8 3.718 -1 12.25 4.4 5.01 4.74 7.1 4.715 -1 0.76 88 4.97 4.66 6.5 4.625 1 1.35 62 5.01 4.72 8 4.977 1 1.44 50 4.96 4.9 6.8 4.322 1 1.6 58 5.2 4.7 8.2 5.087 1 1.1 90 4.8 4.6 6.6 5.971 1 0.85 66 4.98 4.69 6.4 4.647 1 1.2 140 5.35 4.76 7.3 5.115 1 0.56 240 5.04 4.8 7.8 5.939 1 0.72 420 4.8 4.8 7.4 5.916 1 0.47 500 4.83 4.6 6.7 5.471 1 0.33 180 4.66 4.72 7.2 4.602 1 0.26 270 4.67 4.5 6.3 5.043 1 0.76 170 4.72 4.7 6.8 5.075 1 0.8 98 5 5.07 7.2 4.334 1 2 35 4.7 4.8 7.7 5.705 1 ; proc print data=raw; run; proc gplot data=raw; plot Y * X1; run; /* create a new data with transformed variables*/ data durability; set raw; LogX1 = log(X1); LogY = log(Y); run; proc print data=durability; run; /*Scatter plot*/ proc gplot data=durability; plot LogY * LogX1 ; run; proc gplot data=durability; plot LogY * LogX1 = X6; run; /* Multiple Linear Regression Analysis*/ title 'Durability Linear Regression Analysis'; proc reg data=durability; model LogY = LogX1 X2 X3 X4 X5 X6 / vif clb corrb; run; /* Model Selection - backward, forward stepwise */ proc reg data=durability; model LogY = LogX1 X2 X3 X4 X5 X6 / selection=backward; run; proc reg data=durability; model LogY = LogX1 X2 X3 X4 X5 X6 / selection=forward; run; ods html close; ods graphics on; proc corr data=durability plots=matrix(histogram); var Y X1 X2 X3 X4 X5 X6; run; proc corr data=durability plots=matrix(histogram); var LogY LogX1 X2 X3 X4 X5 X6; run; ods graphics off; ods html; data air; input Ozone Solar Wind Temp; datalines; 16 7 6.9 74 1 8 9.7 59 23 13 12 67 23 14 9.2 71 8 19 20.1 61 14 20 16.6 63 9 24 13.8 81 9 24 10.9 71 4 25 9.7 61 13 27 10.3 76 9 36 14.3 72 20 37 9.2 65 11 44 9.7 62 7 48 14.3 80 7 49 10.3 69 59 51 6.3 79 18 65 13.2 58 22 71 10.3 77 16 77 7.4 82 6 78 18.4 57 20 81 8.6 82 52 82 12 86 39 83 6.9 81 32 92 12 61 32 92 15.5 84 47 95 7.4 87 19 99 13.8 59 13 112 11.5 71 23 115 7.4 76 36 118 8 72 12 120 11.5 73 29 127 9.7 82 18 131 8 76 13 137 10.3 76 36 139 10.3 81 23 148 8 82 12 149 12.6 74 65 157 9.7 80 96 167 6.9 91 27 175 14.9 81 64 175 4.6 83 85 175 7.4 89 73 183 2.8 93 79 187 5.1 87 85 188 6.3 94 91 189 4.6 93 41 190 7.4 67 44 190 10.3 78 14 191 14.3 75 21 191 14.9 77 44 192 11.5 86 30 193 6.9 70 78 197 5.1 92 16 201 8 82 76 203 9.7 97 110 207 8 90 45 212 9.7 79 82 213 7.4 88 73 215 8 86 23 220 10.3 78 63 220 11.5 85 20 223 11.5 68 108 223 8 85 115 223 5.7 79 18 224 13.8 67 118 225 2.3 94 89 229 10.3 90 21 230 10.9 75 32 236 9.2 81 44 236 14.9 81 46 237 6.9 78 84 237 6.3 96 13 238 12.6 64 24 238 10.3 68 28 238 6.3 77 168 238 3.4 81 31 244 10.9 78 49 248 9.2 85 20 252 10.9 80 45 252 14.9 81 64 253 7.4 83 59 254 9.2 81 122 255 4 89 16 256 9.7 69 21 259 15.5 77 21 259 15.5 76 24 259 9.7 73 48 260 6.9 81 10 264 14.3 73 97 267 6.3 92 135 269 4.1 84 97 272 5.7 92 28 273 11.5 82 14 274 10.9 68 35 274 10.3 82 50 275 7.4 86 77 276 5.1 88 37 279 7.4 76 37 284 20.7 72 61 285 6.3 84 11 290 9.2 66 71 291 13.8 90 80 294 8.6 86 23 299 8.6 65 34 307 12 66 18 313 11.5 62 40 314 10.9 83 11 320 16.6 73 30 322 11.5 68 39 323 11.5 87 14 334 11.5 64 ; title '----- Data on Ozone, Solar Wind Temp ------'; proc reg data=air ; model Ozone = Solar Wind Temp / ss1 ss2 stb vif clb COLLIN covb corrb dw; run; ods html close;