DATA vegas_new_e;
SET vegas_new_d;
ARRAY new(6) f1 f2 f3 f4 f5 f6; /*Create new array facility 1 -6 and variables f1 - f6 by recode ‘yes’ as ‘1’ and ‘no’ as ‘0’*/
ARRAY old (6) pool--internet;
DO (i) = 1 TO 6;
IF old (i) = 'YES' THEN new (i) = 1;
ELSE new (i) = 0;
END;
SumFac = SUM( OF f1 - f6 ); /*create new variable SumFac to calculate the total sum of facilities score*/
PROC PRINT DATA=vegas_new_e;
TITLE 'vegas_new_e';
RUN; why it isn't work i have been run this before successfully and when i close the programme and reopen it, it fails to work
... View more