In a table of a Nominal - Multi question type, it is only possible to create a NET and perform merges in either the row or the column, but not both. For example, in the table below, the columns can be merged because they are the codes for the question, but the rows cannot be merged because they are individual questions/variables and essentially separate Nominal: Mutually exclusive categories in the data set.
This is a logical constraint rather than a limitation of the program. If such merges were possible their meaning would be ambiguous. There isn't a default or standard way of aggregating multiple responses across questions for the same base of respondents.
Consider the consequence of merging the Coca-Cola and Diet Coke rows. When you merge or NET categories, Q computes the result as the proportion of people who choose at least one of the underlying categories. Thus, the Hate score would need to be people who selected Hate for either of the brands, the Dislike score would need to be the proportion that selected Dislike for either brand, etc. The consequence of this would be that the percentages would add up to more than 100% (as the base for the percentages would still be the number of respondents who answered both questions). Even if a respondent answered Hate for both brands, that would amount to 1 response (n) in the NET/merge, which leads to ambiguous results. This would be confusing as it is inconsistent with the definition of a Nominal - Multi; when the concept of missing data is introduced it would be more confusing yet.
Nonetheless, there are workarounds to this depending on how you'd like to analyze your data.
Requirements
A dataset containing a Nominal: Multi variable set.
Please note this requires the Data Stories module or a Displayr license.
Method 1 - Convert the question to a binary - multi
Use this method if you are only interested in aggregating one aspect of the question, such as a Top 2 Box, one specific code, one combination of codes, etc. This example uses the table in the screenshot above to be able to merge and create NET Top 2 Box scores across brands.
From a table:
- OPTIONAL: It's recommended you duplicate your question before making edits to preserve the original structure. Select the variable set from the Report tree and right-click the variable and select Duplicate from the toolbar menu. Right-click on the new variable set and select Rename to give it an appropriate name. For example, if your plan is to merge together brands according to whether people love or like them, the name might be Cola brands loved or like.
- Create a summary table using the variable by dragging it onto the page.
- Merge any of the codes that you wish to have merged, such as Like and Love. This can be done by simply dragging and dropping one column header onto another.
- Select all the other codes that you did not merge, right-click and select Hide until you only have a single column left, as shown below.
- Select the variable in the Report tree, and from the object inspector, change the Structure to Binary - Multi.
- Now you can merge the rows.
From the Data Sets tree:
- Select the variable set from the Report tree and select Duplicate from the toolbar menu.
- In the object inspector on the right, change the Structure to Binary - Multi.
- Click the Fix button from the warning that appears above the object inspector.
- Check Count This Value (CHECK) for all of the codes you'd like to count in the final results and click OK.
- You can now merge the rows in a table for this question.
Method 2 - Convert to a pick any grid (binary grid)
To retain the original structure of the question, you can convert the question to a Binary - Grid. This method is not recommended due to the ambiguous nature of the results. However, it is outlined below in case your specific data setup calculates unambiguous results. Proceed carefully! This example uses the table in the screenshot above.
- In the Report tree, hover over the variable set and click the + button that appears to the right, then select Ready-Made New Variables > Flatten Variable Set(s). Alternatively, you can select the variable set and from the toolbar menu, select Anything > Data > Variables > New > Ready-Made New Variables > Ready-Made New Variables > Flatten Variable Set(s).
- Right-click on the new variable set and select Rename to give it a new name.
- Change the Question Type in the flattened question to a Binary - Grid.
- Click the Fix button in the warning above the object inspector and then click OK on the next screen.
- Drag the binary - grid variable onto the page to create a summary table.
- OPTIONAL: You can select the table and then click Switch rows and columns in the object inspector to get the desired format.
- Now you can merge and NET on both the rows and the columns.
Method 3 - Count responses instead of respondents
Please note that when using this method, Displayr's statistical testing system will only ever test the Average statistic, which is not used in the table. As a result, it can be good practice to disable the significance testing by setting Appearance > Significance to No in the table.
- Follow the directions in Method 2 to convert your question to a Binary - Grid.
- Change the Structure to Numeric - Grid. This will make a Not selected response count as 0 and a Selected response count as 1.
- Create a table from the new Number - Grid question by dragging it onto the page, then from the object inspector, go to Data > STATISTICS > Cells and select Sum and % Row Share and uncheck Average. The % Row Share will be the % of all responses for the categories included.
- Merge and Combine your rows as desired.
Method 4 - Write a custom rule for the table
If you are familiar with writing your own Custom Rules using Table JavaScript, you can create a rule to do one of the following (note, our technical support team is not able to write custom JavaScript rules for you):
- Compute the new combined figures
- Overwrite the data in existing rows and columns
- Delete or add new rows or columns to the table
Note that statistical testing is done before table rules are applied and thus cannot be performed on the figures in the final table.
Method 5 - Create a custom R output
If you are familiar with writing custom R code, you can use R to aggregate the data and do the calculations as you wish to create a new R table. Note that statistical testing cannot be performed on R tables.
Next
How to Merge/Combine Categories in Tables and Charts