Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The SURVEYREG Procedure

Create Output Data Set

PROC SURVEYREG uses the Output Delivery System (ODS) to create output data sets. This is a departure from older SAS procedures that provide OUTPUT statements for similar functionality. For more information on ODS, see Chapter 15, "Using the Output Delivery System."

For example, to place the "ParameterEstimates" table (Figure 62.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 Simple Random Sampling Design';
   proc surveyreg data=IceCream total=StudentTotal;
      strata Grade /list; 
      class Kids;
      model Spending = Income Kids / solution;
      ods output ParameterEstimates = MyParmEst;
      run;

The statement

   ods output ParameterEstimates = MyParmEst;
requests that the "ParameterEstimates" table that appears in Figure 62.7 to be placed in a SAS data set named MyParmEst.

The PRINT procedure displays observations of the data set MyParmEst.

 
   proc print data=MyParmEst; 
   run;

Figure 62.8 displays the observations in the data set MyParmEst.

 
Ice Cream Spending Analysis
Stratified Simple Random Sampling Design

Obs Parameter Estimate StdErr DenDF tValue Probt
1 Intercept -26.084677 2.48241893 37 -10.51 <.0001
2 Income 0.775330 0.04350401 37 17.82 <.0001
3 Kids 1 0.897655 1.11778377 37 0.80 0.4271
4 Kids 2 1.494032 1.25209199 37 1.19 0.2404
5 Kids 3 -0.513181 1.36853454 37 -0.37 0.7098
6 Kids 4 0.000000 0.00000000 37 . .
Figure 62.8: The Data Set MyParmEst

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.