This article describes how to create a variable that shows sentiment scores.
The image below shows a text variable:
The image below shows the sentiment score of the above variable
Q makes it convenient to compute a sentiment score variable. Simply put the raw text variable in a summary table (choosing the text question as the blue question) and then select Create > Text Analysis > Sentiment. Another way to achieve the same thing is to select the variable in the Variables and Questions tab (and then go to the Create menu).
The result is a new numeric variable in your project where each respondent is given a negative or positive score based on their open-end response. You can use this variable in a variety of ways:
- In cross-tabulations with other questions to see how the sentiment score may vary for different groups within the sample (this is a good example of where Smart Tables in Q might come in handy!).
- Looking at correlations of sentiment scores with other numeric variables (eg: use Correlation Matrix).
- You could also turn the numeric sentiment score variable into a categorical variable (ie: a Pick One question) to divide your sample into those who are positive, neutral, and negative on the topic.
In some cases, you may like to “clean” your raw text variable before you computing the sentiment scores. This is where the Text Analysis Setup feature can help (see here for instructions). This creates an R output in the Report (not a variable) where the raw text is processed for spell-checking, stemming, removal of words, replacement of specific words, and combination of words into phrases. To calculate the sentiment scores from the Text Analysis Setup, simply select it in the Report, and use the Create menu: Create > Text Analysis > Sentiment.
How to Code an Open-Ended Question into a Single Response Question in Q
How to Code Open-Ended Responses with Multiple Mentions in Q
How To Code A Subset Of Responses
How to Code Multiple Other Specify Options
Article is closed for comments.