Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

randomization of 108 choice tasks - each task with two questions

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 week 2 days ago #267058 by bajpai
Please help us help you and fill where relevant:
LimeSurvey version: LimeSurvey Cloud Version 6.6.5.
Survey theme/template: fruity/monochrome template 2
==================
I have a question about a survey we have created in LimeSurvey Cloud Version 6.6.5.

The survey consists of two stated choice experiments.
Each respondent gets 6 choice tasks out of a total of 108, both for the first and the second stated choice experiment.
Each choice tasks has two questions (Type: bootstrap buttons).
For both experiments 108 question groups are created with two questions (tasks) per question group (page).
We gave the first 6 question groups no 'condition' and set the 'condition' of the remaining (102) question groups to '0'.
In addition, we gave all question groups the same Randomization group number (on question group level).
We based all this on the routine as displayed in the enclosed image (which we have used before).

Unfortunately, after the survey ran the data shows that only the first 6 choice tasks were selected on numerous occasions, while 6 should be picked from the total of 108.
What are we missing here? Should we change anything additional in the settings?

Thanks in advance for any help 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 2 days ago #267062 by Joffm

Each respondent gets 6 choice tasks out of a total of 108, both for the first and the second stated choice experiment.
Each choice tasks has two questions (Type: bootstrap buttons).
For both experiments 108 question groups are created with two questions (tasks) per question group (page)

The problem is:
Each choice task consists of two question  - it is a group.
So you can't use this "standard" with a visible and a hidden group,because LimeSurvey does not support "group in group".

Therefore:
Please, send the lss export.
That we understand better and find another solution.
At first glance I should say.
Create six unique random numbers (1-108) and display these groups by relevance.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 week 2 days ago #267064 by bajpai
to: Joffm
If I send the .lss export will it only be available for you? Sorry for asking - it's my first request on the forum, hence quite new to me.
Thanks.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 2 days ago #267069 by holch
No, if you upload it here, anyone who has access to this post cna see and download it. This is why we usually ask for a sample (e.g. shortend version, or anonymized version of the survey).

We are not interested in the real survey, but rather in the structure of the survey.

You could create a copy delete a good portion of your 108 groups and leave e.g. 10. I mean it doesn't matter if it is 6 out of 7 or 6 out of 108, the concept is the same, I guess. But of course this will depend on the structure of your survey.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 days 9 hours ago #267110 by bajpai
Thanks in advance for your help - enclosed is a brief version of the survey with 18 choice tasks.
Each task (question group) consists of 2 questions.
Each respondent should get 6 out of 18 tasks (question groups).
Currently the first 6 question groups have no relevance and the other 12 question groups have relevance '0'.
In that way the system knows to pick 6 out of 18.
In addition they all have the same randomization group name '1' (on question level - we tried before on question group level with randomization group, but that didn't work either. 
Problem is that the systems keeps on picking only question group 1 - 6 and not one of the others.
We used this routine on numerous occasions and then it worked fine, only difference with this survey is, that the question groups consist of two questions in stead of one.
Hope someone can help me find the solution here. Thanks in advance. 

File Attachment:

File Name: limesurvey...1576.lss
File Size:586 KB

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 days 7 hours ago - 5 days 7 hours ago #267112 by Joffm

only difference with this survey is, that the question groups consist of two questions in stead of one.

And exactly this is the problem.

What you did before:
Two groups, one visible, one hidden
Questions all in the same randomization group.

Result
Now all questions are shuffled among the two groups and those questions who are in the visible group are displayed.


What you do now.
18 groups, 6 visible, 12 hidden
Groups are in the same randomization group.

Result
All groups are shuffled, but always the six visible groups are displayed. The groups are not shuffled in some kind of "hyper-group"

But I wrote before how to solve this
Create six unique random numbers (1-108) and display the groups which match these numbers by relevance.

Okay, let's start.
In a question of type "short text" you enter this script (both languages)
Code:
<script type="text/javascript" charset="utf-8">
 
function shuffle(array) {
  var currentIndex = array.length, temporaryValue, randomIndex;
  // While there remain elements to shuffle...
  while (0 !== currentIndex) {
  // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1;
    // And swap it with the current element.
    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }
  return array;
}
 
 
$(document).on('ready pjax:scriptcomplete',function(){
  // Fill the array ; here you have to change to 109
  var arr = ;
  for (var i = 1; i < 19; i++) {
    arr.push(i);
  }
  arr = shuffle(arr).slice(0,6).join('-');   // we capture the first six elements of the shuffled array
  $('#question{QID} input[type="text"]').val('#-'+arr+'-');
 
  $('#question{QID}').hide();
});
</script>


You will get something like this
 

Now you display the six groups with the condition
Does the string contain the number
Function:
strpos(Q0,'-1-')>0
strpos(Q0,'-2-')>0
strpos(Q0,'-3-')>0
...
strpos(Q0,'-108-')>0

That's all. Remove the randomization group name from the questions.
But if you want to randomize the display of groups set the randomization group name here (as I did in the sample)

And here your sample back.
 

File Attachment:

File Name: limesurvey...76_J.lss
File Size:623 KB


Now something else:
I see this is the "yearly" TUE survey "Openbare vervoer"
Many of your fellow students in previous years worked on these surveys.
You see you created a HTML table in the question text but did not insert the radio buttons into it
So why don't you use their expereience
There is a survey of a user (here:qiangqi)
[url] forums.limesurvey.org/forum/design-issue...swer?start=24#232539 [/url]
 
 

And another thread of xueting
[url] forums.limesurvey.org/forum/can-i-do-thi...oice-question#216461 [/url]
 

Joffm

These experiments only have different values of the options.
So you could shorten your entire survey by "tayloring"
This means: Only 6 x 2 questions, the values entered by ExpressionScript.
To do that:
Enter the values of all 108 experiments in a structured way into a question of type long text.
Create the six random questions
Capture the resp values with some string functions (strpos, substr) and display by ExpressionScript

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 days 7 hours ago by Joffm.

Please Log in to join the conversation.

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 days 6 hours ago #267113 by bajpai
Thanks for your help and extensive feedback.
I am going to look into your suggestions and example.
Hope I will manage to do so and thanks also for referring to the other researches.

Please Log in to join the conversation.

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 day 7 hours ago #267193 by bajpai
one final check - I changed the script for my survey with 108 tasks to this - so changed the number to 109 below at (var i = 1; i < 109; i++):

<script type="text/javascript" charset="utf-8">
 
function shuffle(array) {
  var currentIndex = array.length, temporaryValue, randomIndex;
  // While there remain elements to shuffle...
  while (0 !== currentIndex) {
  // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1;
    // And swap it with the current element.
    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }
  return array;
}
 
 
$(document).on('ready pjax:scriptcomplete',function(){
  // Fill the array ; here you have to change to 109
  var arr = ;
  for (var i = 1; i < 109; i++) {
    arr.push(i);
  }
  arr = shuffle(arr).slice(0,6).join('-');   // we capture the first six elements of the shuffled array
  $('#question{QID} input[type="text"]').val('#-'+arr+'-');
 
  $('#question{QID}').hide();
});
</script>

And I added the coding on Question Group level like you suggested and send in your example .lss file.
Is that sufficient or do I need to add / change anything else? 
I did some testing of the survey and it looked like the data did not indicate any task higher than 18 was chosen (like in the example we used).
Perhaps I am missing something here?

Thanks.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 7 hours ago #267195 by Joffm
It is sufficient - if you don't have a typo or ...
So where's the lss export?
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • bajpai
  • bajpai's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 day 3 hours ago #267197 by bajpai
Found one type hence problem is solved.
Thanks again for all your help and have a nice weekend.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose