SAS Proc Freq不显示值

时间:2020-02-12 13:50:18

标签: sas frequency

我正在使用Proc Freq进行一些简单的交叉制表,但是我注意到输出SAS给我的声音不包含任何频率计数。我只得到百分比。

这是我在SAS中运行的示例代码(我正在使用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;

我希望表中的频率计数与下面的列百分比相对应,但这是SAS给我的:

enter image description here

有人知道我如何获得要显示的频率值吗?

3 个答案:

答案 0 :(得分:1)

我运行了您的代码并得到了它。我认为您没有告诉我们一些事情。

enter image description here

答案 1 :(得分:1)

谢谢大家的帮助-我发现了问题。 SAS随附的交叉表频率模板似乎出现了问题。我可以使用以下代码将其还原:

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

谢谢大家的帮助!

答案 2 :(得分:0)

@_ null_您的图像不是运行问题代码时得到的输出。

Frequency和Col Pct不在行标题单元格中,而是显示在表格左侧的框中。

enter image description here