全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2147 2
2013-09-21
proc report data=sashelp.class  nowd;
        column name  Weight   pt;
        define name/group;
        define Weight/ order;
        define pct/computed;

        rbreak after/summarize  suppress;

        compute before ;
                total=Weight;
        endcomp;

        compute pct;
                pct=Weight/total;
        endcomp;
run;

运行以上程序,发现output中的pct的值为空值,不知道如何修改,才能算出每个人体重占所有人体重和相应的百分比,求大侠指导,谢谢!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-9-21 22:50:44
column name  Weight   pct;  *not pc, sorry; 第二句的pct列敲成pc了,不好意思,继续求解,谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-9-22 09:33:27
proc report data=sashelp.class  nowd;
        column name  Weight  pct;
        define name/group;
        define Weight/analysis ;
                define pct/computed format=percent8.2;

        compute before ;
                total=Weight.sum;
        endcomp;

        compute pct;
                pct=Weight.sum/total;
        endcomp;
        rbreak after/summarize  suppress;
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群