HELP! Syntax problem for composites

#1
Hi guys,

I'm not sure if anyone can help me without seeing the data - but here goes.

So I am a psych student doing an honors thesis at UVM. My adviser has charged me with figuring part of the SPSS syntax problems but there is one bit that is still getting me hung up.

I'm trying to run a repeated measures ANOVA, and instead of the initial measures she decided she wants me to create new composites for reaction times. I was unaware of just how much was going to be needed.

Here is the deal - I've got one 6 question measure that participants completed twice.

I've got reaction times for each question for both completions. I'm taking the fastest and slowest reaction times from each completion of the 6 questions, averaging them, and trying to get a mean for time 1 and a mean for time 2 to run the final ANOVAS.

I'm trying to create a composite so that I get a mean for EACH participant for BOTH times. I'll go ahead an paste the syntax I came up with below, but it is a bit lengthy. Ultimately my problem is that I am somehow missing the syntax so that not all participants have the fast times and therefore do not have a mean for either time.

If you can tell me what I'm doing wrong, I will literally send you flowers...or a pony...or something. HELP!

Thanks

DATASET ACTIVATE DataSet1.
IF (aclosert>afrienrt & aclosert>acomfrt & aclosert>ameetrt & aclosert>alikert)
aslowrt=aclosert.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (aclosert<afrienrt & aclosert<acomfrt & aclosert<ameetrt & aclosert<alikert)
afastrt=aclosert.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (afrienrt>aclosert & afrienrt>acomfrt & afrienrt>ameetrt & afrienrt>alikert)
aslowrt=afrienrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (afrienrt<aclosert & afrienrt<acomfrt & afrienrt<ameetrt & afrienrt<alikert)
afastrt=afrienrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (acomfrt>aclosert & acomfrt>afrienrt & acomfrt>ameetrt & acomfrt>alikert)
aslowrt=acomfrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (acomfrt<aclosert & acomfrt<afrienrt & acomfrt<ameetrt & acomfrt<alikert)
afastrt=acomfrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (ameetrt>aclosert & ameetrt>afrienrt & ameetrt>acomfrt & ameetrt>alikert)
aslowrt=ameetrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (ameetrt<aclosert & ameetrt<afrienrt & ameetrt<ameetrt & ameetrt<alikert)
afastrt=ameetrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (alikert>aclosert & alikert>afrienrt & alikert>acomfrt & alikert>ameetrt)
aslowrt=alikert.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (alikert<aclosert & alikert<afrienrt & alikert<ameetrt & alikert<ameetrt)
afastrt=alikert.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.


IF (bclosert>bfrienrt & bclosert>bcomfrt & bclosert>bmeetrt & bclosert>blikert)
bslowrt=bclosert.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (bclosert<bfrienrt & bclosert<bcomfrt & bclosert<bmeetrt & bclosert<blikert)
bfastrt=bclosert.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (bfrienrt>bclosert & bfrienrt>bcomfrt & bfrienrt>bmeetrt & bfrienrt>blikert)
bslowrt=bfrienrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (bfrienrt<bclosert & bfrienrt<bcomfrt & bfrienrt<bmeetrt & bfrienrt<blikert)
bfastrt=bfrienrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (bcomfrt>bclosert & bcomfrt>bfrienrt & bcomfrt>bmeetrt & bcomfrt>blikert)
bslowrt=bcomfrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (bcomfrt<bclosert & bcomfrt<bfrienrt & bcomfrt<bmeetrt & bcomfrt<blikert)
bfastrt=bcomfrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (bmeetrt>bclosert & bmeetrt>bfrienrt & bmeetrt>bcomfrt & bmeetrt>blikert)
bslowrt=bmeetrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (bmeetrt<bclosert & bmeetrt<bfrienrt & bmeetrt<bmeetrt & bmeetrt<blikert)
bfastrt=bmeetrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.
IF (blikert>bclosert & blikert>bfrienrt & blikert>bcomfrt & blikert>bmeetrt)
bslowrt=blikert.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (blikert<bclosert & blikert<bfrienrt & blikert<bmeetrt & blikert<bmeetrt)
bfastrt=blikert.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.




IF ((alikert = afastrt & afrienrt=aslowrt) or (alikert=aslowrt & afrienrt=afastrt))
likert_1=mean(aclosert, acomfrt, ameetrt).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((aclosert = afastrt & afrienrt=aslowrt) or (aclosert=aslowrt & afrienrt=afastrt))
likert_1=mean(alikert, acomfrt, ameetrt).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((acomfrt = afastrt & afrienrt=aslowrt) or (acomfrt=aslowrt & afrienrt=afastrt))
likert_1=mean(alikert, aclosert, ameetrt).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((ameetrt = afastrt & afrienrt=aslowrt) or (ameetrt=aslowrt & afrienrt=afastrt))
likert_1=mean(alikert, acomfrt, aclosert).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((ameetrt = afastrt & alikert=aslowrt) or (ameetrt=aslowrt & alikert=afastrt))
likert_1=mean(afrienrt, acomfrt, aclosert).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((ameetrt = afastrt & acomfrt=aslowrt) or (ameetrt=aslowrt & acomfrt=afastrt))
likert_1=mean(afrienrt, alikert, aclosert).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((ameetrt = afastrt & aclosert=aslowrt) or (ameetrt=aslowrt & aclosert=afastrt))
likert_1=mean(afrienrt, alikert, acomfrt).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((alikert = afastrt & aclosert=aslowrt) or (alikert=aslowrt & aclosert=afastrt))
likert_1=mean(afrienrt, ameetrt, acomfrt).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((alikert = afastrt & acomfrt=aslowrt) or (alikert=aslowrt & acomfrt=afastrt))
likert_1=mean(afrienrt, ameetrt, aclosert).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.
IF ((aclosert = afastrt & acomfrt=aslowrt) or (aclosert=aslowrt & acomfrt=afastrt))
likert_1=mean(afrienrt, ameetrt, alikert).
VARIABLE LABELS likert_1 'mean reation time for time 1 liking'.
EXECUTE.

IF ((blikert = bfastrt & bfrienrt=aslowrt) or (blikert=bslowrt & bfrienrt=bfastrt))
likert_2=mean(bclosert, bcomfrt, bmeetrt).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bclosert = bfastrt & bfrienrt=bslowrt) or (bclosert=bslowrt & bfrienrt=bfastrt))
likert_2=mean(blikert, bcomfrt, bmeetrt).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bcomfrt = bfastrt & bfrienrt=bslowrt) or (bcomfrt=bslowrt & bfrienrt=bfastrt))
likert_2=mean(blikert, bclosert, bmeetrt).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bmeetrt = bfastrt & bfrienrt=bslowrt) or (bmeetrt=bslowrt & bfrienrt=bfastrt))
likert_2=mean(blikert, bcomfrt, bclosert).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bmeetrt = bfastrt & blikert=bslowrt) or (bmeetrt=bslowrt & blikert=bfastrt))
likert_2=mean(bfrienrt, bcomfrt, bclosert).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bmeetrt = bfastrt & bcomfrt=bslowrt) or (bmeetrt=bslowrt & bcomfrt=bfastrt))
likert_2=mean(bfrienrt, blikert, bclosert).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bmeetrt = bfastrt & bclosert=bslowrt) or (bmeetrt=bslowrt & bclosert=bfastrt))
likert_2=mean(bfrienrt, blikert, bcomfrt).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((blikert = bfastrt & bclosert=bslowrt) or (blikert=bslowrt & bclosert=bfastrt))
likert_2=mean(bfrienrt, bmeetrt, bcomfrt).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((blikert =bfastrt & bcomfrt=bslowrt) or (blikert=aslowrt & bcomfrt=afastrt))
likert_2=mean(bfrienrt, bmeetrt, bclosert).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
IF ((bclosert = bfastrt & bcomfrt=bslowrt) or (bclosert=bslowrt & bcomfrt=bfastrt))
likert_2=mean(bfrienrt, bmeetrt, blikert).
VARIABLE LABELS likert_2 'mean reation time for time 2 liking'.
EXECUTE.
 
#2
So -

I have mostly fixed it. The one I posted still had some serious problems. I've located the problem, overall - it is in my Bslowrt portion. I'm going to post the first half, take a look at it maybe I am missing something?

DATASET ACTIVATE DataSet1.
IF (aclosert>afrienrt & aclosert>acomfrt & aclosert>ameetrt & aclosert>alikert & aclosert>aworkrt)
aslowrt=aclosert.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (aclosert<afrienrt & aclosert<acomfrt & aclosert<ameetrt & aclosert<alikert & aclosert<aworkrt)
afastrt=aclosert.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (afrienrt>aclosert & afrienrt>acomfrt & afrienrt>ameetrt & afrienrt>alikert & afrienrt>aworkrt)
aslowrt=afrienrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (afrienrt<aclosert & afrienrt<acomfrt & afrienrt<ameetrt & afrienrt<alikert & afrienrt<aworkrt)
afastrt=afrienrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (acomfrt>aclosert & acomfrt>afrienrt & acomfrt>ameetrt & acomfrt>alikert & acomfrt>aworkrt)
aslowrt=acomfrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (acomfrt<aclosert & acomfrt<afrienrt & acomfrt<ameetrt & acomfrt<alikert & acomfrt<aworkrt)
afastrt=acomfrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (ameetrt>aclosert & ameetrt>afrienrt & ameetrt>acomfrt & ameetrt>alikert & ameetrt>aworkrt)
aslowrt=ameetrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (ameetrt<aclosert & ameetrt<afrienrt & ameetrt<acomfrt & ameetrt<alikert & ameetrt<aworkrt)
afastrt=ameetrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (alikert>aclosert & alikert>afrienrt & alikert>acomfrt & alikert>ameetrt & alikert>aworkrt)
aslowrt=alikert.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (alikert<aclosert & alikert<afrienrt & alikert<acomfrt & alikert<ameetrt & alikert<aworkrt)
afastrt=alikert.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.

IF (aworkrt>aclosert & aworkrt>afrienrt & aworkrt>acomfrt & aworkrt>ameetrt & aworkrt>alikert)
aslowrt=aworkrt.
VARIABLE LABELS aslowrt 'the Ps slowest RT for liking at time 1'.
EXECUTE.
IF (aworkrt<aclosert & aworkrt<afrienrt & aworkrt<acomfrt & aworkrt<ameetrt & aworkrt<alikert)
afastrt=aworkrt.
VARIABLE LABELS afastrt 'the Ps fastest RT for liking at time 1'.
EXECUTE.


IF (bclosert>bfrienrt & bclosert>bcomfrt & bclosert>bmeetrt & bclosert>blikert & bclose>bworkrt)
bslowrt=bclosert.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (bclosert<bfrienrt & bclosert<bcomfrt & bclosert<bmeetrt & bclosert<blikert & bclosert<bworkrt)
bfastrt=bclosert.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.

IF (bfrienrt>bclosert & bfrienrt>bcomfrt & bfrienrt>bmeetrt & bfrienrt>blikert & bfrienrt>bworkrt)
bslowrt=bfrienrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (bfrienrt<bclosert & bfrienrt<bcomfrt & bfrienrt<bmeetrt & bfrienrt<blikert & bfrienrt<bworkrt)
bfastrt=bfrienrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.

IF (bcomfrt>bclosert & bcomfrt>bfrienrt & bcomfrt>bmeetrt & bcomfrt>blikert & bcomfrt>bworkrt)
bslowrt=bcomfrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (bcomfrt<bclosert & bcomfrt<bfrienrt & bcomfrt<bmeetrt & bcomfrt<blikert & bcomfrt<bworkrt)
bfastrt=bcomfrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.

IF (bmeetrt>bclosert & bmeetrt>bfrienrt & bmeetrt>bcomfrt & bmeetrt>blikert & bcomfrt>bworkrt)
bslowrt=bmeetrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (bmeetrt<bclosert & bmeetrt<bfrienrt & bmeetrt<bcomfrt & bmeetrt<blikert & bmeetrt<bworkrt)
bfastrt=bmeetrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.

IF (blikert>bclosert & blikert>bfrienrt & blikert>bcomfrt & blikert>bmeetrt & blikert>bworkrt)
bslowrt=blikert.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (blikert<bclosert & blikert<bfrienrt & blikert<bcomfrt & blikert<bmeetrt & blikert<bworkrt)
bfastrt=blikert.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.

IF (bworkrt>bclosert & bworkrt>bfrienrt & bworkrt>bcomfrt & bworkrt>bmeetrt & bworkrt>blikert)
bslowrt=bworkrt.
VARIABLE LABELS bslowrt 'the Ps slowest RT for liking at time 2'.
EXECUTE.
IF (bworkrt<bclosert & bworkrt<bfrienrt & bworkrt<bcomfrt & bworkrt<bmeetrt & bworkrt<blikert)
bfastrt=bworkrt.
VARIABLE LABELS bfastrt 'the Ps fastest RT for liking at time 2'.
EXECUTE.