I need to compute 61 new variables using a simple math equation based on 4 sets of 61 existing variables. I know I can write 61 compute statements. Is there a more elegant way of creating these variables? Here's how the 61 statements would look:
COMPUTE score_1 = factor_1 * (a_1 + b_1) + c_1.
...
COMPUTE score_61 = factor_61 * (a_61 + b_61) + c_61.
EXECUTE.
Thanks in advance.
recode
accept to and numbers my new variables (recode raw1 to raw61 (1=0) (2=1) into a_1 to a_61.
) Can I do the same here?