We are doing an analysis of open-ended responses. Is
there a way to identify (create a flag) for a case when there is a specific
word or phrase anywhere in the response? If so, is there a way to identify two or more words (not a phrase) in
an open-ended response? For some cases this may require that all words be
present, for others it may require only a subset of the words. We have v18. Pat |
COMPUTE word_flag = INDEX(text_var,’word’) GT 0. will identify cases where the word is found in the text variable. COMPUTE pair_flag = INDEX(text_var,’word1’) GT 0 AND INDEX(text_var,’word2’) GT 0. will identify cases with both keywords in the text. It might be easier to create individual flags for each word, then use the flag variables in IF statements to capture complex phrases. Don’t forget that INDEX is case-sensitive—something like INDEX(UPCASE(text_var),’WORD’) GT 0 might be needed. Or converting the text variable using UPCASE first. There are text analytic programs that have prepared these sorts of things better. (Anyone know of freeware for text analytics?) Jim Marks Director, Market Research x1616 From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Cleland, Patricia (EDU) We are doing an analysis of open-ended responses. Is there a way to identify (create a flag) for a case when there is a specific word or phrase anywhere in the response? If so, is there a way to identify two or more words (not a phrase) in an open-ended response? For some cases this may require that all words be present, for others it may require only a subset of the words. We have v18. Pat |
Thanks, Jim. That looks do-able. This is a one-shot analysis with a short
time line so we’re going to stick with doing it in SPSS rather than spend
the time and money for a text analysis program. Pat From:
Marks, Jim [mailto:[hidden email]] COMPUTE
word_flag = INDEX(text_var,’word’) GT 0. will identify cases
where the word is found in the text variable. COMPUTE
pair_flag = INDEX(text_var,’word1’) GT 0 AND
INDEX(text_var,’word2’) GT 0. will identify cases
with both keywords in the text. It might be easier to create individual flags
for each word, then use the flag variables in IF statements to capture complex
phrases. Don’t forget
that INDEX is case-sensitive—something like INDEX(UPCASE(text_var),’WORD’)
GT 0 might be needed. Or
converting the text variable using UPCASE first. There are text
analytic programs that have prepared these sorts of things better. (Anyone know
of freeware for text analytics?) Jim Marks Director, Market Research x1616 From:
SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Cleland, Patricia (EDU) We are doing an analysis of open-ended responses. Is
there a way to identify (create a flag) for a case when there is a specific
word or phrase anywhere in the response? If so, is there a way to identify two or more words (not a phrase) in
an open-ended response? For some cases this may require that all words be
present, for others it may require only a subset of the words. We have v18. Pat |
Free forum by Nabble | Edit this page |