Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: variable taking different values for different groups of subjects

variable taking different values for different groups of subjects 1 Jahr 5 Monate her #92348

  • pedrorobalo
  • pedrorobalos Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Dear all,

This must be relatively simple to do this but I cannot figure how.

Suppose I want 100 subjects (and not more) to answer my survey. I want to create a variable ('var') that takes a value for 50 of them (e.g., var=1), and a different value for the remaining 50 (e.g., var=2). In other words, for 50 of the 100 subjects var=1 and for the remaining 50 var=2.

I don't want anything probabilistic, I want to have exactly 50 subjects for which var=1 and exactly 50 for which var=2.

The two groups of 50 can be randomly determined or determined by ResponseID (or some analogous variable).

Thank you very much for your help. Let me know if I haven't been clear enough.
Letzte Änderung: 1 Jahr 5 Monate her von pedrorobalo.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: variable taking different values for different groups of subjects 1 Jahr 5 Monate her #92403

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4069
  • Dank erhalten: 748
  • Karma: 341
You won't be able to use the response id (SAVEDID} because incomplete response sets get IDs.

I think you will need to make an AJAX call to a remote script that queries the database to find the number of completed surveys.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.133 Sekunden
Donation Image