how to identify cases with specific words/phrases in open-ended response

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to identify cases with specific words/phrases in open-ended response

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

Reply | Threaded
Open this post in threaded view
|

Re: how to identify cases with specific words/phrases in open-ended response

Marks, Jim

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)
Sent: Friday, December 10, 2010 10:28 AM
To: [hidden email]
Subject: how to identify cases with specific words/phrases in open-ended response

 

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

Reply | Threaded
Open this post in threaded view
|

Re: how to identify cases with specific words/phrases in open-ended response

Cleland, Patricia (EDU)

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]]
Sent: December 10, 2010 11:43 AM
To: Cleland, Patricia (EDU); [hidden email]
Subject: RE: how to identify cases with specific words/phrases in open-ended response

 

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)
Sent: Friday, December 10, 2010 10:28 AM
To: [hidden email]
Subject: how to identify cases with specific words/phrases in open-ended response

 

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