Customized CBC Questions Using "Free Format"

Top  Previous  Next

Warning: This is an advanced feature that if not executed properly can result in errors in design, data collection, and part-worth estimation.  It requires careful, manual checking of Free Format HTML syntax, and double-checking the validity of your CBC data file prior to fielding the study.  Make sure to test your survey all the way through to analysis.

 

Introduction

 

This section describes how to create custom CBC surveys that go beyond the standard layout formatting provided in Lighthouse Studio.  To customize your CBC survey, you specify HTML in Free Format questions that build the custom look and "tap into" CBC's experimental design (to display the appropriate attribute text or graphics on the screen) using Sawtooth Script system commands.

 

The standard method is documented below.  One downside to this method is that you will have to maintain various Free Format questions that are almost identical (if you have to make changes etc. it can be very time consuming).  A potential solution to this is to use a Free Format question in combination with a loop.  See: Implementing a Custom CBC Exercise Using a Loop.

 


Implementing a Custom CBC Exercise

 

1.Create a CBC exercise
Create a standard CBC exercise by entering attributes and levels, generating a design, and adding the CBC questions within the questionnaire.  (You can include the standard CBC layout, Best-Worst layout, Constant-Sum layout, or Dual-Response None.)
 

2.Create a Free Format question
To create a custom CBC question, add a new Free Format question above your first CBC task (on the same page).  
 
We suggest using the "cbcTaskRandom1" from the Sawtooth Software Question Library.  From the Write Questionnaire screen click "Add" and then select the "Library" tab.  Make sure "Sawtooth Software Library" is selected and open the "Custom CBC" folder.  Now you can select between a "div" and "table" based design with or without a loop.  For this example select "Table Style" and add the "cbcTaskRandom1" to your survey.
 
The "cbcTaskRandom1" question from the library is a good starting point for your custom CBC exercise.  It includes many of the steps listed below.
 
Name the question something similar to "cbcTaskRandom1".  The question name needs to end with "Random1".  This will tie this Free Format question to your first CBC question (cbcExerciseName_Random1).
 
NOTE: We suggest creating just one Free Format question now.  Once it is working, you will be able to copy and paste the Free Format question so that there is one per regular CBC task.  To avoid having to deal with multiple Free Format questions see Implementing a Custom CBC Exercise Using a Loop.
 

3.Insert Sawtooth Script for level text
In the HTML that you create for the Free Format question, insert Sawtooth Scripting that "taps into" the attribute text and the CBC experimental design (see: Sawtooth Script CBC Functions).  Use the following function to return the text for levels in the CBC design:
 
CBCDesignLevelText(ExerciseName_CBCQuestionName, ConceptPosition#, LevelTextPosition#)
 
See the example below.  After you are finished, test your work to ensure that the levels in your Free Format question are displayed correctly.  Test the survey locally (Test | Test Survey).  You should be able to compare the levels being shown with the regular CBC question on the same page.  The text and graphics for the standard CBC concepts and the custom CBC concepts should match.
 
<table>

 <tr>

  <td>[%CBCDesignLevelText (cbc_Random1, 1, 1) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 2, 1) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 3, 1) %]</td>

  <td rowspan="3">None of these</td>

 </tr>

 <tr>

  <td>[%CBCDesignLevelText (cbc_Random1, 1, 2) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 2, 2) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 3, 2) %]</td>

 </tr>

 <tr>

  <td>[%CBCDesignLevelText (cbc_Random1, 1, 3) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 2, 3) %]</td>

  <td>[%CBCDesignLevelText (cbc_Random1, 3, 3) %]</td>

 </tr>
 </table>
 

4.Add input row to the bottom of the task
You now need to add a way for your custom Free Format CBC task to collect respondent input.  In the Free Format question go to the "Variable Names" section and add the appropriate variables.  See the examples below.
 
Standard CBC Tasks
Standard CBC Tasks only need one input variable.  Name it "response".  The whole variable name should be named "cbcTaskRandom1_response" and be of type "radio".  Next include the input HTML in the HTML section.  We recommend clicking the pencil icon and then using the hammer and wrench icon in the tool bar of the text editor.  This will automatically insert the correct HTML.  The value of the input then needs to be adjusted to account for any possible CBC Design Concept Sorting.  To do this we use the CBCDesignConceptValue Sawtooth Script function.
 
CBCDesignConceptValue(ExerciseName_CBCQuestionName, ConceptPosition#)
 

Here is an example:

 
<tr>

 <td class="input_cell clickable">

         [%RadioSelect(cbcTaskRandom1_response, CBCDesignConceptValue(cbc_Random1, 1))%]

 </td>

 <td class="input_cell clickable">

         [%RadioSelect(cbcTaskRandom1_response, CBCDesignConceptValue(cbc_Random1, 2))%]

 </td>

 <td class="input_cell clickable">

         [%RadioSelect(cbcTaskRandom1_response, CBCDesignConceptValue(cbc_Random1, 3))%]

 </td>

 <td class="input_cell clickable">

         [%RadioSelect(cbcTaskRandom1_response, 4)%]

 </td>

</tr>

 

Create as many radio buttons as there are concepts in your CBC Task.  You will also need to create a radio button for the None Option, but for it do not do not use the CBCDesignConceptValue function (it is only needed for any possible concept sorting used in the design).

 

Best-Worst CBC Tasks

Follow the same instructions for the Standard CBC Tasks above except create two rows or groups of radio buttons.  Create two variables of type "radio".  One variable for the best row named "responsebest" and one variable for the worst row named "responseworst".  Below is an example of the HTML to include:

 

<tr class="cbc_best_row">
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responsebest, CBCDesignConceptValue(cbc_Random1, 1))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responsebest, CBCDesignConceptValue(cbc_Random1, 2))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responsebest, CBCDesignConceptValue(cbc_Random1, 3))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responsebest, CBCDesignConceptValue(cbc_Random1, 4))%]
</td>

</tr>

 

<tr class="cbc_worst_row">
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responseworst, CBCDesignConceptValue(cbc_Random1, 1))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responseworst, CBCDesignConceptValue(cbc_Random1, 2))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responseworst, CBCDesignConceptValue(cbc_Random1, 3))%]
</td>
<td class="input_cell clickable">
       [%RadioSelect(cbcTaskRandom1_responseworst, CBCDesignConceptValue(cbc_Random1, 4))%]
</td>

</tr>

 

Constant Sum CBC Tasks

Follow the same instructions for the Standard CBC Tasks above, except additionally create an input box for each concept.  For example if you have 3 concepts per CBC Task then you will need to create the following variables of type text (Numeric): "response1", "response2", "response3", "response4", etc.  Because of possible Concept Sorting in the CBC design you will need to dynamically create the names for the input in the HTML section using the Sawtooth Script function CBCDesignConceptValue.  Below is an example:  

 

<tr>

 <td><input name="cbcTaskRandom1_response"[%CBCDesignConceptValue(cbc_Random1, 1)%] type="text" size="5"></td>

 <td><input name="cbcTaskRandom1_response"[%CBCDesignConceptValue(cbc_Random1, 2)%] type="text" size="5"></td>

 <td><input name="cbcTaskRandom1_response"[%CBCDesignConceptValue(cbc_Random1, 3)%] type="text" size="5"></td>

</tr>

 

NOTE: Lighthouse Studio's syntax checker will warn you that it cannot find a "_response1" variable in the HTML syntax etc. corresponding to the variable names you specified in the Free Format "Variable Names" section.  That is because you are dynamically inserting the integers at runtime using the CBCDesignConceptValue command syntax.  Therefore, you can ignore this warning.
 

For CBC Constant Sum you might also want to display a totals box. To do so, use this function:

DisplayTotal(FirstQuestionName, LastQuestionName, Width)

 

For example:

[%DisplayTotal(cbcTaskRandom1_response1, cbcTaskRandom1_response4, 3)%]

 

Dual-Response None CBC Tasks:

First, make sure you have specified that you wish to use the Dual-Response None Option on the Format tab of the CBC Exercise Settings dialog.  Add another variable within your FFTaskRandom1 Free Format question called "none" (FFTaskRandom1_none).  Here is the HTML you would need to include:

 

<input name="cbcTaskRandom1_none" type="radio" value="1">Yes<br>

<input name="cbcTaskRandom1_none" type="radio" value="2">No<br>
 

5.Suppress the regular CBC questions
You do not actually delete the CBC questions from the questionnaire.  We have created a fast way to toggle them to a suppressed mode.  To suppress the regular CBC questions, add the following HTML comment to the Header 1 field of your CBC random choice tasks:

 

<!--

SSI_Comment: CUSTOM_CBC_DESIGN

Free_Format_Base_Name: cbcTask

Free_Format_Variable_Name: response

Verification: ON

-->

 

Including the above text in Header 1 of a random CBC task will remove the regular CBC task from view.  It will also cause your Free Format CBC question to be verified the same way as the regular CBC task (require answers etc.).  Finally, it will copy the respondent answers given to your Free Format question the regular CBC database variables.  This allows you to perform analysis as if the regular CBC questions were seen.
 

6.Test saving data
Test the survey again, this time making sure that your answers are being recorded properly both in the Free Format question and in the regular CBC question.  If you have specified a concept sort order (on the Design tab of the CBC Exercise Settings dialog), CBC sorts the concept order prior to displaying the concepts, so you need to verify the final data file to ensure that the answers correspond to the actual product concepts you chose.
 

7.Copy and Paste
Once you are confident that your first Free Format custom CBC question is displaying correctly and saving correctly, copy and paste the question multiple times so that there is one per regular CBC task.  Make sure to change the HTML references from "Random1" to "Random2", "Random3", etc.  Finally, test again verifying all of the questions.  You might choose to turn the CBC questions back on to verify that all of your custom tasks are displaying correctly as compared to the actual tasks (see step #5 above).  
 
One downside to copying and pasting multiple Free Format questions is that you will have to maintain all of them (if you have to make changes etc. it can be very time consuming).  A potential solution to this is to use a Free Format question in combination with a loop. See: Implementing a Custom CBC Exercise Using a Loop.
 
We cannot stress enough how important it is for you to test this well.  We suggest the following: while taking the questionnaire, print each question (with your answer).  Download your data, export the data to a .CHO or .CHS file (.CHS is used for constant-sum layout), and compare the attribute levels recorded in the .CHO or .CHS file along with your answers to the printed questionnaire.

 

You might consider using the Sawtooth Script functions CBCAttributeValue and CBCDesignLevelValue.  These functions return an integer that corresponds to the attribute or level being shown.  This can help with advanced conditional logic (Unverified Perl etc.).

 

We strongly encourage you to test your custom CBC questionnaire thoroughly, including checking the final data, to ensure that the attribute levels are presented correctly in the custom choice tasks, that the corresponding design information is being correctly saved to the .CHO or .CHS file, and that respondent answers to the custom choice tasks are also being stored correctly in the .CHO or .CHS file.

 

 


Implementing a Custom CBC Exercise Using a Loop

 

Having to maintain multiple Free Format questions can be very time consuming and error prone.  One way around this is to only use one Free Format question, and then use a loop to ask all of the CBC tasks.  
 
Make sure that you understand the regular instructions above before trying this method.

 

1.Create a CBC exercise
Create a CBC exercise the standard way by entering attributes and levels, generating a design, and adding the CBC questions within the questionnaire.  We suggest moving all of the CBC tasks after the last terminate question of the survey.  That way the respondent will not see the original CBC exercise.  Another option is to setup skip logic to skip over the exercise.
 

2.Create a Free Format question
Create a Free Format question on a page of its own.  We suggest using the "cbcTaskRandom" from the Sawtooth Software Question Library.  From the Write Questionnaire screen click "Add" and then select the "Library" tab.  Make sure "Sawtooth Software Library" is selected and then open the "Custom CBC" folder.  Now you can select between a div and table based design and whether to use a loop or not.  For this example select "Table Style Loop" and add the "cbcTaskRandom" question to your survey.
 

3.Create a loop
From the Write Questionnaire screen click on the "Looping..." button.  Create a loop that has the same number of items as there are tasks in your CBC exercise.  Place the loop on the Free Format question created in the step above.  If your CBC exercise has 12 tasks, then this step will cause the Free Format question to be shown 12 times to each respondent.
 

4.Build dynamic question names
Edit the Free Format question.  If you used the "cbcTaskRandom" question from the Sawtooth Software Question Library listed in the step above you will notice code that looks like this:
 
<td class="top_row">

 [% Begin Unverified Perl

 return CBCDESIGNLEVELTEXT ("cbc_Random" . LOOPITERATION(), 1, 1);

 End Unverified %]

 </td>
 
   In this code the question name "cbc_Random1" is created if the loop is it its first iteration.  On the next page the question will be "cbc_Random2" and so on.
 

5.Modify the data
One downside to the loop method is that the data will not be saved in place of the regular CBC data, as in the "Implementing a Custom CBC Exercise" method listed above.  After you have collected the data you will need to copy the Free Format data into the columns provided for the regular CBC data.  This will then allow you to analyze the data properly.
 
After collecting the data download the *.CSV file and open it up in Excel.  Copy the columns of data collected by the Free Format looped question:
 
loop_data
 
and paste them into the columns of empty CBC data:
 
paste_cbc_data
 
Save the *.CSV file and import it into Lighthouse Studio.  You should now be able to analyze your CBC data.
 
WARNING: Be very careful with this step.  Make sure the correct data is being copied to the right columns.
 
 

 

Page link: http://www.sawtoothsoftware.com/help/lighthouse-studio/manual/index.html?hid_web_cbc_customcbc.html