Have an idea?

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

CBC - Can I make the price's value dependent on the answer to a previous question?

Hi,

I have a very simple CBC exercise with only 2 attributes (product and price) and only 2 products. My problem: in real life, the price depends on the weight of the patient (the products are drugs). So I would need to show the price applicable to a 40lb patient in one case and to a 50lb patient in another case, depending on the respondent's weight (which we ask earlier in the survey). I am planning to have 5 price levels in each case.

Is there a way to tie conditional pricing (or conditional display) to a question previously asked in the survey?

Thanks,
Fred
asked Mar 11, 2015 by Fred

2 Answers

0 votes
Hi Fred,

You can add perl on each label to show label based on previous question answer. Let's say your price label is depend on Q1 (Numeric type) answer.

[%Begin Unverified Perl
if(VALUE('Q1')==40)
{
    return '$20';
}
else
{
    return '$40';
}
End Unverified%]


You need to put same code for all 5 labels. Let me know for any more help.
answered Mar 11, 2015 by Rajesh Rana Gold (23,660 points)
Thank you for your help. The question we ask (Q1 in your example) is open-ended so I don't think your suggestion would be applicable here (too many values) but I will likely re-use in another survey.

Thanks,
Fred
Return value doesn't show in CBC
0 votes
Let's say that Q1 asks how many minutes it takes to get to work.  

Let's also imagine you want to create three levels of the "minutes to work" variable for CBC that is based on the answer to Q1.

Level 1: 20% less than current travel time
Level 2: Same as travel time
Level 3: 20% more than current travel time

Instead of "hard coding" specific levels into the CBC interface when you specify your attribute levels, you use some SSI Scripting code:

Level 1: [% Q1*0.8 %]
Level 2: [% Q1 %]
Level 3: [% Q1*1.2 %]

You may also need to use the Rounding function to round to the nearest minute.  That function is: ROUND (NUMBER, #DECIMALS)

So, the following should work:

Level 1: [% ROUND(Q1*0.8,0) %]
etc.
answered Mar 11, 2015 by Bryan Orme Platinum Sawtooth Software, Inc. (163,615 points)
Hi Brian,

Thank you for your reply, that is exactly what I needed. One question, though: how is it going to affect the parameters that I get out of HB? Can I still compute the utilities "as if" they had all be shown the same price, like in a standard CBC?

Thanks,
Fred
It certainly complicates analysis.  In the example above that I did with 20% below, at given, and 20% above discrete levels (as three levels of a CBC attribute), the HB utilities for each respondent are based on their individual "given" starting points...so they are relative utility differences based on % differences from whatever value each respondent gave.
OK, that makes sense. Thank you for your help, Bryan.
...