Have an idea?

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

Adjusting a base price of a summed price exercise by the use of selection question prior to the ACBC task


Hoping that someone can shed light on a question I have regarding adjusting the starting base price of an ACBC exercise based on a respondent's answer to a selection question in the non choice part of a questionnaire. I would like respondents from different geographies (self-selected) be attributed different starting base prices for a product which has a summed price component. Depending on where the respondent is from or intends to buy there are high medium and low base prices that need to be applied. I don't want to use price adjustments as I don't want to use up one of my 10 attributes that I take forward into the ACBC task.

If an individual self selects themselves into a particular geographic category through a selection question can this information be brought forward to determine the base price in the BYO section of the ACBC task. Having spoken with Bryan I believe this would be possible with either some unverified pearl or javascript.

Can someone help me here?
asked Jun 8, 2017 by Jasha Bowe Bronze (1,745 points)
retagged Jun 8, 2017 by Walter Williams

1 Answer

+1 vote
Best answer

The entry boxes in the ACBC software interface for specifying base price and level prices for attributes can accept either specific numeric values or script.  The script can just be Sawtooth Script: for example, the [% ... %] stuff for returning answers to previous questions.  [% Q1 %] returns the answer to numeric question Q1.  Or [% Q1+3 %] returns the answer to number questions Q1 plus 3.  You can refer to answers to previous questions.  You can also use mathematical operations.  You can use the ROUND Sawtooth Script to round to specific values too.

Of course, Javascript or Unverified Perl could also be used.  But, you might find that just using Sawtooth Script gets the job done for you.

Test thoroughly to make sure data collection and utility estimation seems to be working properly for test subjects!
answered Jun 8, 2017 by Bryan Orme Platinum Sawtooth Software, Inc. (152,955 points)
selected Jun 9, 2017 by Jasha Bowe
Thanks Bryan,

My further question is if Q1 is a select question which is set to mutually exclusive radio buttons with three options Q1_1, Q1_2 and Q1_3 can I assign a value other than the default 1,2,3 as would normally be the case so that the base price in the BYO section of the ACBC task is determined by the selection of one of Q1's options. Such that Q1_1=50, Q1_2=80 and Q1_3=90 for example? or is there another way of achieving this?

Hi Jasha,

You can use this code in your base price field to get that behavior:

[% Begin Unverified Perl
if (GETVALUE('Q1') == 1) {
    return 50;
elsif (GETVALUE('Q1') == 2) {
    return 80;
else {
    return 90;
End Unverified %]