if RTRIM(acb10a_1) = '1' recode_1 = 9.
If acb10a_1 is not a string, try without the quotes.
I'm not an experienced user of SPSS, especially not syntax, so I have
encountered some problems that I hope somebody can help me with. I have
searched the web but there seems to be nothing that can lead me in the
correct direction. The problems are:
1. I have 10 variables and 2001 cases. Each case have a value for each
variable from 0-10 with 11 and 12 coded missing. I need to make a count of
which variable, or variables if tied, each case values the highest. The
grand total for each variable is needed, not which cases that values the
variables. How can I write this in a syntax, since I think that would be the
correct method to use?
2. The same 10 variables and 2001 cases. Each case gives the values to the
variables. Now I have to give the lowest valued variable the score of 1,
second-lowest the score of 2 and so on, until the maximum of 10 for the
highest valued variable. Since each case doesn't necessarily value all
variables, I can't just recode as usual, instead I think I need to make some
syntax that can recode and count this, but how?
Any help, advice and suggestion will be welcome.
Martin Ejnar Hansen