Usage Note 22633: Save the parameter estimates, t statistics, p-values, and confidence limits in a data set with PROC REG
Specify an ODS OUTPUT= statement and the CLB option in the MODEL statement to save the ParameterEstimates table containing the parameter estimates and statistics in a data set. See this note which discusses using the ODS OUTPUT statement to save any table from any procedure in a data set. For example, these statements save and display the table.
ods output ParameterEstimates = parms;
proc reg data=sashelp.baseball;
model logsalary = nHits nBB YrMajor / clb;
quit;
proc print data=parms noobs;
run;
MODEL1 |
logSalary |
Intercept |
1 |
4.01391 |
0.11129 |
36.07 |
<.0001 |
3.79476 |
4.23306 |
Intercept |
MODEL1 |
logSalary |
nHits |
1 |
0.00793 |
0.00099350 |
7.98 |
<.0001 |
0.00597 |
0.00989 |
Hits in 1986 |
MODEL1 |
logSalary |
nBB |
1 |
0.00728 |
0.00205 |
3.55 |
0.0005 |
0.00325 |
0.01131 |
Walks in 1986 |
MODEL1 |
logSalary |
YrMajor |
1 |
0.10066 |
0.00755 |
13.33 |
<.0001 |
0.08579 |
0.11553 |
Years in the Major Leagues |
|
Alternatively, specify the TABLEOUT option together with the OUTEST= option in the PROC REG statement to save the standard errors, confidence limits, t values, and associated p-values in the OUTEST= data set. See "Output Data Sets" in the Details section of the PROC REG documentation for a discussion of what is available in the OUTEST= data set. These statements save and display the data set.
proc reg data=sashelp.baseball outest=parmest tableout;
model logsalary = nHits nBB YrMajor;
quit;
proc print data=parmest noobs;
run;
MODEL1 |
PARMS |
logSalary |
0.57834 |
4.0139 |
0.00793 |
0.00728 |
0.1007 |
-1 |
MODEL1 |
STDERR |
logSalary |
0.57834 |
0.1113 |
0.00099 |
0.00205 |
0.0076 |
. |
MODEL1 |
T |
logSalary |
0.57834 |
36.0670 |
7.98061 |
3.55316 |
13.3317 |
. |
MODEL1 |
PVALUE |
logSalary |
0.57834 |
0.0000 |
0.00000 |
0.00045 |
0.0000 |
. |
MODEL1 |
L95B |
logSalary |
0.57834 |
3.7948 |
0.00597 |
0.00325 |
0.0858 |
. |
MODEL1 |
U95B |
logSalary |
0.57834 |
4.2331 |
0.00989 |
0.01131 |
0.1155 |
. |
|
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> REG Analytics ==> Regression
|
Date Modified: | 2019-05-29 16:37:42 |
Date Created: | 2002-12-16 10:56:40 |