Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2023-03-30 15:19:10
Size: 260
Comment:
Revision 5 as of 2023-03-30 20:18:30
Size: 757
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
A procedure for data summarization. It is closely related to the [[SAS/MEANS|MEANS]] procudure. A procedure for data summarization. It is closely related to the [[SAS/Means|MEANS]] procudure.
Line 15: Line 15:
  var VAR;     var VAR;
run;
}}}



=== Class Statement ===

To show statistics for groups, use the '''`CLASS`''' statement.

{{{
proc summary data=LIBREF.TABLE;
    var VAR;
    class GROUPID;
run;
}}}

----



== Output ==

The '''`OUTPUT`''' statement is useful for creating aggregated or higher-level data.

To aggregate the income of all cases in a group, try:

{{{
proc summary data=LIBREF.TABLE;
    class GROUPID;
    var INCOME;
    output out=LIBREF.GROUPTABLE sum=GROUPINCOME;

SAS Summary

A procedure for data summarization. It is closely related to the MEANS procudure.


Usage

proc summary data=LIBREF.TABLE;
    var VAR;
run;

Class Statement

To show statistics for groups, use the CLASS statement.

proc summary data=LIBREF.TABLE;
    var VAR;
    class GROUPID;
run;


Output

The OUTPUT statement is useful for creating aggregated or higher-level data.

To aggregate the income of all cases in a group, try:

proc summary data=LIBREF.TABLE;
    class GROUPID;
    var INCOME;
    output out=LIBREF.GROUPTABLE sum=GROUPINCOME;
run;


CategoryRicottone

SAS/Summary (last edited 2023-03-30 20:18:30 by DominicRicottone)