楼主: 小鳄鱼a
1187 1

选取一部分样本 [推广有奖]

  • 6关注
  • 10粉丝

学科带头人

3%

还不是VIP/贵宾

-

威望
0
论坛币
125 个
通用积分
0.0040
学术水平
40 点
热心指数
45 点
信用等级
43 点
经验
32801 点
帖子
1185
精华
0
在线时间
1539 小时
注册时间
2009-7-16
最后登录
2018-10-5

40论坛币
在表三,谢谢

book1.rar

13.44 KB

本附件包括:

  • book1.xlsx

关键词:样本
沙发
jl60156 发表于 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);
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
heguima + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 13:37