悬赏 5 个论坛币 未解决
各位大神,我在学习SAS软件,我现在想根据会计年度(fyear)与注册地所在州(incorp)这两个变量的取值给新变量(虚拟变量figen)赋值,写了个程序,但是显示没有观测,查了一天资料也没发现问题在哪里,大神如果有知道的可不可以告诉我?感激不尽。另外,请问有没有简单点的程序可以实现这个结果,写了好大一串程序。谢谢各位大神,么么哒!
data sticky.alaw1;
set sticky.a6;
if incorp="va" and fyear>=1968 and fyear<1983
then figen=1;
else if incorp="nv" and fyear>=1969 and fyear<1983
then figen=1;
else if incorp="oh" and fyear>=1970 and fyear<1983
then figen=1;
else if incorp="wi" and fyear>=1973 and fyear<1983
then figen=1;……;else figen=0;run;