后厂村路人丙 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

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘