I am executing the following in SPSS:
DO IF (A1=4).
COMPUTE (A1_COR=1).
ELSE IF (A1~=4).
COMPUTE (A1_COR=0).
END IF.
EXECUTE.
Can anyone see why I am receiving the, "An equals sign was not found when expected after the target variable" error?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityI am executing the following in SPSS:
DO IF (A1=4).
COMPUTE (A1_COR=1).
ELSE IF (A1~=4).
COMPUTE (A1_COR=0).
END IF.
EXECUTE.
Can anyone see why I am receiving the, "An equals sign was not found when expected after the target variable" error?
It should looks like this:
DO IF (A1=4).
COMPUTE A1_COR=1.
ELSE.
COMPUTE A1_COR=0.
END IF.
EXECUTE.