Hi all
I am trying to combine two variables into a new variable using DO IF ELSE IF
I keep getting an error code - what am I doing wrong!
I added new_var to my variable list first set it to Numeric
This is my code
do if Var_1 = 1 & Var_2 = 0.
Compute new_var =1.
ELSE if Var_1 = 2
Compute new_var=0.
end if.
Apologises for such a basic question
I am trying to combine two variables into a new variable using DO IF ELSE IF
I keep getting an error code - what am I doing wrong!
I added new_var to my variable list first set it to Numeric
This is my code
do if Var_1 = 1 & Var_2 = 0.
Compute new_var =1.
ELSE if Var_1 = 2
Compute new_var=0.
end if.
Apologises for such a basic question