Hi, I want my participants to be randomly assigned to 1 of 3 question groups (conditions) in my survey. I know I can get them random by using the script "{rand(1,3)}" but I have very little knowledge of this coding language. Anyone know of a script to make this random assignment equal as well? Or perhaps some sort of workaround? There will only be one survey link for this study.
What do you mean with equal? Equally distributed? So always the same amount for each option?
I don't think this is possible by definition. Randomization allocates randomly (as we would expect). This also means, the numbers will most probably not be evenly distributed. With higher numbers of participants chances are higher that the distribution will be closer to equal.
But I think first of all, it would be good if you could explain a little bit more in detail what you are trying to do, how your respondents access the survey, (via a link that anyone can access, via token, etc).
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Yes, I meant equally distributed. I have 3 conditions in my experiment, so let's say, within each set of 3 conditions (1, 2 3), I want to randomize those 3 numbers, and then I want to continue to do this so that at the end of the survey, all 3 conditions have equal numbers of participants. I do realize that the numbers between conditions should not be dramatically different especially with enough data but I would like to ensure similar numbers if possible.
Depending on how you invite your participants you can already define which conditions to send them to. There you can control the number for each case (via custom attribute in the token table).
If you go for a random number, you will always have differences. What you can do is run the survey until a certain number and then if one of the conditions is full, you just fill the other two, then just one and then you close the survey. But you need to control this more or less manual.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.