BookmarkSubscribeRSS Feed
aj8686
Calcite | Level 5

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!

2 REPLIES 2
Cynthia_sas
SAS Super FREQ


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

ballardw
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3423 views
  • 0 likes
  • 3 in conversation