This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
en:create:random_urns [28.06.2015 10:02] – [Create Internal Variables] admin | en:create:random_urns [04.06.2019 21:25] – [Randomization Using Urns] admin | ||
---|---|---|---|
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: | ||
+ | |||
+ | **Important: | ||
+ | en sind nur für wenige spezielle Anwendungsfälle die beste Lösung. lease be sure to read the chapter on [[: | ||
+ | ==== Drawing without Replacement ==== | ||
+ | |||
+ | A random draw " | ||
+ | |||
+ | **Advice:** Entire questionnaires __cannot__ be randomized using urns. An urn cannot be used to " | ||
+ | |||
+ | **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 [[: | ||
+ | - In **Special Features** -> **Randomization Using Urns** -> //Create new urn//, e.g. with the //ID// (" | ||
+ | - [[php|PHP code]] is used to carry out the actual random draw. | ||
+ | |||
+ | <code php> | ||
+ | urnDraw(' | ||
+ | </ | ||
+ | |||
+ | **Note:** Only the question ID is entered as the second parameter in the function '' | ||
+ | |||
+ | **Note:** You can decide whether the ballot drawn should be stored immediately or not until later. Read the the reference to the PHP function '' | ||
+ | |||
+ | **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 '' | ||
+ | |||
===== Create an Urn ===== | ===== Create an Urn ===== |