Analysing literal response variables
Questions that you can answer with free text (literal response variables) are not as easy to analyse as questions that have tick box answers, such as multiple choice. However, it is possible to set up new variables in Snap to categorise the responses. This worksheet gives an example how to do it using the snCrocodile survey data supplied with Snap.
In question 4, respondents are asked what they bought.

If someone bought an item which was not on the list they can select the Other option, and complete details in the If other, Please specify box.
Some of the Other responses can occur more than once, for example, if several people said they bought "apple pie". You can use a derived variable to count how many people entered "Apple pie" in the What else did you order field. You can also identify "apple pie" as a response in answers such as "milkshake, chicken nuggets and apple pie".
Background
Derived variables are variables that are created from other variables in your survey. In this example, the derived variable will be a set of codes representing different items that people ordered.
The derived variable is completed by Snap. In this case, you tell Snap which variable to look at to decide whether to put a value in the derived variable.
You can use patterns to adapt the data before Snap looks at it. Patterns leave the original data unchanged, but make it easier to analyse. For example, you do not know whether people have entered information in capitals or lower case. This worksheet uses the lower case pattern to convert all the data to lower case before you match it. This means that you can look for the word "apple", and it will match "Apple" "apple" and "APPLE" (or any other case combination).
Summary of steps
Step 1: Create the new variable
- Click
on the toolbar to open the variables window (or select View | Variables). - Click
on the variables window toolbar to create a new variable. - Set the Type to Derived and the Response to Multiple if they are not already set.
- Add a label (e.g. Other items bought) to describe the variable in any analyses.

- Enter your first item. Type Apple pie as the Label for code 1. Press [Tab] to move to the Values field and enter Q4a as lower case = "apple".
This ensures that any answer to Q4a that includes the word apple, whether it is upper or lower case, will counted as an apple pie order. This relies on apple pie being the only item on the menu with apple in. If you needed to be more precise you could use Q4a as lower case = "apple pie"
- Press [Tab] to move to the next code. Enter Milkshake as the label and Q4a as lower case = "milkshake" as the value.

- Repeat for all other items you wish to categorise. (It may be useful to create a list of responses to Q4a so you can see what the common responses are.)
- Press
for Snap to count up all answers. (This also saves the variable.)
Step 2: Use the variable in analysis
- Click
on the toolbar to create a chart.
- Drag your new variable from the Variables window into the Analysis field.
- Click [OK] to display your chart.

Conclusion
This worksheet explains how to use a derived variable to sort literals, and how to use a pattern in the definition to stop the search being case sensitive.
For more information about analysing literal responses see Categorising literal responses and Combining literal response answers with a coded question.
To find out more about patterns, see the section Introduction to patterns.