【问题标题】:Add row percentage within top column in proc tabulate (SAS)在 proc tabulate (SAS) 的顶列中添加行百分比
【发布时间】:2018-11-06 11:07:18
【问题描述】:

我在 SAS 中使用Proc tabulate,我想制作一个像这样的表格:enter image description here

如您所见,我想计算每年的rowpctn。我的问题是我不知道代码中rowpctn在哪里写,在网上搜索了一个小时,仍然没有找到答案。

我的代码如下所示:

Proc tabulate Data=Have;
class year gender question_1;
table gender, year*question_1;
run;

我必须在哪里声明 rowpctn 才能获得所需的结果?

【问题讨论】:

    标签: sas proc


    【解决方案1】:

    在等待回复的过程中,我一直在互联网上寻找答案,我自己设法找到了解决方案。

    代码如下:

    Proc tabulate Data=Have;
    class year gender question_1;
    table gender*pctn<question_1>, year*question_1;
    run;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多