Welcome to the LimeSurvey Community Forum

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

Randomization

More
1 day 1 hour ago #275300 by endalk
Randomization was created by endalk
Please help us help you and fill where relevant:
LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey Cloud:
Survey theme/template:
==================Question: Randomly assigning participants to treatment arms and different sets within each arm in LimeSurveyHello LimeSurvey community,I am using LimeSurvey Cloud to run a study with about 450 participants. I would appreciate your advice on whether LimeSurvey can support the randomization and data-recording requirements described below.1. Experimental designEach respondent will be randomly assigned to one of three treatment arms:
  • G0 (Control): do not receive treatment and complete two tasks. First, select four products from a group of 8 products with comparable attributes. In the second task, they do the same thing, but the 8 products are different from the first. 
  • G1: Do the same as the Go or control group, but between the two tasks they receive some information (which is our treatment)
  • G2: Do the same as G1, but in between the two tasks they receive different information (which is our treatment)
All respondents first evaluate eight product groups without information and select four products. After the first choice is recorded, the survey presents the information corresponding to the assigned treatment arm. Respondents then make a second choice based on the presented new products.The study will use 25 product group sets, with eight products in each set. The product set assigned to a respondent must follow the predefined experimental design.2. Questions about randomizationQuestion 1: Random assignment to treatment armsCan LimeSurvey Cloud randomly assign each participant to one of three treatment arms (G0, G1, and G2) when they enter the survey? I plan 450 respondents, with each arm having 150 respondents. Can this assignment be stored in a hidden variable and retained throughout the survey so that the participant sees the correct information at the appropriate stage?Question 2: Assigning product setsCan LimeSurvey randomly assign one of 25 product sets to each participant and store the assigned set ID in a hidden variable?Can the same assigned set ID be retained throughout the survey and used to display the appropriate product groups in both rounds, according to the experimental design?Question 3: Balanced treatment allocationCan LimeSurvey allocate participants approximately equally across the three treatment arms, rather than using independent random draws that might produce unequal group sizes?If exact or near-balanced allocation is possible, how should it be implemented?Question 4: Preventing duplicate or invalid assignmentsCan LimeSurvey prevent a product set from being assigned repeatedly or incorrectly when the design requires restrictions on assignments? For example, products assigned in the first round should not appear in the second round of selection for all arms. Therefore, if product group 5 appears in the first round, for the same respondent it will not appear again, and it will be from the remaining 24 groups. Does LimeSurvey do that? Can assignments be coordinated across participants and survey sessions, rather than being randomized independently for each response?Question 5: Randomization independent of enumeratorParticipants will be recruited from different offices and sectors, and enumerators will administer the survey in the field. Treatment assignment must not depend on the office, sector, or enumerator.Can LimeSurvey randomize treatment arms and resume sets independently of these characteristics? If so, what is the recommended implementation?3. Questions about recording and exporting dataQuestion 6: Recording assignmentsCan the exported response data include, for every participant:
  • Participant or response ID
  • Assigned treatment arm
  • Assigned resume-set ID
  • Candidate IDs displayed in each round
  • Information condition displayed after the first decision
  • First-round and second-round choices
Question 7: Verifying what participants actually sawCan LimeSurvey record not only the assigned treatment and product set, but also which product pages and information screens were actually displayed to each participant?If this requires additional configuration or custom code, what would you recommend?Question 8: Testing the randomization procedureWhat is the recommended way to test the randomization logic before launching the main survey? In particular, how can I verify that assignments remain fixed throughout a participant's session and that the exported data correctly record the assignments?4. Alternative approach: a pre-generated assignment listIf LimeSurvey cannot reliably implement the complete randomization procedure internally, would it be possible to prepare a randomized assignment list in advance and use it to determine each participant's treatment arm and resume set?If so:
  • What is the recommended way to import or link the assignment list to survey participants?
  • Can a unique participant code retrieve the correct assignment?
  • How can the survey prevent an assignment from being reused accidentally?
  • How can we ensure that enumerators cannot choose or change the treatment assignment?
I would prefer to use one centrally managed survey if possible. However, the reliability of the randomization and the ability to verify assignments in the exported data are more important than using a single survey.Thank you very much for your help and suggestions.Best regards

Please Log in to join the conversation.

More
20 hours 26 minutes ago #275302 by Joffm
Replied by Joffm on topic Randomization
Hi,
short answer. Yes, this is possible and more or less the default behaviour.
1. To distribute your respondents just create a random number between 1 and 3 and show the information in G1 only if the random number is equal 2 and the information in G2 only if the random number is equal 3.
To receive an exact equal distribution you will adapt the equation if one or two of the groups are filled.
So you use these functions: rand(x,y), statCountif.
Like:
If G0 is filled: random number from 2 to 3
If G1 is filled: 2*random number from 0 to 1+1 
If G2 is filled: random number from 1 to 2
And if two groups are filled it's trivial, the random number is the remaining group.

Other approaches: 
a. Use a cyclical approach using the response ID, the SAVEDID 
{SAVEDID-3*floor((SAVEDID-1)/3)}
You get: 1,2,3,1,2,3,1,2,3,1,2,3,...

b. use a least filled approach with the function "statCountIf"

2. To select 2 different sets of your 25 sets you may either
  • use a predefined string with 25 characters like 'ABCDEFGHIJKLMNOPQRSTUVWXY'
  • create a random number between 1 and 25
  • store the character at this position
  • remove the character at this position
  • create a random number between 1 and 24
  • store the character at this position

Now you have two different characters that refer to your sets.

And your other questions?
Please, read the manual, create a small test survey, activate it, enter some data and export the results.
Or import one of the sample surveys included in the manual and study them.

If there are more questions, please create a small prototype of the survey and send the lss export.

Joffm

 

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

Please Log in to join the conversation.

More
6 hours 10 minutes ago #275305 by endalk
Replied by endalk on topic Randomization
Dear Joffm 

Thank you for your excellent reply; it helps me a lot. I will also check what you suggested and follow the guidelines. 

With regards

EKM 

Please Log in to join the conversation.

Moderators: holch, tpartner

Lime-years ahead

Online-surveys for every purse and purpose