I am trying to write some SPSS syntax to count the number of incorrect responses for students in the longest string of identical responses between pairs of students and not having much luck. This is multiple choice exam data and I have already got SPSS to compute all possible pair comparisons of students. I have the variables for the multiple choice responses, whether each student pair got each question correct/incorrect, as well as whether they have the same responses to each question. I have also calculated the longest string of identical responses for each student pair using this approach: http://www.kingdouglas.com/SPSS/Diverse ... zeroes.txt
. What I have not yet been able to figure out is how to count the number of incorrect responses for each student pair only within that longest string of identical responses.