variable taking different values for different groups of subjects

More
4 years 8 months ago - 4 years 8 months ago #92348 by pedrorobalo
pedrorobalo created the topic: variable taking different values for different groups of subjects
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.
Last Edit: 4 years 8 months ago by pedrorobalo.

Please Log in to join the conversation.

More
4 years 8 months ago #92403 by tpartner
tpartner replied the topic: variable taking different values for different groups of subjects
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now