Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:random_questionnaire [05.02.2015 11:23] – [Weighted Random Selection] alexander.ritter | en:create:random_questionnaire [25.01.2020 16:46] – admin |
---|
====== Random Selection for Questionnaires ====== | ====== Random Selection for Questionnaires ====== |
| |
Multiple questionnaires can be created in one survey project (**Compose Questionnaire** -> //Further questionnaires// tab). If the participant calls up the [[:en:survey:url|URL to the Questionnaire]], it can be randomly assigned to one of the questionnaires. There are options explained at the bottom in **Compose Questionnaire** -> //Further questionnaires// tab -> //Random Selection for Questionnaires// which can be selected in order to achieve this. | In a survey project you can create several questionnaires (**Assemble Questionnaire**) -> **Create new Questionnaire** or **Manage Questionnaires**). If the participant opens the [[:en:survey:url|link to to questionnaire]], they can be randomly assigned to one of the questionnaires. |
| |
| **Note:** For experiments it is usually much easier (!) to create only one questionnaire and vary the stimulus with a small PHP code ([[:en:create:randomization]]). |
| |
**Note:** Random selection of questionnaires has some restrictions (see notes below) and this option is __only__ sensible __in a few__ exceptional cases. As a rule, it makes much more sense to use normal [[randomization|randomization]]. | |
| |
===== Notes ===== | ===== How-to ===== |
| |
Selection or random selection takes place every time the project folder is selected without a specific questionnaire being specified ([[:en:survey:url]]). This address (URL) is found under **Survey Project** -> **Project Settings** -> //Project folder//. | First you create an additional questionnaire under **Assemble Questionnaire** -> **Create new Questionnaire**, that takes care of the random assignment. The questionnaire identifier can be chosen freely, for the following description we use the ID "random". |
| |
In an unrestricted random selection, the different conditions will usually usually drawn an unequal (!) number of times. If 100 people are spread across 5 groups, the groups could be distributed as follows: 32, 7, 13, 28, 20. The larger the subgroups, the more unlikely (not impossible!) there will be disproportional variations. If groups of the same size are required, a [[random_urns|randomization with urns]] within a questionnaire is the method of choice. | Define this questionnaire as the default questionnaire under **Assemble Questionnaire** -> **Manage Questionnaires**. |
| |
The same goes for a weighted random selection: as a rule, approximation to the desired distribution only occurs in the region of larger numbers (n > 1000). Statistical outliers are therefore not possible either. | {{:de:create:scr.random-questionnaire.questionnaires.png|Questionnaires for random selection}} |
| |
The questionnaire a participant fills in is always noted in the variable ''QUESTNNR'' ([[:en:results:variables]]) in the data record. This applies to the explicit selection of the questionnaire in the link, just like the random selection of a questionnaire. | To ensure an equal distribution of the participants on the questionnaires, you need a question of the type [[:en:create:questions:random]]. You can create this question in any category -- for the further description it is assumed that this question has the ID "RF01". |
| |
| {{:de:create:scr.random-questionnaire.random-create.png|Create random generator}} |
| |
===== Set Questionnaire as Default ===== | Enter the IDs of the questionnaires (see above) you want to choose between as //codes// in the random generator and save the question ({{:button.save.png|Save question}}). |
| |
One of the questionnaires will be used as default if this option is chosen. The link to the survey project will then always lead to the same questionnaire - except when another questionnaire is explicitly specified in the link. | Leave the default setting "equally distributes" selected for the //type of drawing//. The option "Equally distributed in finished questionnaires" will //not// work because the random distribution questionnaire will never be finished. |
| |
| {{:de:create:scr.random-questionnaire.random-contents.png|Random generator for the selection of the questionnaire}} |
| |
If only one questionnaires exists in the survey project then this questionnaire will always be used as default. | Open the questionnaire that you have created for random distribution under **Assemble Questionnaire** for editing. |
| |
| - Drag the random generator (RF01) to the first (and only) page of the questionnaire, and |
| - place the following [[:en:create:php|PHP code]] below it. |
| |
===== Random Selection from Selected Questionnaires ===== | <code php> |
| $qnr = value('RF01', 'label'); |
| goToQuestionnaire($qnr); |
| </code> |
| |
One or more questionnaires can be selected with this option. If the URL is called up without a questionnaire being specified (see above), this means one of the selected questionnaires will be chosen at random. | The function ''[[:en:create:functions:value]]'' retrieves the ID of the randomly drawn questionnaire from the random generator. The function [[:de:create:functions:goToQuestionnaire]] jumps directly to the questionnaire with the corresponding ID. |
| |
**Note:** As a rule, an unrestricted random selection results in questionnaires being called up different numbers of times. Therefore, please take the information above into consideration. | |
| |
| |
===== Weighted Random Selection ===== | |
| |
Weighted random selection represents an extension of a random selection. The principle is the same as a random selection: one of the questionnaires from those with specified weighting (i.e. not 0) will be selected at random. | |
| |
Questionnaires with a higher weighting are therefore chosen with a correspondingly higher probability. The specific numbers that are input is not important, what matters is the relation: a questionnaire with a weighting of 2 will be (for example) selected twice as often as one with a weighting of 1. A questionnaire with a weighting off 66 will be selected twice as often as a questionnaire with a weighting of 33. | |
| |
| {{:de:create:scr.random-questionnaire.questionnaire.png|Questionnaire to randomly select a questionnaire}} |
| |
| 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. |