在分析的时候,比如做秩和检验时,sas需要下面这种数据形式
那么怎么快捷的生成这种需要的数据形式,我想到了用矩阵的方法,代码如下
- proc iml;
- x1=shape({0,1},16,2); *创建16行,2列,重复值为0,1的矩阵;
- x2=shape({0,2},18,2);
- x3=shape({0,3},13,2);
- x4=shape({1,1},22,2);
- x5=shape({1,2},25,2);
- x6=shape({1,3},2,2);
- create dd from x1 ;*矩阵生成数据集;
- append from x1;
- append from x2;
- append from x3;
- append from x4;
- append from x5;
- append from x6;
- quit;




雷达卡



京公网安备 11010802022788号







