Equal-sized groups for survey

More
1 month 1 week ago #190411 by Jmantysalo
Suppose I have about 100 people that will answer to a survey and there are 10 versions of the survey -- for example 10 slightly different pictures and questions about how the respondent liked the picture. I can make a hidden question of type 'equation' having just rand(1, 10) as value and foo as name, and the use foo==1, foo==2 etc. as relevance equations for question of type 'text display'.

However the distribution will probably not be very equal-sized, as the number of people taking survey is quite small. Is there a workaround for this?

For example, can I refer to number of people already filled the survey in Expression Manager and then just compute the remainder when dividing by ten?

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

LimeSurvey Partners
More
1 month 1 week ago #190412 by Joffm
Replied by Joffm on topic Equal-sized groups for survey
Hi,
as long as the quota management of LS is as basic, you have to query the database to see how many respondents already answered the different versions of the survey.
Do an ajax call in the first question; query the database by direct access or by the API.
Then you should use a "least filled" approach.

Do the respondents get an incentive?
If not, it shouldn't be an issue if you just wait until you have ten responses for each version. The slight overquote in some versions you may remove at random.


Joffm


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

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

More
1 month 1 week ago #190413 by Jmantysalo

Joffm wrote: Do an ajax call in the first question; query the database by direct access or by the API.


Thanks. I have never used ajax, and only used API from an outside php page. Can you give some example about using API inside the survey?

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

More
1 month 1 week ago #190414 by jelo
Replied by jelo on topic Equal-sized groups for survey

Jmantysalo wrote: However the distribution will probably not be very equal-sized, as the number of people taking survey is quite small.

If you had the technical feature to do it inside LimeSurvey, you might still have an uneven distribution after qualitycheck. Completed surveys by speedster or with bullshit are mostly removed afterwards. Even with a more sophisticated quota system (which is LimeSurvey lacking) this issue cannot be resolved.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

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

More
1 month 1 week ago #190417 by Jmantysalo

jelo wrote: Completed surveys by speedster or with bullshit are mostly removed afterwards. Even with a more sophisticated quota system (which is LimeSurvey lacking) this issue cannot be resolved.


This is true, of course, but having one problem is better than having two.

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

More
1 month 1 week ago #190423 by tpartner

Can you give some example about using API inside the survey?

The API cannot be used from within LimeSurvey (yet). You will need to make an AJAX call to a remote PHP file that uses the API.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

More
1 month 1 week ago #190431 by Jmantysalo
OK. Then it is probably easier to make a php page that has just counter. Then the survey could have a "question" of type equation calling that page and computing remainder of it's value.

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

More
1 month 1 week ago #190436 by DenisChenu
In my opinion :
Use gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey
To do a JS solution (hidding biggest choice).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

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

More
4 weeks 1 day ago #190951 by Jmantysalo
Got another idea: If I just use {SAVEDID}? Then I don't need an outside php to get a serial number.

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

More
4 weeks 22 hours ago #190962 by holch
Replied by holch on topic Equal-sized groups for survey
Savedid is given to anyone that start the survey. So it does not guarantee that you have x respondents completed if there are x Savedids that end with 1 for example.

It would be roughly the same problem as for the rand(1,10), probably.

Now if you know all 100 respondents and you are sure all will participate and complete, than you could maybe create a token table and randomly assign the different "paths" to the respondents.

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
4 weeks 2 hours ago #190995 by Jmantysalo

holch wrote: Savedid is given to anyone that start the survey. So it does not guarantee that you have x respondents completed if there are x Savedids that end with 1 for example.

It would be roughly the same problem as for the rand(1,10), probably.


I think it will be at least as good as using rand().

Anyways, kind of strange that one can do about everything but can't refer to quota or number of complete responses. Maybe something like getStatInSurvey-plugin will be part of core in the future.

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

More
4 weeks 1 hour ago - 4 weeks 1 hour ago #190998 by DenisChenu

Jmantysalo wrote: Anyways, kind of strange that one can do about everything but can't refer to quota or number of complete responses. Maybe something like getStatInSurvey-plugin will be part of core in the future.

github.com/LimeSurvey/LimeSurvey/pull/13...187a239308679b427506

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 4 weeks 1 hour ago by DenisChenu.
The following user(s) said Thank You: holch, Jmantysalo

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

More
3 weeks 6 days ago #191006 by holch
Replied by holch on topic Equal-sized groups for survey

Anyways, kind of strange that one can do about everything but can't refer to quota or number of complete responses. Maybe something like getStatInSurvey-plugin will be part of core in the future.

There are a lot of things that would be good to have, but of course, as in many open source projects, resources are limited and thus many features are not implemented.

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.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!