SAS中的SQL语句大全(9)

2025-11-19

data Tx (label='Treatment Code Information' drop=a);

do a=1 to 3000;

Subject_No=a;

if a le 1500 then center =100; else center=200;

random_date=int(15000+20*ranuni(315975)); format random_date mmddyy10.;

if ranuni(97511) lt .5 then tx=1; else tx=2;

output;

end;

label tx='Treatment Code'

random_date='Randomization Date'

subject_no=\

run;

data Scores(label='Recorded Scores at Visits' drop=j c);

length Subject_ID $8 Visit 8 A1-A10 8 B1-B10 $20;

array A[10]; array B[10];

do c=1 to 3000;

if c le 1500 then subject_id=compress('100-'||put(c,z4.));

else subject_id=compress('200-'||put(c, z4.));

do Visit=1 to 20;

do j=1 to 10;

a[j]=j*ranuni(j);

b[j]=left(put(.5+j**2*ranuni(j),7.3));

end;

output;

end;

end;

format a: 5.2;

run;

data Surgery;

length SID $8 Visit 8 case 8;

do k=5 to 3000 by 197;

if k lt 1500 then SID=compress('100-'||put(k,z4.));

else SID=compress('200-'||put(k, z4.));

Visit=10+int(10*ranuni(971156));

case+1;

drop k;

output;

end;

run;


SAS中的SQL语句大全(9).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2024数模校内选拔赛赛题(中南财经政法大学)

相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219