randomize participants evenly across conditions

More
2 months 3 weeks ago #191456 by dilan_S
Dear all

I know this topic has been brought up in many forums already. However, many of these entries seem to be 3-4 years old and I couldn't find a pleasing solution for this problem. And somehow I can't believe that Limesurvey has no solution for this problem yet (qualitrics and other survey tools do, so it can't be that complicated).

What I am trying to do is to randomly AND evenly assign participants across 4 conditions. I have managed to do the randomization with the procedure proposed here: survey-consulting.com/how-to-randomly-sh...a-limesurvey-survey/

The EVENLY part however I didn't manage to solve yet. Does anyone have a solution for this? My institution provides Version 2.73.1+171220 of Limesurvey.

Thanks a lot for your help in advance!

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 months 3 weeks ago - 2 months 3 weeks ago #191464 by holch

(qualitrics and other survey tools do, so it can't be that complicated)

Qualtrics was acquired for 8 Billion dollars by SAP. Not sure if it is fair to compare the resources of a multi billion dollar company , with the resources of an open source project. (Last time I got a quote from Qualtrics, their smallest package started at $5000 per year. So far to that.). So I am not really surprised that Qualtrics outperforms Limesurvey in a couple of aspects. ;-)

Even distribution would require an adaptive distribution ("Least filled bucket"), which is not implemented in Limesurvey. And I don't think it is sooo easy to implement. However, I am sure the developers would appreciate to receive a pull request with this being implemented (or as an alternative a sponsor for this feature). ;-)

If we could access previous responses in the survey through Expression Manager, we could create something like that as a work around. I think I recall that this is planned for some of the future releases, but I am not sure if it was for the upcomming LS4 or LS5.

If you want to do something like this today, you probably have to use Ajax calls to the database and then create your own "least filled bucket" system via Expression Manager. Maybe Denis' plugin getStatInSurvey ( framagit.org/SondagePro-LimeSurvey-plugin/getStatInSurvey ) might allow to read the responses given to a certain answer already and maybe you can create a workaround based on that. I remember there was a thread where someone has created a "Least filled bucket" system for them internally on their installation.

Or the simple workaround: When one "quota" is full, adapt your script that draws the random number and/or the respective relevance equations.

Some here use a bigger range of random numbers. E.g. even if you need only 4 "buckets" you could draw random numbers from 1-40 and at the beginning asign 1-10, 11-20, 21-30 and 31-40 to the respective "buckets". Then you have more flexibility to adapt your random assignment.

I know, nothing out of the box, not really the answer you would have hoped for, but that's what can be done with LS regarding this at the moment, as far as I know.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last edit: 2 months 3 weeks ago by holch.
The following user(s) said Thank You: dilan_S

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191476 by dilan_S
Thank you for your helpful and quick feedback! Frankly, I didn't know about the budget differences ;-)

Unfortunately I dont't think, that any of your proposed solutions would work for me. Therefore, I tried to think of an other way, and was wondering if one can access the automatically assigned ID, which limesurvey assigns to every participant of the survey (first colum of the export file). If so, I could pre define in excel via random number sampling an allocation list, which would assign each ID to a condition. Afterwards, I could add these IDs to the relevance-equation of each corresponding "bucket".

Do you think, that this could work?

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191480 by holch
Not gonna work. ;-)

You will distribute the ID evenly and people will drop out unevenly...

The SavedID is accessible via {SAVEDID}. But the thing is, the ID is given on opening the survey. This means, when someone opens the survey and just starts, but doesn't finish it still was assigned to a group, but it can't really be counted as a complete for this group. You basically have the same problem as with a random assignment of numbers. Actually, how and where would you apply this? Is this an open survey or a token based survey?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: dilan_S

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191493 by dilan_S
We are going to apply this in a psychology university course where everybody in the course has to participate in this survey. However, sending out tokens, is no option. But since we expect only minimal drop-out rate (because its mandatory), I could imagine that I could get a more even distribution by accessing the SAVEDID than with the random number option. Therefore, I tried to do it via SAVEDID and it did work! I just have one final problem, which I couldn't solve yet, because I have literally no clue about Java: Is there a way to shorten this code? For example by avoiding to write "SAVEDID.NAOK ==" for every ID I want in this bucket?

((SAVEDID.NAOK == "6" || SAVEDID.NAOK == "7" || SAVEDID.NAOK == "10"))

Thanks again! This has been very helpful!

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191494 by holch
OK, if you have an environment like this, that is basically "controlled" and you can guarantee a very high participation rate, then this can work. But again, it will not be perfect.

If you could use tokens (and only if it is by drawing them randomly from a bowl) it might be even easier, by given each token a custom attribute to assign them to the different questions.

But if you have very few participants, then your approach might work as well.

This has nothing to do with Java (or Javascript), this is part of Expression Manager. And no, I don't think you can shorten this, but I am also not an expert in short code. Denis or Tpartner might be better for this question. Let's see if they show up.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191495 by holch
One other problem with your approach is that people can't stop they survey and restart it.

And: When someone starts, stops and comes back later, they will have a new SAVEDID, so this can mess with your approach as well.

The savest would be tokens with token based answer/response persistence on. this means people can go back to their token link and will get back into the survey where they have left off (I don't know how long your survey is).

You don't need to send tokens via email, you could create your own token list and upload it (with dummy emails, etc.) and print the tokens on paper and let people draw them from a bowl. This way it is anonymous, but you can still use most of the advantages of a token based survey.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #191537 by dilan_S
Yeah thats true, I think we cant avoid that we have some drop-outs and therefore some uneven distribution. But we wont allow the option to save and come back later, so therefore I think this wont be too big of a problem.

I think we'll do it this way this year, and if it doesn't work, we'll try the tokens next time :)

Thanks again!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!