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?

**Contents**hide

#### Best Answer

It should looks like this:

`DO IF (A1=4). COMPUTE A1_COR=1. ELSE. COMPUTE A1_COR=0. END IF. EXECUTE. `

### Similar Posts:

- Solved – Machine Learning conferences?
- Solved – Machine Learning conferences?
- Solved – How to reset options to default in SAS 9.3?
- Solved – How to use the scale function to make the variable have a mean of 0 and a standard deviation of 1?
- Solved – How does XGboost (Python) differentiate between a nominal variable and a continuous variable?