后厂村路人丙 2019-08-24 18:06 采纳率: 0%
浏览 479

对于一个1行n列的数据集,sas如何引用具体的各个数值

事实上,我是proc univarite一个分数字段的10分位数临界点,然后需要按照这10个临界点对分数做分组,我想直接引用这个数据,不想每次都要手动输入,尝试了sas数组,但还是没整好。
附上代码:
proc univariate data=cc.merge_psi_nocon; where dt=20181031; var b5score; output out=bin1 pctlpre=p pctlpts=10 to 90 by 10; run;

data cc.merge_psi_nocon; set cc.merge_psi_nocon; if b5score<=481 then fenzu=1; else if b5score<=534 then fenzu=2; else if b5score<=569 then fenzu=3; else if b5score<=598 then fenzu=4; else if b5score<=624 then fenzu=5; else if b5score<=649 then fenzu=6; else if b5score<=676 then fenzu=7; else if b5score<=708 then fenzu=8; else if b5score<=754 then fenzu=9; else fenzu=10; run;

其实我就是想把bin1里的481 534 569 ...直接引用下来图片说明

  • 写回答

1条回答 默认 最新

  • qq_42318971 2020-03-12 16:50
    关注

    put 变量 列号-列号
    x=1234567890;
    put x 5-10;/*输出x的第五到第十个*/
    run;
    67890

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向