Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:create:random_urns [28.06.2015 10:02]
admin [Create Internal Variables]
en:create:random_urns [04.06.2019 21:25]
admin [Randomization Using Urns]
Line 4: Line 4:
  
 The chapter describes step by step how to create an urn and how to draw a ballot (e.g. a random number) out of the urn. The chapter [[randomization|randomization]] describes how the ballot drawn is used in randomization. The chapter describes step by step how to create an urn and how to draw a ballot (e.g. a random number) out of the urn. The chapter [[randomization|randomization]] describes how the ballot drawn is used in randomization.
 +
 +**Important:** A [[:en:create:questions:random]] is more appropritate than urns for most use cases. If your goal is to "just" sort respondents into experimental groups, and present questions, images or texts to them, then please read [[:en:create:randomization]].
 +
 +**Important:** Urns are the best solution only for very few special ue cases. Please 
 +en sind nur für wenige spezielle Anwendungsfälle die beste Lösung. lease be sure to read the chapter on [[:en:create:randomization]], __before__continue reading here (if that should be necessary at all then).
 +==== Drawing without Replacement ====
 +
 +A random draw "without replacement" can be likened to a draw from a lottery wheel ("urn"). The use of urns in SoSci Survey (like the the [[:de:create:questions:random]]) guarantees experimental groups of the same size. In the context of conjoint analysis, an urn ensures that predefined combinations are equally likely to be drawn. 
 +
 +**Advice:** Entire questionnaires __cannot__ be randomized using urns. An urn cannot be used to "choose" between different questionnaires. In order to use an urn, all random conditions in the questionnaire have to be set using a filter (see [[:en:create:randomization]]).
 +
 +**Note:** Be sure to carry out a technical test to check whether the drawing of lots in the urn are counted correctly, in particular, if you store the combinations manually.
 +
 +The basic steps to draw from an urn are as follows:
 +
 +  - Add a new question in the **List of Questions** using the type [[:de:create:questions:internal|Internal Variables]] (e.g. with ID ''IV01'')
 +  - In **Special Features** -> **Randomization Using Urns** -> //Create new urn//, e.g. with the //ID// ("group") and enter ballots 1, 2, 3, 4 (each number on a separate line)
 +  - [[php|PHP code]] is used to carry out the actual random draw.
 +
 +<code php>
 +urnDraw('group', 'IV01');
 +</code>
 +
 +**Note:** Only the question ID is entered as the second parameter in the function ''[[:en:create:functions:urndraw|urnDraw()]]'', and not the variable ID. This means SoSci Survey can decide, depending  on the content of the urn, if only one variable is used (if each ballot only contains one value) or several variables (if you are working with combinations of values).
 +
 +**Note:** You can decide whether the ballot drawn should be stored immediately or not until later. Read the the reference to the PHP function ''[[:en:create:functions:urndraw|urnDraw()]]'' for more information.
 +
 +**Note:** Normally the urn is re-filled after the last ballot is drawn and stored. If you do not want this to happen, you can prevent this happening directly with the drawing: see ''[[:en:create:functions:urndraw|urnDraw()]]''
 +
  
 ===== Create an Urn ===== ===== Create an Urn =====
en/create/random_urns.txt · Last modified: 04.06.2019 21:25 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki