The SURVEYREG Procedure

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 101.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;
   model Spending = Income;
   weight Weight;
   ods output ParameterEstimates = MyParmEst;
run;

The statement

ods output ParameterEstimates = MyParmEst;

requests that the ParameterEstimates table that appears in Figure 101.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 101.9 displays the observations in the data set MyParmEst. The section ODS Table Names gives the complete list of the tables produced by PROC SURVEYREG.

Figure 101.9: The Data Set MyParmEst

Ice Cream Spending Analysis
Stratified Sample Design

Obs Parameter Estimate StdErr DenDF tValue Probt
1 Intercept -23.416322 1.55827214 37 -15.03 <.0001
2 Income 0.731052 0.03294520 37 22.19 <.0001