Welcome to the LimeSurvey Community Forum

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

Randomization without replacement

  • dgiacometti
  • dgiacometti's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 8 months ago #139551 by dgiacometti
Randomization without replacement was created by dgiacometti
Hello everybody!
I designed a survey and I am ready to perform a study.

I need to design a randomization without replacement that takes place in every survey.

The first issue is the following:

1. Is Limesurvey able to count the successful outcome of answers and record that?

I have a Coin tossing game in the questionnaire. Following a structure the participant has to report if he got head or tail for every of the ten tosses. For every toss there is a payment table that indicates which one is the outcome that is successful. Consequently, there is a successful structure for all the ten tosses. Is Limesurvey able to record the number of successful outcome?
How can I do that?

The second issue is the randomization without replacement:

2. Based on the first issue, is Limesurvey able to perform a randomization without replacement?

I have already performed a pilot study with 10 participants. Now, for the main study, I would like to implement a competitive element in the survey. The final incentive of the survey will only be paid if the number of successful outcome in the coin tossing game is greater than the one of a randomly selected participant in the pilot study. If I give Limesurvey the 10 outcomes (precharged in the string?) is the program able to perform this randomization and proceed to declare the final payment of the incentive only if the number if greater then one of the ten pilot participants?
How can I do that?

Thank you very much in advance for your precious help.

Best regards,

Dg
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139556 by tpartner
Replied by tpartner on topic Randomization without replacement
1) I think that you'll have to use JavaScript to load the results of the Coin tossing game into hidden questions but, without knowing the details of the game, I can't help any more than that.

2) Sorry, I don't know what you mean by "randomization without replacement".

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139559 by Joffm
Replied by Joffm on topic Randomization without replacement
IMHO "randomization without replacement" means:

1. randomization with replacement:
You have a bag with ten balls of different colors.
You take one (blindfolded) and afterwards you put it back.
So there are always 10 balls in the bag.

2. randomization without replacement:
The same, but you do not put them back.
So as a result you get a random order of the selected balls.

Am I right, dgiacometti?

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • dgiacometti
  • dgiacometti's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 8 months ago #139561 by dgiacometti
Replied by dgiacometti on topic Randomization without replacement
Thank you for your help!

Yeah, Joffm is right. That is exactly what I meant.

So If I pre-charge those scores of the pilot participant and tell the program to compare one of them with the score of the current participant it randomizes without replacement. The randomization happens by means of casual participation of the new participants.

How can I pre-charge the results then?
Is there any good soul that can help me?


And is the program able to compute a score based on the result of 10 answers?
How do I do that?

(then the system should show: a screen saying that the participant won if 1) the score is higher than the random participant in the pilot study AND one every fifth participant. Otherwise the message should thank the participant but mentioning that he did no win. (I know how to organize the messages on the screen, what I need is the help with the commands)

Thank you again.

Best,

Dg

Ps: the game is just a coin tossing game. Participants have to toss the coin ten times and then report their results in the questionnaire answering head or tails.
The topic has been locked.
More
7 years 8 months ago #139602 by jelo
Replied by jelo on topic Randomization without replacement

dgiacometti wrote: Yeah, Joffm is right. That is exactly what I meant.
So If I pre-charge those scores of the pilot participant and tell the program to compare one of them with the score of the current participant it randomizes without replacement. The randomization happens by means of casual participation of the new participants.


What impact should randomization with or without replacement make when you have only one coin which is tossed ten times?
You can just use a random-function with with 0 or 1 as outcome and assign e.g. 0 to heads and 1 to tails.
You use this function in ten hidden equation questions which simulate the ten tosses.

If the scores of the pilot participant are static you can compare and display them via EM routines.
Methodically I don't understand the impact which the pilot participant scores should have on the randomization.
Perhaps others get what you mean. It seems you want to access data of completed interviews during a interview ("AND one every fifth participant"). That looks impossible.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139614 by holch
Replied by holch on topic Randomization without replacement
I was thinking the same thing: A coin has two sides, it can be either one or the other. If you do this "without replacement" it would mean, always after heads it is tail or after tail it is heads... Doesn't really make sense or I am totally confused here.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • dgiacometti
  • dgiacometti's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 8 months ago #139653 by dgiacometti
Replied by dgiacometti on topic Randomization without replacement
The randomization without replacement regards the participants to the survey. Not the coin flip.

As far as I know, the only way to pre-charge the results of the pilot study is through JAVA?

I need a Java programmer then... :unsure:
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139663 by DenisChenu
Replied by DenisChenu on topic Randomization without replacement

dgiacometti wrote: As far as I know, the only way to pre-charge the results of the pilot study is through JAVA?

??????

Using remote_control API ? PHP/Python/Ruby/Java or .... anything you can found (C# :pinch: ,.net :woohoo: , Machine code :whistle: ....)
Using Limesurvey plugin : PHP

Denis

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 .
I don't answer to private message.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139664 by Joffm
Replied by Joffm on topic Randomization without replacement
Hi,
I have no idea why you use these ten pilot participants.
Their results are binomial distributed between 0 and 10 (no 0, but more 4-6).

So, why not just compare the outcome of your respondents with a weighted random number between 0 and 10?
Weighted, that that it works according binomial distribution.

Kind regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • dgiacometti
  • dgiacometti's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 8 months ago #139675 by dgiacometti
Replied by dgiacometti on topic Randomization without replacement
I sincerely appreciate all your posts and comments that can elucidate and clarify my issues.

Thank you.

Is anybody able to give me any hints to solve this problem?
Is not possible to do it use the admin platform? (as you may have noticed I am not a programmer.... :dry: )
I guess I have to buy a professional service to do that.... because I am not able so far. :blush: :(


I use this randomization because I need it (the reason is beyond this topic and It is not possible to change it). It is not only a weighted random number between 0 and 10. They scored 10 different results and I have to charge them in order. Then for every participant the current score should be compared randomly to one of the different 10 result of the pilot. So, in order of appearance their score is compared to the one of the fixed ten pre-charged score. But the issue is.... how do I pre-charge the scores? And is limesurvey able to do this kind of comparison? If you (Joffm) thought of a comparison with a weighted random number that means that I can pre-charge those results and ask the program to make a comparison with them?
Is anybody able to do that and suggest me the way to do it?

Thank you very much in advance for your help.

Bests,

Dg
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139686 by DenisChenu
Replied by DenisChenu on topic Randomization without replacement
In fact, if i understand : you don't want randomization in LimeSUrvey but : you do randmoizaton BEFORE limesurvey. Then don't talk of randomization : we don't care how you get this number.

You want each user have a fixed number, and use this number in the survey.
2 solutiuon
- Use token, add an attribute with the number, and use {TOKEN:ATTRIBUTE_1} to use this number in the survey
- Use prefill url system, add a question 'RandNumber', hide it via the settings.Use {RANDNumber} in the survey. The url is something like that : example.org/12344?RandNumber=5

Denis

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 .
I don't answer to private message.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139711 by Joffm
Replied by Joffm on topic Randomization without replacement
Sorry, but I am really confused.

What I understood: You have your ten pilot results.
You want to compare the result of the participant with a randomly selected result of your pilots.

IMHO these ten pilot results are fixed. They do not change during the survey.
And you know these ten results.
Let's say: 4,5,5,7,6,5,4,7,6,5

So why can't you just select one of these pilot results just by saying:
randomNumber=rand(1,10)
if randomNumber==1 then pilotResult=4
if randomNumber==2 then pilotResult=5
if randomNumber==3 then pilotResult=5
and so on.

That's the same as if you select randomly one of the pilot participants and then look for his result

Well, you could do it before.
You can randomly add one of the pilot results into the sample of the participants as an attribute.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose