I used the JavaScript below to make sure I was able to change the order of the attributes for the different choice tasks (no position bias). So participants were given 5 choice tasks (Ngene generated a D efficient design of 30 choice tasks, so 6 blocks) with each time another order of attributes when going to the next choice tasks.
However, when launching the survey, i can only see in the Excel following parameters: RID DESIGN_ROW SCENARIO SEQ pref1 x1_opt1_index x2_opt1_index x3_opt1_index x4_opt1_index x5_opt1_index x1_opt2_index x2_opt2_index x3_opt2_index x4_opt2_index x5_opt2_index.
It does not indicate the order of the attributes. Can I assume that X1 always is the same attribute (in my case, risk of death) or does X1 refer to the position of the first attribute displayed, and thus X1 will each time be different as the order changes?
Concretely, is it correct how I coded it (using ChatGPT) or should i adapt anything to make sure that X1 always corresponds with the same variable? Would you recommend any changes to not get errors or wrong data collection resulting from this attribute order shuffling and other coding?
Code:
<se:experiment xmlns:se=“surveyengine.com” version=“4.0” schemaLocation=“Experiment.xsd” type=“paired” is_unique_ranking=“1”>
<![CDATA[DCE HF Engels]]>
<dependent_variables>
<dependent_variable name="pref1" priority="1">
<description><!\[CDATA\[Which option would you choose?\]\]></description>
</dependent_variable>
</dependent_variables>
<x_matrix is_manually_locked=“0”>
<levels>
<level name="lvl1">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">5% risk of death</span><span style="font-size: 10px;"> </span> <img src="schermafbeelding_20260301_143723.png" data-filename="schermafbeelding_20260301_143723.png" class="" style="width: 82.8347px; float: none; height: 88.8125px;"><span style="font-size: 10px;"> </span>\]\]></description>
</level>
<level name="lvl2">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 10px;"><span style="font-size: 11px;">10% risk of death</span> </span> <img src="schermafbeelding_20260301_143810.png" data-filename="schermafbeelding_20260301_143810.png" style="width: 81.051px; float: none; height: 86.9px;" class="">\]\]></description>
</level>
<level name="lvl3">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 10px;"><span style="font-size: 11px;">15% risk of death </span> </span><img src="schermafbeelding_20260322_104501.png" data-filename="schermafbeelding_20260322_104501.png" style="width: 87.7125px; float: none; height: 87.7125px;" class="">\]\]></description>
</level>
<level name="lvl5">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">No hospitalisation </span><img src="schermafbeelding_20260322_104609.png" data-filename="schermafbeelding_20260322_104609.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl6">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Occasional hospitalisation</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260322_104639.png" data-filename="schermafbeelding_20260322_104639.png" style="width: 25%; float: none;">\]\]></description>
</level>
<level name="lvl7">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Frequent hospitalisation</span><span style="font-size: 10px;"> </span><img src="schermafbeelding_20260322_104823.png" data-filename="schermafbeelding_20260322_104823.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl9">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Fully independent</span><span style="font-size: 10px;"> </span><img src="schermafbeelding_20260322_105201.png" data-filename="schermafbeelding_20260322_105201.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl10">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Help with heavy tasks</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260312_151643.png" data-filename="schermafbeelding_20260312_151643.png" style="width: 25%; float: none;" class="">\]\]></description>
</level>
<level name="lvl11">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Help with basic care</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260422_183537.png" data-filename="schermafbeelding_20260422_183537.png" style="width: 25%; float: none;" class="">\]\]></description>
</level>
<level name="lvl16">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">No shortness of breath</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260322_105115.png" data-filename="schermafbeelding_20260322_105115.png" style="width: 25%; float: none;" class="">\]\]></description>
</level>
<level name="lvl18">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">No lack of energy</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260322_105319.png" data-filename="schermafbeelding_20260322_105319.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl20">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Moderate shortness of breath</span><span style="font-size: 10px;"> </span><img src="schermafbeelding_20260322_104949.png" data-filename="schermafbeelding_20260322_104949.png" style="width: 25%; float: none;" class="">\]\]></description>
</level>
<level name="lvl21">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Severe shortness of breath</span><span style="font-size: 10px;"> </span><img src="schermafbeelding_20260322_105042.png" data-filename="schermafbeelding_20260322_105042.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl22">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 11px;">Moderate lack of energy</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span> </span><img src="schermafbeelding_20260322_105351.png" data-filename="schermafbeelding_20260322_105351.png" style="width: 25%;">\]\]></description>
</level>
<level name="lvl23">
<value><!\[CDATA\[\]\]></value>
<description><!\[CDATA\[<span style="font-size: 10px;"><span style="font-size: 11px;">Severe lack of energy </span> </span><span style="font-size: 10px;"> </span><img src="schermafbeelding_20260322_105420.png" data-filename="schermafbeelding_20260322_105420.png" style="width: 25%;">\]\]></description>
</level>
</levels>
<attribute_groups randomisation_scheme="respondent">
<attribute_group name="x1" position="1" is_continuous="0">
<description><!\[CDATA\[Risk of dying from heart failure within one year\]\]></description>
<attributes>
<attribute name="x1">
<level_assignments>
<level_assignment level="lvl1" is_editable="1"/>
<level_assignment level="lvl2" is_editable="1"/>
<level_assignment level="lvl3" is_editable="1"/>
</level_assignments>
</attribute>
</attributes>
</attribute_group>
<attribute_group name="x2" position="2" is_continuous="0">
<description><!\[CDATA\[Frequency of hospitalisation\]\]></description>
<attributes>
<attribute name="x2">
<level_assignments>
<level_assignment level="lvl5" is_editable="1"/>
<level_assignment level="lvl6" is_editable="1"/>
<level_assignment level="lvl7" is_editable="1"/>
</level_assignments>
</attribute>
</attributes>
</attribute_group>
<attribute_group name="x3" position="3" is_continuous="0">
<description><!\[CDATA\[Ability to remain independent\]\]></description>
<attributes>
<attribute name="x3">
<level_assignments>
<level_assignment level="lvl9" is_editable="1"/>
<level_assignment level="lvl10" is_editable="1"/>
<level_assignment level="lvl11" is_editable="1"/>
</level_assignments>
</attribute>
</attributes>
</attribute_group>
<attribute_group name="x4" position="4" is_continuous="0">
<description><!\[CDATA\[Shortness of breath\]\]></description>
<attributes>
<attribute name="x4">
<level_assignments>
<level_assignment level="lvl16" is_editable="1"/>
<level_assignment level="lvl20" is_editable="1"/>
<level_assignment level="lvl21" is_editable="1"/>
</level_assignments>
</attribute>
</attributes>
</attribute_group>
<attribute_group name="x5" position="5" is_continuous="0">
<description><!\[CDATA\[Lack of energy\]\]></description>
<attributes>
<attribute name="x5">
<level_assignments>
<level_assignment level="lvl18" is_editable="1"/>
<level_assignment level="lvl22" is_editable="1"/>
<level_assignment level="lvl23" is_editable="1"/>
</level_assignments>
</attribute>
</attributes>
</attribute_group>
</attribute_groups>
<alternatives randomisation_scheme="scenario">
<alternative name="opt1" position="1">
<description><!\[CDATA\[Option 1\]\]></description>
<attribute_assignments>
<attribute_assignment attribute="x1" design_column="1"/>
<attribute_assignment attribute="x2" design_column="2"/>
<attribute_assignment attribute="x3" design_column="3"/>
<attribute_assignment attribute="x4" design_column="4"/>
<attribute_assignment attribute="x5" design_column="5"/>
</attribute_assignments>
</alternative>
<alternative name="opt2" position="2">
<description><!\[CDATA\[Option 2\]\]></description>
<attribute_assignments>
<attribute_assignment attribute="x1" design_column="6"/>
<attribute_assignment attribute="x2" design_column="7"/>
<attribute_assignment attribute="x3" design_column="8"/>
<attribute_assignment attribute="x4" design_column="9"/>
<attribute_assignment attribute="x5" design_column="10"/>
</attribute_assignments>
</alternative>
</alternatives>
</x_matrix>
<span lang="FR"><design_matrix></span>
2 0 1 1 2 1 2 0 0 0
0 2 2 2 1 2 0 0 0 0
1 1 1 0 0 0 2 0 1 2
2 2 0 1 0 1 2 0 2 1
1 2 2 1 0 0 1 0 0 1
2 0 0 0 1 1 2 1 1 0
2 2 2 0 1 2 1 2 2 2
2 2 2 1 0 1 1 1 1 2
1 0 2 0 1 0 1 1 2 2
0 0 0 2 0 2 1 2 2 1
0 1 2 2 1 2 0 0 0 1
1 1 1 2 0 0 2 2 0 1
0 0 2 1 0 2 2 0 0 1
1 1 0 2 1 0 0 2 0 0
0 0 2 0 2 2 1 1 2 1
0 1 0 0 2 1 2 2 1 0
0 1 2 2 2 1 0 1 1 1
1 2 1 0 2 2 1 2 2 0
0 1 1 1 1 1 2 0 2 2
2 2 0 2 1 1 1 2 1 2
0 2 0 1 1 2 0 2 2 2
1 1 0 1 2 0 0 1 2 0
2 0 2 2 0 0 2 1 0 2
1 0 0 1 2 0 1 1 0 0
2 0 1 2 0 1 0 2 1 2
2 2 1 0 2 0 0 2 2 1
0 0 1 2 1 2 1 0 1 0
1 1 0 1 0 0 2 1 0 2
1 1 1 0 2 2 0 1 1 1
2 2 1 0 2 1 0 0 1 0
</design_matrix>
<settings><!\[CDATA\[{"type":"table","fullscreen":true,"isCustom":true,"choiceMode":"default","tableLayout":{"showAltHeaders":true,"showRowBorders":true,"showColBorders":true,"showRowPadding":false,"showRowColors":false,"showChoiceLabels":true,"choiceQuestionPosition":"table","attributeInfo":"left","width":"balanced"}}\]\]></settings>
<template><!\[CDATA\[<div data-type="style" class="hidden"></div>
<tr>
<td style="width: 33.3%;"> </td>
<td> </td>
<td class="alternative_label" name="opt1">Option 1</td>
<td> </td>
<td class="alternative_label" name="opt2">Option 2</td>
</tr>
<tr data-row="x1">
<td style="width: 33.3%;" class="attribute_label" name="x1">Risk of dying from heart failure within one year</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x1" alt="opt1"><span style="font-size: 11px;">5% risk of death</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260301_143723.png" data-filename="schermafbeelding_20260301_143723.png" class="" style="width: 82.8347px; float: none; height: 88.8125px;">
<span style="font-size: 10px;"> </span>
</div>
</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x1" alt="opt2"><span style="font-size: 11px;">5% risk of death</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260301_143723.png" data-filename="schermafbeelding_20260301_143723.png" class="" style="width: 82.8347px; float: none; height: 88.8125px;">
<span style="font-size: 10px;"> </span>
</div>
</td>
</tr>
<tr data-row="x2">
<td style="width: 33.3%;" class="attribute_label" name="x2">Frequency of hospitalization</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x2" alt="opt1"><span style="font-size: 11px;">No hospital admissions</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260322_104609.png" data-filename="schermafbeelding_20260322_104609.png" style="width: 25%;"></div>
</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x2" alt="opt2"><span style="font-size: 11px;">No hospital admissions</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260322_104609.png" data-filename="schermafbeelding_20260322_104609.png" style="width: 25%;"></div>
</td>
</tr>
<tr data-row="x3">
<td style="width: 33.3%;" class="attribute_label" name="x3">Ability to remain independent</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x3" alt="opt1"><span style="font-size: 11px;">Fully independent</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260322_105201.png" data-filename="schermafbeelding_20260322_105201.png" style="width: 25%;"></div>
</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x3" alt="opt2"><span style="font-size: 11px;">Fully independent</span><span style="font-size: 10px;"> </span>
<img src="schermafbeelding_20260322_105201.png" data-filename="schermafbeelding_20260322_105201.png" style="width: 25%;"></div>
</td>
</tr>
<tr data-row="x4">
<td style="width: 33.3%;" class="attribute_label" name="x4">Shortness of breath</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x4" alt="opt1"><span style="font-size: 11px;">No shortness of breath</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span>
</span><img src="schermafbeelding_20260322_105115.png" data-filename="schermafbeelding_20260322_105115.png" style="width: 25%; float: none;" class=""></div>
</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x4" alt="opt2"><span style="font-size: 11px;">No shortness of breath</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span>
</span><img src="schermafbeelding_20260322_105115.png" data-filename="schermafbeelding_20260322_105115.png" style="width: 25%; float: none;" class=""></div>
</td>
</tr>
<tr data-row="x5">
<td style="width: 33.3%;" class="attribute_label" name="x5">Lack of energy</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x5" alt="opt1"><span style="font-size: 11px;">No lack of energy</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span>
</span><img src="schermafbeelding_20260322_105319.png" data-filename="schermafbeelding_20260322_105319.png" style="width: 25%;"></div>
</td>
<td> </td>
<td style="width: 33.4%;" class="se_choice_table_cell">
<div class="attribute" style="" name="x5" alt="opt2"><span style="font-size: 11px;">No lack of energy</span><span style="font-size: 10px;"><span style="font-size: 11px;"> </span>
</span><img src="schermafbeelding_20260322_105319.png" data-filename="schermafbeelding_20260322_105319.png" style="width: 25%;"></div>
</td>
</tr>
<tr>
<td class="choice_label_cell"><span class="choice_label" name="pref1">Which option would you choose?</span></td>
<td> </td>
<td class="se_choice_table_footer">
<div class="se_selectable se_choice_element se_choice_element_labeled" alt="opt1"><input class="choice" type="radio" name="pref1" alt="opt1" value="on"> <span class="alternative_label" name="opt1">Option 1</span></div>
</td>
<td> </td>
<td class="se_choice_table_footer">
<div class="se_selectable se_choice_element se_choice_element_labeled" alt="opt2"><input class="choice" type="radio" name="pref1" alt="opt2" value="on"> <span class="alternative_label" name="opt2">Option 2</span></div>
</td>
</tr>