I am new to SPSS, the world of statistics and new to this forum. I am doing research in conjunction with my Masters Degree and running into a bit of a problem and looking for some help. Yes, I could hire a consultant, but view this part of the learning process, and would like to see if I cannot master this - with your help of course.....
I am looking to add: q1 and q51 q2 and q52 q3 and q53 etc.... through to q50 and q100
The new variable names currently are TOTAL1 to TOTAL50, but could be anything. Q1 to q100 exist and are consecutive TOTAL1 to TOTAL 50 exists and are consecutive
I have tried:
do repeat x = q1 to q50
/y = q51 to q100
/z = TOTAL1 to TOTAL50.
COMPUTE z = x + y.
end repeat .
EXECUTE.
But getting the following in the output:
Error # 4502 in column 11. Text: = An equals sign appears in a variable or value list where it is not expected. It will be ignored. Execution of this command stops.
Error # 4508 in column 15. Text: + Unrecognized text appears on the DO REPEAT command. It will be ignored. EXECUTE. do repeat x = q1 to q50 / y = q51 to q100 / z = TOTAL1 to TOTAL50 COMPUTE z = x + y end repeat .
Error # 4502 in column 11. Text: = An equals sign appears in a variable or value list where it is not expected. It will be ignored. Execution of this command stops.
Error # 4508 in column 15. Text: + Unrecognized text appears on the DO REPEAT command. It will be ignored. EXECUTE.
Is this the best way of doing this? Can anyone spot a syntax error?
I am using SPSS v. 20.