I'm new to macro coding and I'm trying to create a macro that will give
me a 1/0 variable for every combination of two variables. The macro
runs with out error messages, but all of the variables only have values
of 0. It doesn't look like the condition for assigning a 1 is being
met, but I can't figure out why. Any suggestions on the following code
would be helpful.
**CREATE INTERACTION TERMS***;
%DO I=1 %TO &INTCAT.;
%DO J=1 %TO &MAINCAT.;
%IF &INT=&I AND &MAIN=&J %THEN
%STR(&INTDES.&I.&MAINDES.&J. = 1;);
%ELSE %STR(&INTDES.&I.&MAINDES.&J. = 0;);
In this case LFDAIRGC is a numeric variable with values 1 to 5
and CURRMULT is a numeric variable with values 1 to 2.