This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:create:randomization [06.06.2017 13:14] – update admin | en:create:randomization [19.12.2018 11:05] – [Urns for Subgroup I] freekgille | ||
---|---|---|---|
Line 6: | Line 6: | ||
Tip: Read the chapters [[php|Introduction to PHP]] and [[array|Introduction to Arrays]] for a better understanding of the complex example codes shown below. | Tip: Read the chapters [[php|Introduction to PHP]] and [[array|Introduction to Arrays]] for a better understanding of the complex example codes shown below. | ||
+ | |||
+ | |||
+ | ===== General Usage ===== | ||
+ | |||
+ | The experimental logic (between-subject) assumes that the participants of an experiment are divided into experimental groups. Depending on the group assignment, a question, text, image or video (the treatment or stimulus) is then varied. | ||
+ | |||
+ | Even if your goal " | ||
+ | |||
+ | |||
+ | ==== Step 1: Assignment to experimental groups ==== | ||
+ | |||
+ | Create a question of type [[: | ||
+ | |||
+ | < | ||
+ | Control Group | ||
+ | Positive Exemplars | ||
+ | Negative Exemplars | ||
+ | </ | ||
+ | |||
+ | After saving, SoSci Survey adds a numeric code for each group, e.g. | ||
+ | |||
+ | < | ||
+ | 1 = Control Group | ||
+ | 2 = Positive Exemplars | ||
+ | 3 = Negative Exemplars | ||
+ | </ | ||
+ | |||
+ | With the //Type of drawing// you can decide whether you want to select "Equal distribution in completed questionnaires" | ||
+ | |||
+ | For //Codes drawn per interview// leave the value 1. Thus, the participant is only assigned to one of the experimental conditions/ | ||
+ | |||
+ | |||
+ | ==== Step 2: Presentation of the Stimulus ==== | ||
+ | |||
+ | In **Combine Questionnaire**, | ||
+ | |||
+ | The random generator will now randomly draw one of the defined groups and store its code in a variable with the random generator' | ||
+ | |||
+ | Place an element " | ||
+ | |||
+ | If the stimulus is a question (i.e. in group A another question from the **List of Questions** is to be displayed than in group B), the function '' | ||
+ | |||
+ | The following PHP code would display the question " | ||
+ | |||
+ | <code php> | ||
+ | if (value(' | ||
+ | question(' | ||
+ | } elseif (value(' | ||
+ | question(' | ||
+ | } else { | ||
+ | // You may omit the else part, | ||
+ | // nothing happens here | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The function '' | ||
+ | |||
+ | The other sections of this manual explain various areas of application of randomization. | ||
+ | |||
===== Drawing of a Random Number ===== | ===== Drawing of a Random Number ===== | ||
Line 513: | Line 572: | ||
It may be the case that you need to ensure equal distribution of experimental groups in two subgroups -- for instance, if you have 3 stimuli and both the women in the study, as well as the men, should be equally divided between all three conditions. | It may be the case that you need to ensure equal distribution of experimental groups in two subgroups -- for instance, if you have 3 stimuli and both the women in the study, as well as the men, should be equally divided between all three conditions. | ||
- | To do so, you require an internal variable and two urns (with the same content). The following example assumes that the sex was queried on an earlier page in the multiple-choice question SD02. Also, that you have set up two urns with the IDS " | + | To do so, you require an internal variable and two urns (with the same content). The following example assumes that the sex was queried on an earlier page in the multiple-choice question SD02. Also, that you have set up two urns with the IDS " |
<code php> | <code php> |