Hi, Below is the syntax that I am trying to automate because it needs to be
done several hundred times. I am new to SPSS and feel like I am currently
killing an ant with a slede-hammer by doing this by hand. The entire point
of this syntax is to get the value of "Base1E1_DEL" for every case. But to
arrive at that, in the DO IF, "qA4=1" is related to the variable
label "Base1" (i.e., qA4=10 label equals Base10, etc.) and the "qC1=1" is
related to the "E1" part of the label (no systematic link because label
part is alphanumeric). These two variables qA4 and qC1 do not change in a
systematic way (i.e., they are not 1,2,3,4, etc.). What I have been doing
is copying and pasting this piece of syntax for every single iteration.
(qA4 has 90 different values, and qC1 has 5 different values). Is there a
way to streamline this to change the values of qA4/qC1 and it's
corresponding new variable label, or even better yet, is there a way to
arrive at the _DEL vairable without creating 4 new variables to get there?
Thanks for any help!!
DO IF (qA4=1 AND qC1=1) .
COUNT Base1E1_FAV = qE1a qE1b qE1c (5 thru 6) .
END IF .
DO IF (qA4=1 AND qC1=1).
COUNT Base1E1_TOL = qE1a qE1b qE1c (1 thru 6) .
COMPUTE Base1E1_PFAV = Base1E1_FAV / Base1E1_TOL .
COMPUTE Base1E1_DEL = Base1E1_PFAV-AFFav.