【问题标题】:How to change percent type in proc freq (SAS)如何更改 proc freq (SAS) 中的百分比类型
【发布时间】:2016-06-15 19:24:05
【问题描述】:

我正在计算数据集中两个变量的条件频率:

proc freq data=input noprint;
tables VAR1 * VAR2 / out=output; 
run;

我想知道每个VAR1-i 是否有不止一种类型的VAR2-i。但是在输出中有count,它计算VAR-1-i 出现了多少次VAR2-i(如我所愿),而percentcountdataset 的记录总数中的百分比相反,我想要VAR1-i 记录总数的百分比。

我该如何解决?

【问题讨论】:

    标签: sas frequency


    【解决方案1】:

    您缺少 outpct 选项。

    proc freq data=input noprint;
       tables VAR1 * VAR2 / out=output outpct; 
    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
      相关资源
      最近更新 更多