This worksheet explains how to set up cross-tabs (pivot tables, contingency tables) in Snap. It assumes that you have a questionnaire with four questions (shown below) and shows you how to create a single table combining the data from the four questions.
This worksheet only covers category variables (variables with coded answers).
Snap allows you to create cross-tabs and charts from category variables where one variable’s codes provide the columns and another variable’s codes provide the rows. It is possible to combine category variables in your analysis.
There are three ways of combining category variables in a cross-tab in Snap.
- Combining variables (WITH)
All the codes are treated as if they belonged to a single variable, with one column per code
- Combining all possible codes (PER)
Every combination of codes available between the variables is given a column
- Combining variables with identical codes logically so you can see if either or both codes have been selected
The codes can be logically ANDed together so you get a count if both codes have been selected
The codes can be logically ORed together so you get a count if either code has been selected
This is not dealt with in this worksheet
Step 1: Creating a simple cross-tab and dealing with missing responses
This shows you how to create four simple cross-tabs showing people’s liking for cheese and chocolate by age and gender and then shows how to combine them into a single table. It also discusses missing answers. If you add percent scores to your cross-tabs, you need to be clear if you are displaying a percentage of all those who took the survey or all those who answered the question. You can include or exclude respondents who have not answered a question.
The survey example had 100 respondents. None of the questions has been answered by all of them.
- Click to open the Analysis Definition dialog.
- Enter Q1 in the Analysis field and Q3 in the Break field to give a table of people’s liking for cheese broken by gender.
- Check Break Percents, which shows each answer as a percentage of the column totals for the break variable (Q3).
- Click [Apply] to create the table then click on the table toolbar to save the table.
- Create three more tables, Q2 broken by Q3; Q1 broken by Q4; Q2 broken by Q4 Note that the Base used in the tables is different. This is because the analysis base consists of people who have answered both questions. This is because the analysis excludes no reply responses.
- Click on a table toolbar for AN3 to open the Analysis Definition dialog for that table (liking cheese by age).
- Click on the Base/Labels tab. Change the No Reply value of Exclude to Show for the Analysis and Break values and click [Apply].
A new row and a new column are added to your analysis, showing the no replies, and the percentages are re-calculated as percentages of the new base. (You can change Exclude to Hide to re-calculate the percentages without including the row/column for the missing responses.)
Step 2: Showing several variables in the same cross-tab
- Create a new table. Put Q1 WITH Q2 into the Analysis field. This puts the response counts to the cheese and chocolate questions in the table.
- Put Q3 PER Q4 in the Break field. This puts every possible combination of the age and gender questions in the table as a separate column.
- Check Base Percents. This uses the same base to calculate the percentages across the table.
- Press [OK] to build the cross-tab. The rows show the responses to both the cheese and the chocolate question. The percentages of the base are calculated separately for each row. The columns show each possible combination of the age and gender questions. The percentages are calculated across all the columns.
- Click to save the table.
This worksheet has described how to combine several variables in a single analysis
You can see more about analysis in the section Analyzing your case data
There is a description of Operators in the Analysis and Break fields in the help.
There is a reference list of all possible Axis Expressions (expressions that you can use in the analyses axes) in the help.
If there is a topic you would like a worksheet on, email to firstname.lastname@example.org