Contents: | Purpose / History / Requirements / Usage / Details / Limitations |
_CP_
), predicted residual sum of squares (_PRESS_
), root mean square error (_RMSE_
), mean square error (_MSE_
), R2 (_RSQ_
), adjusted R2 (_ADJRSQ_
), Akaike's information criterion (_AIC_
), Sawa's Bayesian information criterion (_BIC_
), or Schwarz's Bayesian criterion (_SBC_
).
%inc "<location of your file containing the ALLSUBSREG macro>";
Following this statement, you may call the %ALLSUBSREG macro. See the Results tab for an example.
The following macro parameters are required:
The following macro parameters are optional:
_P_ _CP_ _PRESS_ _RMSE_ _MSE_ _RSQ_ _ADJRSQ_ _AIC_ _BIC_ _SBC_
_P_ _CP_ _PRESS_ _RMSE_ _MSE_ _RSQ_ _ADJRSQ_ _AIC_ _BIC_ _SBC_
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
data fitness; input Age Weight Oxygen RunTime RestPulse RunPulse MaxPulse @@; datalines; 44 89.47 44.609 11.37 62 178 182 40 75.07 45.313 10.07 62 185 185 44 85.84 54.297 8.65 45 156 168 42 68.15 59.571 8.17 40 166 172 38 89.02 49.874 9.22 55 178 180 47 77.45 44.811 11.63 58 176 176 40 75.98 45.681 11.95 70 176 180 43 81.19 49.091 10.85 64 162 170 44 81.42 39.442 13.08 63 174 176 38 81.87 60.055 8.63 48 170 186 44 73.03 50.541 10.13 45 168 168 45 87.66 37.388 14.03 56 186 192 45 66.45 44.754 11.12 51 176 176 47 79.15 47.273 10.60 47 162 164 54 83.12 51.855 10.33 50 166 170 49 81.42 49.156 8.95 44 180 185 51 69.63 40.836 10.95 57 168 172 51 77.91 46.672 10.00 48 162 168 48 91.63 46.774 10.25 48 162 164 49 73.37 50.388 10.08 67 168 168 57 73.37 39.407 12.63 58 174 176 54 79.38 46.080 11.17 62 156 165 52 76.32 45.441 9.63 48 164 166 50 70.87 54.625 8.92 48 146 155 51 67.25 45.118 11.08 48 172 172 54 91.63 39.203 12.88 44 168 172 51 73.71 45.790 10.47 59 186 188 57 59.08 50.545 9.93 49 148 155 49 76.32 48.673 9.40 56 186 188 48 61.24 47.920 11.50 52 170 176 52 82.78 47.467 10.50 53 170 172 ; %inc "<location of your file containing the ALLSUBSREG macro>"; %allsubsreg(data=fitness, depvar=oxygen, indepvar=age weight runtime restpulse runpulse maxpulse, sortvar=_press_, printvar=_P_ _CP_ _PRESS_ _RMSE_ _MSE_ _RSQ_ _ADJRSQ_ _AIC_ _BIC_ _SBC_ );
All Possible Subset Models Sorted by _press_ ---------------------------- Number of regressors in model=1 ----------------------------- VarsIn Obs Model _IN_ _P_ _CP_ _PRESS_ _RMSE_ _MSE_ _RSQ_ _ADJRSQ_ _AIC_ _BIC_ 1 Weight 1 2 127.395 943.165 5.34606 28.5803 0.02649 -0.00708 105.867 103.392 2 MaxPulse 1 2 122.707 925.401 5.26427 27.7126 0.05605 0.02350 104.911 102.482 3 Age 1 2 116.882 906.968 5.16084 26.6343 0.09278 0.06149 103.681 101.312 4 RestPulse 1 2 106.302 834.260 4.96748 24.6758 0.15949 0.13050 101.313 99.065 5 RunPulse 1 2 106.477 794.646 4.97073 24.7082 0.15838 0.12936 101.354 99.104 6 RunTime 1 2 13.699 250.901 2.74478 7.5338 0.74338 0.73453 64.534 65.467 Rest Obs _SBC_ Intercept Age Weight RunTime Pulse RunPulse MaxPulse 1 108.735 55.4379 . -0.10410 . . . . 2 107.779 71.2907 . . . . . -0.13762 3 106.549 62.2206 -0.31136 . . . . . 4 104.181 62.3003 . . . -0.27921 . . 5 104.222 82.4582 . . . . -0.20680 . 6 67.402 82.4218 . . -3.31056 . . .
Right-click on the link below and select Save to save
the %ALLSUBSREG macro definition
to a file. It is recommended that you name the file
allsubsreg.sas
.
Download and save allsubsreg.sas
Type: | Sample |
Topic: | Analytics ==> Multivariate Analysis SAS Reference ==> Procedures ==> REG Analytics ==> Regression |
Date Modified: | 2016-06-02 11:18:23 |
Date Created: | 2005-01-13 15:02:49 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | SAS/STAT | AIX | ||
ABI+ for Intel Architecture | ||||
64-bit Enabled Solaris | ||||
64-bit Enabled HP-UX | ||||
64-bit Enabled AIX | ||||
Windows Vista for x64 | ||||
Windows Vista | ||||
Windows Millennium Edition (Me) | ||||
Windows 7 Ultimate x64 | ||||
Windows 7 Ultimate 32 bit | ||||
Windows 7 Professional x64 | ||||
Windows 7 Professional 32 bit | ||||
Windows 7 Home Premium x64 | ||||
Windows 7 Home Premium 32 bit | ||||
Windows 7 Enterprise x64 | ||||
Windows 7 Enterprise 32 bit | ||||
Microsoft Windows XP Professional | ||||
Microsoft Windows Server 2012 Std | ||||
Microsoft Windows Server 2012 R2 Std | ||||
Microsoft Windows Server 2012 R2 Datacenter | ||||
Microsoft Windows Server 2012 Datacenter | ||||
Microsoft Windows Server 2008 for x64 | ||||
Microsoft Windows Server 2008 R2 | ||||
Microsoft Windows Server 2008 | ||||
Microsoft Windows Server 2003 for x64 | ||||
Microsoft Windows Server 2003 Standard Edition | ||||
Microsoft Windows Server 2003 Enterprise Edition | ||||
Microsoft Windows Server 2003 Datacenter Edition | ||||
Microsoft Windows NT Workstation | ||||
Microsoft Windows 2000 Professional | ||||
Microsoft Windows 2000 Server | ||||
Microsoft Windows 2000 Datacenter Server | ||||
Microsoft Windows 2000 Advanced Server | ||||
Microsoft Windows 95/98 | ||||
Microsoft Windows 10 | ||||
Microsoft Windows 8.1 Pro x64 | ||||
Microsoft Windows 8.1 Pro 32-bit | ||||
Microsoft Windows 8.1 Enterprise x64 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | ||||
Microsoft Windows 8 Pro x64 | ||||
Microsoft Windows 8 Pro 32-bit | ||||
Microsoft Windows 8 Enterprise x64 | ||||
Microsoft Windows 8 Enterprise 32-bit | ||||
OS/2 | ||||
Microsoft® Windows® for x64 | ||||
Microsoft Windows XP 64-bit Edition | ||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | ||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | ||||
Microsoft® Windows® for 64-Bit Itanium-based Systems | ||||
OpenVMS VAX | ||||
z/OS 64-bit | ||||
z/OS | ||||
HP-UX | ||||
HP-UX IPF | ||||
IRIX | ||||
Linux | ||||
Linux for x64 | ||||
Linux on Itanium | ||||
OpenVMS Alpha | ||||
OpenVMS on HP Integrity | ||||
Solaris | ||||
Solaris for x64 | ||||
Tru64 UNIX |