Welcome to the LimeSurvey Community Forum

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

Macrosurvey

More
2 years 10 months ago #232543 by Joffm
Replied by Joffm on topic Macrosurvey

how can I make sure that each respondent is randomly assigned to a survey

You see the IF-statement. Here you see that ANYBODY is assigned to one of the surveys.
  

and that each survey is completed by an equal number of participants?

This is something you can't.
A random number is a random number. But the percentual difference from an equal distribution will be smaller with a high number of participants.
Roll a dice and count, you will see.
  

 should not be random but each entry should be assigned to survey x, the next one to survey y.

Instead of a random number you could use the SAVEDID and the same MODULO calculation as before.
{1+SAVEDID-x*floor(SAVEDID/x)}
with x=number of groups.

But it is not better than a random number.
There are always respondents who do not complete a survey.

One more workaround is:
Watch the distribution and if one group is filled you switch the relevance equation.
Before
Code:
{if(randnum2==1,'123456',
    if(randnum2==2,'234567',
        if(randnum2==3,'345678',
            if(randnum2==4,'456789',
                if(randnum2==5,'567890','678901')
            )
        )
    )
)}
After group 3 is filled but group 5 is a bit low
Code:
{if(randnum2==1,'123456',
    if(randnum2==2,'234567',
        if(randnum2==3,'567890',
            if(randnum2==4,'456789',
                if(randnum2==5,'567890','678901')
            )
        )
    )
)}

Or there is a plugin "getStatInSurvey" by DenisChenu.
[url] gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey [/url]
Here you have a "leastfilled" option.

You see, there are many options.
But these are basics which you can think about yourself.

Joffm

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

Please Log in to join the conversation.

More
2 years 10 months ago #232544 by Jmantysalo
Replied by Jmantysalo on topic Macrosurvey
Answers given by Joffm are good. You can also check survey.tuni.fi/help/limit-registrations.html to get an idea about statCountIf()-function, but I think you won't need it.

However, if the survey for some group is faster and easier than for other group, then it is of course possible that you will not get at all similar number of responses for all groups.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose