1. Setting up your Qualtrics survey
01-setup.Rmd
We are working on developing our own tools for building a conjoint survey in Qualtrics. In the meantime, we recommend using Anton Strezhnev’s Conjoint Survey Design Tool (Link: conjointSDT).
1.1 Generate a JavaScript or PHP randomizer
Strezhnev’s guide to designing and implementing conjoint surveys in Qualtrics is excellent and we will not reiterate it here. But to summarize: researchers should first use ConjointSDT to produce a JavaScript or PHP randomizer.
JavaScript
The JavaScript randomizer can be inputted into the first screen of your Qualtrics survey, using the Edit Question Javascript functionality. See the following screenshot as an example:
The above Javascript is available from here.
The JavaScript produced by ConjointSDT will run internally within Qualtrics and automatically creates the values for embedded fields. These are the attributes and levels that constitute the profile pairs of each conjoint task. For example, embedded field “K-1-1-7” contains the value (level) of the seventh attribute for the first profile (of two) in the first task, and “K-5-2-5” contains the level of the fifth attribute for the second profile (of two) in the fifth task.
PHP
The PHP randomizer must be hosted by a server. The following is an example hosted at our server: https://www.horiuchi.org/php/ACHR_Modified_2.php. (This PHP file is available from here.) This is the PHP randomizer used by Agadjanian, Carey, Horiuchi, and Ryan (2023).
1.2 Modify your Javascript or PHP randomizer
To add some additional constraints, such as removing ties between two profiles, you need to revise your PHP scripts or Javascript manually. In the future release of this package, we will add additional features to make this step easier. For now, we recommend you use other resources, including Open AI’s GPT-4), to learn how to modify your code. The above PHP example has the following manually added component at the end so that the race of one profile (candidate) is always “White” and another is always “Black,” “Asian,” or “Hispanic.”
$treat_profile_one = "B-" . (string)$p . "-1-" . (string)$treat_number;
$treat_profile_two = "B-" . (string)$p . "-2-" . (string)$treat_number;
$cond1 = $returnarray[$treat_profile_one] == "White" && $returnarray[$treat_profile_two] == $type;
$cond2 = $returnarray[$treat_profile_two] == "White" && $returnarray[$treat_profile_one] == $type;
if ($cond1 or $cond2){$complete = True;}
If you have some other examples of adding additional constraints, please send an email to the package maintainer, Yusaku Horiuchi Thank you!
1.3 Add conjoint tables with embedded fields in Qualtrics
After you set up your JavaScript or PHP randomizer, the next step is to design, for each task, a table using HTML and insert these embedded fiels. The following is the screenshot of the first task in our example.
The complete HTML for the first conjoint task in this survey is available from here.
A typical conjoint study will include 5-10 tasks. The number of questions with such HTML pages should correspond to the number of tasks. The embedded fields in each task are different: The first digit after the “K” will increment from 1 to 10 as the tasks progress.
Adding a repeated task (recommended!)
If we wish to implement a repeated task, then, all we need to do is copy the task to be repeated (say, the first task) to a later point in the survey (say, after the fifth task). We recommend that researchers flip the order of the two profiles as well. Therefore, Profile 1 in the original task becomes Profile 2 in the new task. To do this, we would simply swap the middle digit of the embedded fields as below.
The repeated task will then look like the following:
The complete HTML for the repeated conjoint task in this survey is available from here.
Importantly,with the repeated task, researchers can use to measure intra-respondent reliability (IRR).