Randomisation devices: Differences and suitability

More
4 years 10 months ago #86327 by borja
borja created the topic: Randomisation devices: Differences and suitability
Hello,

Can someone explain to me why in the sample survey "Randomly Ask One Question Per Group" the expression used is floor"(rand(1, X))" instead of simply "rand (1,X)," what is the difference and why the first option is preferable as a device which randomly selects an integer within a range of two integers? (I assume that is preferred because is feautured in this example, which is part of the limesurvey manual)

Thank you very much.

Borja

Please Log in to join the conversation.

More
4 years 10 months ago #86331 by Mazi
Mazi replied the topic: Randomisation devices: Differences and suitability
I have pointed our Expression Manager expert to this thread, he should be able to help.

Link to the test survey Borja mentioned: docs.limesurvey.org/Expression+Manager+S...e_Question_Per_Group


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 10 months ago #86351 by TMSWhite
TMSWhite replied the topic: Randomisation devices: Differences and suitability
Borja-

That example was created when I expected that rand(x,y) would create a double precision number between x and y. Since rand() in PHP generates and integer, we standardized on that, but never updated the example.

So, the example should read:
if(ask>=1,ask,rand(1,6))

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #86393 by borja
borja replied the topic: Randomisation devices: Differences and suitability
Thanks very much for your reply TMSWhite, and Mazi for pointing out the issue.
Last Edit: 4 years 10 months ago by borja.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now