楼主: dxystata
1489 10

如何得到这样的数据集 [推广有奖]

11
wang1839 在职认证  发表于 2017-2-22 22:45:05
  1. data b;
  2.         set aaa;
  3.         by id treat;
  4.         retain x0 x1;
  5.         if visit=2 then x0=x;
  6.         if visit=6 then do;
  7.         treat1=substr(treat,1,1);
  8.         x1=x;
  9.         output;
  10.         end;
  11.         else if  visit=10 then do;
  12.         treat1=substr(treat,2,1);
  13.         x0=x1;
  14.         x1=x;
  15.         output;
  16.         end;
  17.     drop x;
  18. run;
复制代码

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-24 12:55