Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:create:random_questionnaire [25.03.2021 20:35] – [Random Selection for Questionnaires] sophia.schaueren:create:random_questionnaire [25.03.2021 20:49] (current) – [How-to] sophia.schauer
Line 43: Line 43:
  
 You have chosen the questionnaire "random" under **Assemble Questionnaire** -> **Administer Questionnaires** as the default questionnaire for the survey project. The participants can call [[:en:survey:url]] without further parameters (''q=...''). They will then first be taken to the "random" questionnaire and from there randomly distributed to one of the other two questionnaires. You have chosen the questionnaire "random" under **Assemble Questionnaire** -> **Administer Questionnaires** as the default questionnaire for the survey project. The participants can call [[:en:survey:url]] without further parameters (''q=...''). They will then first be taken to the "random" questionnaire and from there randomly distributed to one of the other two questionnaires.
 +
 +===== Weighted Selection =====
 +
 +If some questionnaires should be selected more often than others (higher weighting in the random selection), please simply enter their identifiers several times in the random generator.
 +
 +The following random generator for example would select te questionaire "control" twice as often as "order1", "order2" or "order3".
 +
 +<code>
 +1 control
 +2 control
 +3 order1
 +4 order2
 +5 order3
 +</code>
 +
 +
 +===== Interaction with extern Panels =====
 +
 +If you recrute the respondants from an extern panel you have to transmit respondetcodes in most cases in the redirect: [[:en:survey:panels]]
 +
 +As soon as ''[[:en:create:functions:gotoquestionnaire]]'' is used, a new case is created in the dataset. In this (new) interview, it is no longer possible to access the data that were collected in the original questionnaire (here, for example, "random"). This also applies to a participation code that may have been passed via URL from the panel provider.
 +
 +For the process to work, you have to explicitly pass the participation code to the subordinate interview. Therefore the function ''[[:en:create:functions:multileveldown]]'' is used. If the participation code was passed by reference (REF), it would look like this.
 +
 +<code php>
 +$qnr = value('RF01', 'label');
 +multiLevelDown($qnr, reference());
 +</code>
 +
 +In the subordinate questionnaire you can then access the passed code using ''[[:en:create:functions:multileveldata]]''. In the redirect, the reference would then no longer be used directly ...
 +
 +<code php>
 +redirect('https://www.panelanbieter.de/complete?xyz=ABCDEF&uid=%reference%');
 +// or equivalent
 +redirect('https://www.panelanbieter.de/complete?xyz=ABCDEF&uid='.reference());
 +</code>
 +
 +... but the data passed by ''multiLevelDown()'', i.e.
 +
 +<code php>
 +redirect('https://www.panelanbieter.de/complete?xyz=ABCDEF&uid='.multiLevelData());
 +</code>
 +
en/create/random_questionnaire.txt · Last modified: 25.03.2021 20:49 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki