全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1410 1
2015-01-04
悬赏 40 个论坛币 未解决
在表三,谢谢

book1.rar

大小:13.44 KB

 马上下载

本附件包括:

  • book1.xlsx

二维码

扫码加我 拉你入群

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

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

全部回复
2015-1-5 11:59:15
%macro test(dsin=, byvar=,pctlow=, pcthigh=, dsout=);
proc sort data=&dsin;
        by &byvar;
run;
proc univariate noprint data=&dsin;
var var;
output out=quintile pctlpts=&pctlow &pcthigh pctlpre=pct;
by &byvar;
run;
data &dsout(drop=pct&pctlow pct&pcthigh);
        merge test(in=a) quintile(in=b);
        by &byvar;
        if pct&pctlow<=var<=pct&pcthigh;
run;
%mend;

%test(dsin=test, byvar=year qua, pctlow=0, pcthigh=10, dsout=want);
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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