Language Reference |
computes the subsets of a matrix system that maximize the quadratic form
0 | normal return |
1 | error: the number of elements of is too large to process |
2 | error: is not positive semidefinite |
The leaps and bounds algorithm by Furnival and Wilson (1974) computes the maximum value of quadratic forms for subsets of components. Many statistics computed as a quadratic form can then be used as the criterion for the method of subset selection. These include the regression sum of squares, Wald statistics, and score statistics.
Consider the following fitness data, which consists of observations with values for age measured in years, weight measured in kilograms, time to run 1.5 miles measured in minutes, heart rate while resting, heart rate while running, maximum heart rate recorded while running, and oxygen intake rate while running measured in milliliters per kilogram of body weight per minute.
fit = { 44 89.47 11.37 62 178 182 44.609, 40 75.07 10.07 62 185 185 45.313, 44 85.84 8.65 45 156 168 54.297, 42 68.15 8.17 40 166 172 59.571, 38 89.02 9.22 55 178 180 49.874, 47 77.45 11.63 58 176 176 44.811, 40 75.98 11.95 70 176 180 45.681, 43 81.19 10.85 64 162 170 49.091, 44 81.42 13.08 63 174 176 39.442, 38 81.87 8.63 48 170 186 60.055, 44 73.03 10.13 45 168 168 50.541, 45 87.66 14.03 56 186 192 37.388, 45 66.45 11.12 51 176 176 44.754, 47 79.15 10.60 47 162 164 47.273, 54 83.12 10.33 50 166 170 51.855, 49 81.42 8.95 44 180 185 49.156, 51 69.63 10.95 57 168 172 40.836, 51 77.91 10.00 48 162 168 46.672, 48 91.63 10.25 48 162 164 46.774, 49 73.37 10.08 67 168 168 50.388, 57 73.37 12.63 58 174 176 39.407, 54 79.38 11.17 62 156 165 46.080, 52 76.32 9.63 48 164 166 45.441, 50 70.87 8.92 48 146 155 54.625, 51 67.25 11.08 48 172 172 45.118, 54 91.63 12.88 44 168 172 39.203, 51 73.71 10.47 59 186 188 45.790, 57 59.08 9.93 49 148 155 50.545, 49 76.32 9.40 56 186 188 48.673, 48 61.24 11.50 52 170 176 47.920, 52 82.78 10.50 53 170 172 47.467 };Use the following IML statement to center the data.
fit = fit - j(31,1,1) * fit[:,];Now compute the crossproduct matrices, as follows:
x = fit[,1:6]; y = fit[,7]; xpx = x`*x; xpy = x`*y;The following statements compute the best three regression sums of squares for each size of regressor set:
call maxqform( rc, maxq, xpx, xpy, 3 ); print maxq;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.