Reputation:
I have a binominal value in SPSS called "emotion" that contains "91" and "95". I would like to select all cases that come after twice "95" and are encoded with "91" themselves. Does anybody know a synthax that makes this possible?
Upvotes: 1
Views: 46
Reputation: 11350
Make sure your data is sorted in the relevant order, then run this:
compute selectthis=(yourvar=91 and lag(yourvar)=95 and lag(yourvar,2)=95).
exe.
select if selectthis=1.
Upvotes: 1