Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Repeating a Task in a CBC Exercise and other issues

Hi there,

I am using Lighthouse Studio 9.6.1 to formulate a questionnaire in a health economics field and I am using 3 different groups of exercises to evaluate the same concepts for the same respondent but different concepts across different respondents.

2 of the 3 exercises are a CBC and Maxdiff and the third is a Time Trade-Off that I will use the free format to program. My background knowledge in programming is almost zero but I am trying to self-learn. Currently, I am working on the CBC part and would appreciate it if you could help me solve the following issues:

1- Within the CBC Exercise, I want to automatically repeat one of the Tasks to be presented twice to test the consistency of the respondents (for example task 2 and 9 should be the same), is that possible? how can I do it?

2- I am using the dual response-none in my design, but in the last question I want to compare a specific Concept to the None only, Is this possible? How could I do it?

3- I want to add a help button/tag in all the tasks to remind the respondents about the process of choosing the tasks and how the exercise works, How can I do that?

After generating the CBC design, I want to use one of the generated concepts in each task to present later on in the MaxDiff Exercise, How could I do that?

Thank you very much for your help and support.
asked Mar 18 by AMYN Bronze (1,335 points)
Regarding your first question, you could perhaps use a free format question to show a previous CBC task again.  Lighthouse Studio's Help has some information about how to build a free format CBC if you haven't done that before; the difference would be that you keep showing the CBC and put the free format question on a separate page.

A script posted here might also help in recreating a CBC task in a free format:

Regarding your third question, any text that you put in your exercise's header or footer fields will appear in every question of the exercise.  Perhaps the Sawtooth Script functions ToolTip or PopUp would be of use to you?
Dear Zachary,

Thank you very much for your suggestions.
The suggestion for using the Tooltip function was particularly helpful and exactly executed what I wanted to do in the survey.

for the first point, I exported the design and manually repeated one of the tasks in the design and then imported the modified design into the software to produce the repeated tasks (permanent position 2 & 9) and I probably plan to manually import the tasks I want to add to the MaxDiff exercise from the CBC task. What do you think about this solution?
I also want to try the question you directed me to but it looks very complicated to use, so I wanted to ask you in order to use that code is it Copy/Past command and changing some lines? what lines that I should change, as I could see that you are the one who wrote that code and know it the best.

Finally, it seems there is no direct solution for the second point, what I did is I added a fixed task that will force the respondent to compare the Option I want to the none in the dual Response-none question later on; do you think this is a good strategy?

Than you again for your help and support and probably the functions part will help me pool some of the earlier results to represent to the respondent on the screen while they are taking the questionnaire and put some check-points to make sure they are answering according to the logic we are expecting.

Now I am starting to have other questions, should I just throw them here or start a new question? how could I search the database if my question was previously answered or not?

Thanks again,
You're talking about exporting and importing the CBC design into a copy of the first CBC to handle the repeated task questions?  My concern about doing this would be if respondents don't reliably reach the respondents in order.  If respondent 1 sees CBC1 first, but sees CBC2 after respondent 2 - do they get different design versions and therefore see different tasks?  The post I linked only involves one design version to avoid this.

I know that post is pretty advanced, but I hope the parameters of it have useful defaults and can be updated without too much difficulty.  Line 23 will definitely have to be updated with the name of the CBC; I think all other lines could be left untouched until you decide you need something changed.  The free format question's name will need to end with "Random2" if you want to repeat the second task, for example.
I don't think there's any built-in way to handle your second matter.  While I could program something up in JavaScript for that, my concern relates to analysis: if analysis thinks respondents saw a different question than what they actually saw, the integrity of the results could be impaired.  I would think a fixed task could be used for something like this so long as you don't include the fixed task during HB or other analysis.
The Sawtooth Software forum has a search bar at the top right that can be useful.  You can include "tag:XXX" in your search terms to require a certain tag, but not all forum users may apply the same tags you would expect from a post.

If you can't find pre-existing help here, you can create a post or write into Support.
Hi Zachary,

Replying to your concern about the design version, I have only ONE design not 2. I exported the original design, manually modified it to repeat one task in each Block then imported it back to the exercise so that the Original design does not exist now. Still, different respondents should view different tasks according to the Block they enter in ( I made 18 blocks, each of 11 tasks). I hope this is clear and I will look out for this when I test the survey.
I will try your code to add a practice task at the beginning and see how it will go.

I wanted to ask if there is an option to make the sorting of the attributes different from one respondent to the other but ket the same within each respondent? and if there is highlighting option that could highlight the different levels between the choice cases?

also if I want to check the choice of a respondent if it was logical or not then prevent them from making illogical choices by showing them what they actually choose and making sure these are the choices they meant to choose and not a clicking mistake, how could I do that? is there a certain function for this?
Oh, I see.  With one shared version handling the original and repeated tasks, there should be no risk of the out-of-sync concern I had.  I don't think you'd need my free format code if you go this route.  When it comes to analysis, I'm not sure how two identical tasks would be handled.  You may want to only include one task when running analysis, but that's not my area of expertise.

There is a setting within CBCs for attribute randomization that can handle randomizing all attributes or just a given subset.  If you need to apply additional logic to your randomization, though, you'll need to use a constructed list and some JavaScript for that.

ACBCs apply a gray background when all concepts share the same level.  I'm not aware of such a feature in CBCs, but it could be done with JavaScript.

Logical vs illogical seems like it could be a harder task.  What defines an illogical choice?
Thanks for getting back to me on my requests.

Will logical and illogical could simply be illustrated that a person should indicate that they prefer walking freely with no pain over being bedridden, a person who dose not is one that does not follow our assumptions of human well being and will disturb our analysis.

I found the randomization option and it worked fine thanks. And in the analysis, I will exclude one of the repeated tasks as it makes no sense.

now for the highlighting using Javascript, could you guide me on how to do that? or should I start asking a new question in the forum?

Finally, that logic testing question I mentioned earlier, I want a message to pop up when the person does not follow the expected logic and ask him to repeat the training tasks, I managed to add the required skip logic to direct them back but do not know how to add that message, could you help me with that?


1 Answer

0 votes
Add this to your CBC:

.same_cbc_level {
    background-color: lightgray;

        var concepts = $(this).find('.cbc_concept:not(.none_concept)');
            var index = $(this).index();
            var text = $(this).find('.level_text').text();
            var cells = [$(this)];
            var match = true;
            for (var i = 1; i < concepts.length && match; i++) {
                var ithCell = $(concepts).eq(i).find('.cbc_cell:nth-child(' + (index + 1) + ')');
                match = (text == $(ithCell).find('.level_text').text());
            if (match) {
answered Mar 21 by Zachary Platinum Sawtooth Software, Inc. (126,675 points)
Thank you very much, that reallly worked but in addition to highlighting the same levels in both concepts it highlighted the concept name too (for example option 1 at the top was highlighted too) that is a minor problem though.
Replace line 11 with this:

Thanks a lot