Have an idea?

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

Monitor shown list options from long list that are chosen randomly

Hi everyone,

I have a name test survey where each participant has to rate a random subset of a very long list of possible new names. I now want to monitor how often each name is shown across respondents. My thought was to include a hidden select question with multiple responses  that is always skipped and set the shown names as selected in the background. That way, I can create a data report for this question in the admin module.

The setup is this:

Parent list called "Namen" (84 Items)

Constructed list called "NamenAuswahl":
ADD(Namen)
Randomize()
ListMax(28)

Skipped Select Question "GezeigteNamen" that I want to set = 1 for each list member of NamenAuswahl.

I added this code to the footer of the question following GezeigteNamen:

[% Begin unverified perl
if (ListHasParentMember(NamenAuswahl, 1)) {SETVALUE('GezeigteNamen_1',  1);}
End unverified %]

Unfortunately it does not work, I'm getting a script error. Any ideas why?

Best,
Kathrin
asked Feb 16 by Kathrin

1 Answer

0 votes
 
Best answer
Always skip the question "GezeigteNamen". It should never be asked. Ensure it is defined as a multiple response select question type and it uses the parent list "Namen".

Now try placing this Perl Script listed below in to the footer of an appropriate question (one that is asked after GezeigteNamen and is not skipped over) ...
[%Begin Unverified Perl 

 my $i=1;

 for($i=1; $i<=84; $i++)
  {
   if (LISTHASPARENTMEMBER("NamenAuswahl",$i))
    {  
     SETVALUE("GezeigteNamen_".$i,1); 
    }  
  }

End Unverified%]

This script should now populate the question "GezeigteNamen" once the question in which the script lives has been submitted.

I encourage you to run some tests.
answered Feb 16 by Paul Moon Platinum (89,880 points)
edited Feb 16 by Paul Moon
I just ran a test on this. Works a treat!

This question "GezeigteNamen" can easily be tracked within the admin module, given it is a question. As we know, constructed lists aren't currently available within the admin module. I think they should be as they are wonderful little storage buckets for data (just like questions). I certainly hope they find their way in there some day.

The good news is you can export constructed lists just like questions.
Thank you, I tested it too and it works great! Also the code is much more efficient. It would indeed be great to have constructed list available in the admin module.

On another note, I simulated 50 respondents, and the frequency of the presented names varies quite a bit. Some names were seen by 24 respondents, others just by 9. Is there a way to achieve a more even distribution?
Quota questions can be used to distribute respondents more evenly, but they only support selecting a single item out-of-the-box.  In order to evenly choose multiple items, we'd need to use multiple quota questions with some code so they interact with each other.  My last comment in this post details how I would do this:

sawtoothsoftware.com/forum/28379

For your situation, it sounds like you will require 28 quota questions with 84 cells each.
Thanks for chipping in Zachary.

Zachary as usual is spot on. Least fill quotas can play a role here. And when you have multiple quotas to attend to, it becomes more involved.

Depending on the project, I sometimes let the randomisation ride and apply priorities at the back end to assist with evening things up, but this all depends on your project requirements.
...