Output Data Sets |
You can use the OUTPUT statement to create a new SAS data set that contains the estimated linear predictors and their standard error estimates, the residuals from the linear regression, and the confidence limits for the predictors. See the section OUTPUT Statement for more details.
You can use the Output Delivery System (ODS) to create SAS data sets that capture the outputs from PROC SURVEYREG. For more information about ODS, see Chapter 20, Using the Output Delivery System.
For example, to save the "ParameterEstimates" table (Figure 90.7) in the previous section in an output data set, you use the ODS OUTPUT statement as follows:
title1 'Ice Cream Spending Analysis'; title2 'Stratified Sample Design'; proc surveyreg data=IceCream total=StudentTotals; strata Grade /list; class Kids; model Spending = Income Kids / solution; weight Weight; ods output ParameterEstimates = MyParmEst; run;
The statement
ods output ParameterEstimates = MyParmEst;
requests that the "ParameterEstimates" table that appears in Figure 90.7 be placed into a SAS data set MyParmEst.
The PRINT procedure displays observations of the data set MyParmEst:
proc print data=MyParmEst; run;
Figure 90.8 displays the observations in the data set MyParmEst. The section ODS Table Names gives the complete list of the tables produced by PROC SURVEYREG.
Ice Cream Spending Analysis |
Stratified Sample Design |
Obs | Parameter | Estimate | StdErr | DenDF | tValue | Probt |
---|---|---|---|---|---|---|
1 | Intercept | -26.086882 | 2.44108058 | 37 | -10.69 | <.0001 |
2 | Income | 0.776699 | 0.04295904 | 37 | 18.08 | <.0001 |
3 | Kids 1 | 0.888631 | 1.07000634 | 37 | 0.83 | 0.4116 |
4 | Kids 2 | 1.545726 | 1.20815863 | 37 | 1.28 | 0.2087 |
5 | Kids 3 | -0.526817 | 1.32748011 | 37 | -0.40 | 0.6938 |
6 | Kids 4 | 0.000000 | 0.00000000 | 37 | . | . |