Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:random_questionnaire [05.02.2015 11:23] – [Weighted Random Selection] alexander.ritteren:create:random_questionnaire [29.07.2019 19:21] – Complete Update admin
Line 1: Line 1:
-====== Random Selection for Questionnaires ======+====== Random Selection for Fuestionnaires ======
  
-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 selectionas 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 participant fills in is always noted in the variable ''QUESTNNR'' ([[:en:results:variables]]) in the data recordThis 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 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'); 
-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.  +goToQuestionnaire($qnr); 
- +</code>
-**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 0will 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.+
  
 +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.
  
 +{{:de:create:scr.random-questionnaire.questionnaire.png|Questionnaire to randomly select a questionnaire}}
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