I am running a basic cross tabulation of two variables (Field, Exam_Date) in a proc freq statement using the following code: proc freq data=regdata2 notitle; table Field*Exam_Date/ norow nocol nopercent; run; The table itself is coming out fine but I still get the legend box on the left of the output screen, which only says the word "frequency" since I told the proc to hide row/column percents, etc.. Is there a way to hide that little legend box and just display the table itself? The legend box is not needed. Thanks!
Hi:
I'd switch to PROC REPORT or PROC TABULATE if all you want is frequency counts in a crosstabular layout. Either procedure would give you what you want without that little box, which is a feature of PROC FREQ and sort of hard to get rid of, not impossible, but not easy, either.
I not on a machine where I can post code, but if you search for previous forum postings, there have been many good examples of both TABULATE and REPORT.
cynthia
Equivalent proc tabulate code would be:
proc tabulate data=regdata2;
class field exam_data;
table field,exam_data*n=' '*f=f6.0;
run;
if your counts are more than 999999 make the f6.0 larger.
This code will not display counts where either of Field or Exam_data are missing. If you want to see the missing, if any, add "/ missing" to the class statement after the variable names.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.