Welcome to the LimeSurvey Community Forum

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

Advanced group randomization

  • jfrey1
  • jfrey1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 6 months ago #173280 by jfrey1
Advanced group randomization was created by jfrey1
Hello. I'm trying to accomplish some group randomization in a survey set up as 'question by question.' Here's the setup:


Array question (name: SVCUSE) asking about use of services:
Service 1: Used/Not Used/Not Available
Service 2: Used/Not Used/Not Available
Service 3: Used/Not Used/Not Available
Service 4: Used/Not Used/Not Available
Service 5: Used/Not Used/Not Available
Service 6: Used/Not Used/Not Available
Service 7: Used/Not Used/Not Available
Service 8: Used/Not Used/Not Available
Service 9: Used/Not Used/Not Available

Question group: Service 1
Question group: Service 2
Question group: Service 3
Question group: Service 4
Question group: Service 5
Question group: Service 6
Question group: Service 7
Question group: Service 8
Question group: Service 9

Goals:
(1) if 'Used' count in SVCUSE is 1, 2, or 3, present appropriate/corresponding question groups (this will automatically happen currently, because I have placed display logic on each question in the service question groups)
(2) if 'Used' count in SVCUSE is greater than 3, present only 3 service groups, chosen at random

Is this randomization possible? If so, how is it done? Thanks!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago - 5 years 6 months ago #173284 by Joffm
Replied by Joffm on topic Advanced group randomization
Hi,
okay, the problem is simplified:
Display all groups which where "used", but not more than three.

Solution:
1. Enter the same name in "randomization group"
2. Enter in "relevance equation" of: (SVCUSE_SQ001=="A1") and (G1Q1.gseq lt 4)
with "SVCUSE_SQ001" the first subquestion of your "selection question", and
"G1Q1" the first question in group G1 (Service 1)
...
(SVCUSE_SQ002=="A1") and (G2Q1.gseq lt 4)
Read here about "gseq" manual.limesurvey.org/Expression_Manager...#Access_to_Variables


File Attachment:

File Name: limesurvey...6922.lss
File Size:23 KB


Better, you send a sample as *.lss.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 6 months ago by Joffm.
The topic has been locked.
  • jfrey1
  • jfrey1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 6 months ago #173306 by jfrey1
Replied by jfrey1 on topic Advanced group randomization
Thank you very much. I replicated your code into my survey, but now, all of the service blocks are skipped, no matter how many services are used in SVCUSE. All of the service blocks contain more than 1 question, and in your example survey, they only contain 1 question (G1Q1, for instance). Should the relevance equation be different from this ((SVCUSE_SQ001=="A1") AND (G1Q1.gseq lt 4)) if there is more than 1 question in the service blocks (G1Q1, G1Q2, etc.)?
The topic has been locked.
More
5 years 6 months ago #173310 by jelo
Replied by jelo on topic Advanced group randomization

Joffm wrote: Better, you send a sample as *.lss.

WIll raise your chances that somebody can spot the issue.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • jfrey1
  • jfrey1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 6 months ago #173317 by jfrey1
Replied by jfrey1 on topic Advanced group randomization
Sure, it is attached. This is a smaller version of the survey, but the 9 service blocks and 'services used' question are intact.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #173322 by Joffm
Replied by Joffm on topic Advanced group randomization
Hello,
therefore we like to have your survey.

You have three groups before you start these 9 special groups.
This means the value of gseq is "3" after "SVUSED".
So you have to adapt the value after ".gseq".

Which version do you use?
My yesterday's example was made with Version 3.14.5+180815
As you might have read there were some issues in other versions of the 3.x branch regarding misordering of groups.

Tomorrow I will try to make your example a working one.



Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • jfrey1
  • jfrey1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 6 months ago #173323 by jfrey1
Replied by jfrey1 on topic Advanced group randomization
Thank you. Yes, there are 3 question groups before the service blocks. In the actual survey, there are 4 question groups before the service blocks:

Question group #1: Introduction
Question group #2: Demographics
Question group #3: Satisfaction
Question group #4: Services Used

The survey version I attached is a smaller, simpler version of the actual survey.

My version of Lime is 3.4.3. Thanks for your help!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #173324 by holch
Replied by holch on topic Advanced group randomization

My version of Lime is 3.4.3.


--> Update

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

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago - 5 years 6 months ago #173346 by Joffm
Replied by Joffm on topic Advanced group randomization
Hi,
1. as holch said: Update! Since your version there were about 35 updates.

2. Here the promised survey.
It is a different approach. IMO it's easy to understand.

After the first question I build a string that contains codes of the selected services.
With some equations I randomly select up to three of them.

These up to three services are displayed afterwards in random order.
In case there was no service at all selected, the survey procceeds after the "service" questions.

File Attachment:

File Name: limesurvey...5962.lss
File Size:243 KB


Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 6 months ago by Joffm.
The topic has been locked.
  • jfrey1
  • jfrey1's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 6 months ago #173439 by jfrey1
Replied by jfrey1 on topic Advanced group randomization
Thank you, this is working perfectly for me!
Attachments:
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose