SAS数据挖掘
SAS data mining
我有一个 ID 为 Good/Bad 指示变量的数据集:
ID Good_Bad
734374 0
4834110 1
我想将 1 的 12 次外推为 0,这样对于每个 0,我都有 12 个 1,如下所示:
ID Good_Bad
734374 0
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
& 这必须使用 SAS 来完成。有人可以帮忙吗?
提前致谢!!
data want;
set have;
if good_bad = 0 then output;
else if good_bad = 1 then do;
do i = 1 to 12;
output;
end;
end;
drop i;
run;
我有一个 ID 为 Good/Bad 指示变量的数据集:
ID Good_Bad
734374 0
4834110 1
我想将 1 的 12 次外推为 0,这样对于每个 0,我都有 12 个 1,如下所示:
ID Good_Bad
734374 0
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
& 这必须使用 SAS 来完成。有人可以帮忙吗?
提前致谢!!
data want;
set have;
if good_bad = 0 then output;
else if good_bad = 1 then do;
do i = 1 to 12;
output;
end;
end;
drop i;
run;