I am using proc iml to manipulate the dataset. I am using if statement to check two conditions
if the value is -7 or -8, I wrote this code below but the if statement is giving me errors because i am specifying the or condition incorrectly. Please help.
Proc iml;
use Adult;
read all var {AB34 AC7 AB63 SRSEX RACECEN } into Var1 ;
use Adultf;
read all var {AB34_x AC7_X AB63_X} into VarMiss ;
Var2 = Var1;
HrtIss_X = VarMiss[,1];
DO i=1 to nrow(Var2);
if HrtIss_X[i,1] = -7 or HrtIss_X[i,1] = -8 then Var2[i,1]=.;
end;