The gaborGranger function implements the Gabor Granger method in Qualtrics. Features include:
Here is a demo:
This function is available for a reasonable fee. Contact TomG on the Qualtrics Community to learn more.
The gaborGranger function uses Qualtrics Loop & Merge functionality. There will be one gaborGranger question within its own block. Set the number of loops to the number of prices.
The MCQ is typically a five point scale. Recodes must go from least likely (e.g., 1) to most likely (e.g., 5). Include a span in the question text where the price will be displayed:
How likely are you to buy X at a price of $<span class="price"></span>?
Add display logic to only display the question if the embedded data field ggFound is not equal to 1.
Paste the gaborGranger function JS into the question's JS outside the existing Qualtrics functions.
To make the function available to multiple Gabor Granger questions in the survey, copy the function to the Survey Header inside a script tag. Go to Look & Feel → General → Header edit → and paste the provided gaborGranger function JS:
<script>/*Paste gaborGrander function JS here*/</script>
Call the gaborGranger function from the question's addOnload function using the default settings as follows:
Qualtrics.SurveyEngine.addOnload(function() {
gaborGranger(this);
});
To override the default options, specify the desired options in the second function argument as an object. For example:
Qualtrics.SurveyEngine.addOnload(function() {
gaborGranger(this,{delim:"|"});
});
See Options for details.
The gaborGranger function requires three embedded data fields: a delimited list of prices (ggPrices), a found flag (ggFound), and the Gabor Granger variable (ggPrice). Prior to the gaborGranger block, initialize the embedded data fields. For example:
An optional fourth embedded data field (ggDisplayOrder) can be added.
delim is the string used to delimit prices in the ggPrices price list.
Default: ","
displayPriceClass is the name of a html class used to identify the html span that contains the price in the gaborGranger question text.
Default: "price"
ggFound is the name of the embedded data field flag that is set to 1 when the final Gabor Granger price has been found.
Default: "ggFound"
ggDisplayOrder is the name of the embedded data field that contains the displayed order of prices when saveDisplayOrder is true.
Default: "ggDisplayOrder"
ggPrice is the name of the embedded data field that contains the Gabor Granger variable (aka price)
Default: "ggPrice"
ggPrices is the name of the embedded data field that contains the delimited Gabor Granger price list.
Default: “ggPrices”
saveDisplayOrder is a boolean that specifies if the display order of prices should be saved to ggDisplayOrder.
Default: false
top2Recode is the recode value of the first of the top 2 choices.
Default: 4