Dear all,
I would like to randomize a treatment and I want the random number to be drawn only for some of the respondents, i.e. conditional on them answering a given option (option 1 in my example).
I don't want the number to drawn if the respondent is answering any other option (2, 3, 4 and residual option in my case).
Based on https://www.soscisurvey.de/help/doku.php/en:create:randomization-per-block
I thought it would be enough to write the follwing code to achieve what I need
if (value('E001') == 1) {
// Randomize priming treatment
show('PR01');
put('PI01_01', value('PR01'));
}
However, when I do the preview, I can see that the number is drawn also if I select a different option from 1...
Note that this is a multiple choice question and it seems that this detail matters because when I select the single selection format, the draw works as I want (although then, when I select an option different from 1 I get that "The variable PI01_01 has not been asked on a previous page during this interview. Therefore value() cannot determine any answer, yet".) In either case I need the question to be multiple choice.
I would be greatful for any suggestion