variable taking different values for different groups of subjects

4 years 1 month ago - 4 years 1 month ago #92348 by pedrorobalo
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 1 month ago by pedrorobalo.

Please Log in to join the conversation.

4 years 1 month ago #92403 by tpartner
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.

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.