0
votes

I am doing some simple cross tabulations using Proc Freq, but I'm noticing that the output SAS gives me doesn't contain any frequency counts; I'm only getting percents.

Here is an example code that I ran in SAS (I am using SAS 9.4):

data test;
  input year 1-5 group $6;
cards;
2018 A
2018 A
2018 B
2018 B
2019 A
2019 A
2019 A
2019 B
;
run;

proc freq data = test;
  table year * group / norow nopercent;
run;

I'm expecting a table that has the frequency counts with the column percentage below, but instead, this is what SAS is giving me:

enter image description here

Does anyone know how I can get the frequency values to be shown?

3
Well that is certainly unusual and not correct. Do you get the same result if you restart SAS ? Are you using a custom template or special ODS HTML options.Richard
There is nothing in your code that leaves out frequencies.draycut
I tried restarting SAS but still got the same results. The computer I am using is brand new (I received it on Monday), so I haven't added any templates or options to it. I will say that I ran similar code on my old computer (which was using SAS 9.3), and I did not get this error.Matthew T
You posted a photograph of the ODS output. Perhaps your styles are messed up and the text is invisible? What do you see in the plain text listing output?Tom
So it is not the STYLE from the ODS. But it might be the TEMPLATE for PROC FREQ that is messed up. Definitely check with SAS support as it does not look like a programming issue, but an installation/configuration issue.Tom

3 Answers

1
votes

I ran your code and got this. I reckon there is something you are not telling us.

enter image description here

1
votes

Thank you all for your help- I found the issue. It looks like there was an issue with the cross-tab frequency template that came with SAS. I was able to restore it by using the following code:

proc template;
    delete base.freq.crosstabfreqs;
run;

Thank you all for your help!

0
votes

@_null_ your image is NOT the output I get when running the questions code.

The Frequency and Col Pct are NOT in row header cells, and instead are shown in a box offset to the left from the table.

enter image description here