简体   繁体   English

SAS Proc Freq 不显示值

[英]SAS Proc Freq Not Displaying Values

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;我正在使用 Proc Freq 做一些简单的交叉表,但我注意到 SAS 给我的输出不包含任何频率计数; I'm only getting percents.我只得到百分比。

Here is an example code that I ran in SAS (I am using SAS 9.4):这是我在 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;

I'm expecting a table that has the frequency counts with the column percentage below, but instead, this is what SAS is giving me:我期待一个表的频率计数与下面的列百分比,但相反,这就是 SAS 给我的:

在此处输入图片说明

Does anyone know how I can get the frequency values to be shown?有谁知道我怎样才能显示频率值?

I ran your code and got this.我运行了你的代码并得到了这个。 I reckon there is something you are not telling us.我想有些事情你没有告诉我们。

在此处输入图片说明

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. 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!谢谢大家的帮助!

@_null_ your image is NOT the output I get when running the questions code. @_null_ 你的图像不是我在运行问题代码时得到的输出。

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. Frequency 和 Col Pct 不在行标题单元格中,而是显示在表格左侧的框中偏移量中。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM