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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.