means whatever the expression in your data file contains in a given line *is the mean at this given point in time*. What you are calculating manually is thus the "mean of means", which of course does not make any sense.

If you want to manually check the results of the expressions, you ought to sum up the raw latencies in the data file's 'latency' column by trial type (sum up latencies for congruent trials, sum up latencies for incongruent trials) and divide the respective sums by the appropriate number of trials (i.e., number of congruent trials, number of incongruent trials).

<block myblock>

/ trials = [1-20=noreplace(a1,a2,b1,b2)]

</block>

<values>

/ a_rtsum = 0

/ a_ntrials = 0

/ b_rtsum = 0

/ b_ntrials = 0

</values>

<expressions>

/ a_meanrt = (values.a_rtsum / values.a_ntrials)

/ a_meanrt2 = meanlatency(trial.a1, trial.a2)

/ b_meanrt = (values.b_rtsum / values.b_ntrials)

/ b_meanrt2 = meanlatency(trial.b1, trial.b2)

</expressions>

<trial a1>

/ ontrialend = [values.a_ntrials += 1; values.a_rtsum += trial.a1.latency]

/ stimulusframes = [1=mytext]

/ validresponse = (57)

</trial>

<trial a2>

/ ontrialend = [values.a_ntrials += 1; values.a_rtsum += trial.a2.latency]

/ stimulusframes = [1=mytext]

/ validresponse = (57)

</trial>

<trial b1>

/ ontrialend = [values.b_ntrials += 1; values.b_rtsum += trial.b1.latency]

/ stimulusframes = [1=mytext]

/ validresponse = (57)

</trial>

<trial b2>

/ ontrialend = [values.b_ntrials += 1; values.b_rtsum += trial.b2.latency]

/ stimulusframes = [1=mytext]

/ validresponse = (57)

</trial>

<text mytext>

/ items = ("<%script.currenttrial%>")

</text>

<data>

/ columns = [trialnum, trialcode, response, latency,

values.a_rtsum, values.a_ntrials, expressions.a_meanrt, expressions.a_meanrt2,

values.b_rtsum, values.b_ntrials, expressions.b_meanrt, expressions.b_meanrt2,

]

</data>