This syntax worked in 1991. It creates new intermediate variables which need to be reverse coded to generate
sets of indices of (un)healthy diet.
do repeat
a = v158 to v180 v201 to v221
b = r158 to r180 r201 to r221.
compute b=a.
end repeat.
When I run it I get:
Error # 4502 in column 10. 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 # 4001. Command name: end repeat
An END REPEAT command has appeared without a previous DO REPEAT command.
Execution of this command stops.
Error # 4530. Command name: do repeat
This command is not allowed inside the DO REPEAT/ END REPEAT facility. The
command will be ignored.
Execution of this command stops.
Error # 4502 in column 5. 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 # 4285 in column 11. Text: a
Incorrect variable name: either the name is more than 64 characters, or it is
not defined by a previous command.
Execution of this command stops.
Error # 4001. Command name: end repeat
An END REPEAT command has appeared without a previous DO REPEAT command.
Execution of this command stops.
Is it me or SPSS?
John F Hall MA (Cantab) Dip Ed (Dunelm)
[Retired academic survey researcher]
Email:
[hidden email]
Website:
Journeys in Survey Research
Course:
Survey Analysis Workshop (SPSS)
Research:
Subjective Social Indicators (Quality of Life)
===================== To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command
INFO REFCARD