The script uses the 'cars' dataset from the SASHELP library, which is a standard example dataset provided with SAS installations, requiring no external data management or internal creation.
1 Code Block
PROC FREQ
Explanation : This block executes PROC FREQ with default parameters for the 'type' variable from the SASHELP.CARS dataset. The resulting report includes frequency, percentage, cumulative frequency, and cumulative percentage, which is the standard behavior of PROC FREQ without specific options on the TABLES statement. A descriptive title is added to the report.
Copied!
title "Default Report: Frequency, Percent, Cumulative Frequency, and Cumulative Percent";
proc freq data=sashelp.cars;
tables type; /*1*/
run;
title;
1
title "Default Report: Frequency, Percent, Cumulative Frequency, and Cumulative Percent";
2
PROC FREQDATA=sashelp.cars;
3
tables type; /*1*/
4
RUN;
5
title;
2 Code Block
PROC FREQ
Explanation : This block also executes PROC FREQ on the 'type' variable, but uses the 'nocum' and 'nopercent' options on the TABLES statement. These options suppress the display of cumulative statistics and percentages in the frequency report, respectively, showing only raw frequency counts. A specific title is used for this report.
Copied!
title "Frequency Counts Only";
proc freq data=sashelp.cars;
tables type / nocum nopercent; /*2*/
run;
title;
1
title "Frequency Counts Only";
2
PROC FREQDATA=sashelp.cars;
3
tables type / nocum nopercent; /*2*/
4
RUN;
5
title;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.