SPSS Code Snippets

13 July, 2011   

This example uses count to count the number of times 0 appears among v1-v3 (putting it in z1) and likewise for v4-v6 (putting the count in z2). Then, if z1 is 3, then 9999 is placed in v1-v3 using a do repeat loop. The same is done for v4-v6.

Factors a and b are within subjects while factor c is between subjects. The a*b interaction is statistically significant and we want to do tests of simple main effects on differences in a within each level of b.