Getting the top and bottom levels from conjoints
These functions return the top/bottom level(s) of an attribute for a specific respondent in:
- Generic Conjoint
- Brand-Specific Conjoint
- MaxDiff Analysis
- Brand-Price Trade Off
- Claims Test
- Product Variant Selector
Usage:
| Function | In conjoints | In MaxDiff |
|---|---|---|
topLevel(attribute_id, [n]) | Returns the n level(s) with the highest N_chosen/N_shown. | Returns the n level(s) with the highest (N_best - N_worst)/N_shown. |
Not yet implemented: bottomLevel(attribute_id, [n]) | Returns the n level(s) with the lowest N_chosen/N_shown. | Returns the n level(s) with the lowest (N_best - N_worst)/N_shown. |
Not yet implemented: grossBestLevel(attribute_id, [n]) | Returns the same value as the topLevel function. | Returns the n level(s) with the highest N_best/N_shown. |
Not yet implemented: grossWorstLevel(attribute_id, [n]) | Returns undefined. | Returns the n level(s) with the highest N_worst/N_shown. |
Where:
attribute_idis the ID of the attribute for which you want to get the top/bottom level(s).nis the number (a positive integer) of top/bottom levels to return. If not specified, it defaults to 1, meaning that only the single top/bottom level will be returned.N_chosenis the number of times the respondent chose that level in the conjoint sets.N_shownis the number of times the respondent was shown that level in the conjoint sets.N_bestis the number of times the respondent chose that level as the best option in MaxDiff sets.N_worstis the number of times the respondent chose that level as the worst option in MaxDiff sets.
The levels that were not shown to the respondent are not considered in the calculation.
The functions return:
- A string with the name (not fancy text or ID) of the relevant level for the specified attribute.
- If there are multiple levels that are tied for a spot, a vector of strings will be returned with the names of all the relevant levels.
- When a respondent always chose “None of the above” in all conjoint sets, the function will be undefined.
The functions only counts number of times a level was chosen divided by the number of times it was shown (i.e. simple count analysis). They do not take into account the part-worth utilities of the levels. This approach allows the functions to work fast, but it may sometimes not reflect the top/bottom levels for a respondent.
The functions are designed to only pipe in the name of the top level(s), not a specific translation or fancy formatted text. To display the top level(s) in different languages for a multi-language experiment, you can use ifs or a monadic block.
Handling ties
Ties are handled as follows: If there are k1 relevant levels for the first spot, k2 relevant levels for the second spot, etc., then the the returned vector shall be of length x, where x is the smallest integer such that:
- x ≥ n
- no ties are broken within the first x levels (i.e., k1 + k2 + … + kx ≥ n)
Examples:
- If
n=1and there are 3 relevant levels, all the three tied levels will be returned as a vector. - If
n=2and there are 2 relevant levels for the first spot, then both of those levels will be returned and the second spot will not be considered. - If
n=2and there is 1 relevant level for the first spot and 2 relevant levels for the second spot, then all three of those levels will be returned.
Example usage when piping top levels to a follow-up question
For example, you can use this feature to include a follow-up Likert scale question after the conjoint exercise to gauge respondents’ purchase intent for a car model based on their most preferred attribute levels. Keep in mind that here:
- It’s good practice to check if the respondent has a defined top level before showing the follow-up question, because respondents who always chose “None of the above” in all conjoint sets will have an undefined value for the top level(s) and may not be able to answer the follow-up question. To do so:
- Add a calculated variable with the formula
!isNA(topLevel(attribute_id)), and - Set up display logic for your follow up based on this calculated variable (show only if that variable is equal (numeric operator) to 1).
- Add a calculated variable with the formula
- Create new calculated variables for each attribute. Because you want to get only one top level (and break any ties), you should use
toString(topLevel(attribute_id))as the formula for these calculated variables. - Use formulas in the text of the Likert scale question to pipe in the values from the calculated variables you created in the previous step.
Respondents will see their most preferred level(s) for each attribute based on the conjoint exercise in the Likert scale question:
Respondent view 1
Respondent view 2


Example usage of an ifs formula to pipe in top level(s) in certain language
Let’s consider the scenario when you need to pipe in the top level(s) in different languages for a multi-language experiment.
This approach uses an ifs formula within a calculated variable to save the translated text of each level. For example, to pipe the top level(s) in French:
- Build the ifs formula in a calculated variable: Create a calculated variable and use an ifs formula to map each level name to its translated text. For example, to specify the French translations, the formula would be:
ifs(
isNA(topLevel(123)), "votre fonctionnalité préférée",
toString(topLevel(123)) == "Level A", "Niveau A",
toString(topLevel(123)) == "Level B", "Niveau B",
toString(topLevel(123)) == "Level C", "Niveau C",
"Niveau D"
)
- Set display logic: Set display logic of the calculated variable to only apply to respondents who see the survey in the corresponding language (French).
Using monadic block to pipe in top level(s) in certain language
This alternative approach uses a monadic block as a dynamic “lookup table” to display the top level(s) in the corresponding translation.
Create a monadic block and define stimulus as translations: Add a monadic block to your survey. For each level within the monadic block, enter the translated text you want to display.
Set display logic for each stimulus: For each stimulus (level) in the monadic block, set display logic so it only appears if the respondent’s top-level result matches that specific level.