Examining SPSS String variables – Flagging and re-coding data

SPSS string

SPSS string search

While not obvious, SPSS has some simple syntax that makes it easy to search through your string variables looking for key words /phrases.  The below syntax is my default go-to when reviewing open-end comments and trying to categorize their response.  The code controls for the case format of the variable as well as for the text you’re looking for.

If INDEX(Upcase(Var),Upcase("spss"))>0 Flag= 1 . 
exe.

The video below shows just how easy it is to review open-end – string variables and categorize them.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.