Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Randomisation devices: Differences and suitability

Randomisation devices: Differences and suitability 1 Jahr 6 Monate her #86327

  • borja
  • borjas Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 5
  • Karma: 0
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Randomisation devices: Differences and suitability 1 Jahr 6 Monate her #86331

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5279
  • Dank erhalten: 289
  • Karma: 246
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)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Randomisation devices: Differences and suitability 1 Jahr 6 Monate her #86351

  • TMSWhite
  • TMSWhites Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 759
  • Dank erhalten: 81
  • Karma: 36
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))
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Randomisation devices: Differences and suitability 1 Jahr 6 Monate her #86393

  • borja
  • borjas Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 5
  • Karma: 0
Thanks very much for your reply TMSWhite, and Mazi for pointing out the issue.
Letzte Änderung: 1 Jahr 6 Monate her von borja.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.201 Sekunden
Donation Image