This article describes how to test for significant differences between two questions. For example, suppose you want to test for differences between two questions: "Have you ever eaten at the following restaurants" and "Have you ever considered eating at the following restaurants".
To do so, they must first be combined into a binary grid like the one below:
Requirements
Two categorical variables with the same categories.
Please note these steps require a Displayr license.
Method
Combining into a single variable
In this example, we will use two variables, Q3 and Q4. Before beginning, we will create duplicate copies of each variable:
- From the Data Sources tree, select the two variables that will be combined.
- Right-click and select Duplicate.
The two duplicates will appear just below and be selected. - Right-click the duplicated variables and select Combine.
Remove unnecessary categories
In this example, the category None of these is a category in the Consider Eating At... variable but not the Ever Eating at... variable so we will remove it. We will also remove the Other fast food category because it is non-specific.
To remove unwanted categories:
- Expand the newly combined variable set by clicking on the small triangle to the left of its name to view all of the underlying variables.
- Select the unwanted categories, such as None of these and Other fast food, and select Split.
- Right-click the highlighted area and select Combine.
Change the variable names
Each variable name is repeated twice so it is hard to tell whether they came from the "Have you ever eaten at..." question or the "Have you even considered eating at..." question. We will use Find and Replace and wildcards to make the renaming process a little easier. Click here for more information on how to use Find and Replace in Displayr.
- With the variable set selected, right-click and select Split. This will create a set of separated variables.
- Select the first set of variables that relates to the original "Ever Eaten" variable set.
- From the magnifying glass in the toolbar, type * in the search box and then click This Document
- On the left, tick Find In > Only search selected items.
- Expand Advanced and tick Use Wildcards.
- Click the Replace tab and in the Replace with box type Eaten at ${0}
- Click Replace All.
- Select the second set of variables to rename.
- In the Replace with box, type Considered ${0}
- Click Replace All.
Next, we will get rid of the number "1" at the end of these variable names. - In the search box at the top of the screen, replace the * with 1.
- Remove the text in the Replace with box.
- Click Replace All
Finalize the new variable
- Select all of the renamed categories, right-click, and select Combine
- In the object, ensure the Data > Structure is set to Binary - Grid.
- Drag the variable onto the page to create a summary table.
Perform statistical testing
From the object inspector, go to Appearance > Significance > Compare Columns.
Next
How to Compare Significant Differences Between Columns