How to use multiple *experiments in the same program🔗

You can create as many different *experiments within your program as you like. However, we recommend that you take sample size and power into consideration when planning how many different levels/experiments to include.[1] Below, we explain a simple way of including multiple experiments in the same program.

For each experiment in your program, you can set variables which you then refer to later in your program (e.g., using *if statements).

Example of how to run multiple experiments in the same program:🔗

Suppose you were running a large study through which you planned to investigate people's perceptions of other adults' life satisfaction. You might have the following background information and questions that you'd like to give to participants.

>> backgroundInfo =	"A large sample of adults in the U.S. were asked how satisfied they were with their life so far. They were given four options: very dissatisfied, somewhat dissatisfied, somewhat satisfied, or very satisfied. This study will ask you to guess which proportion of people gave which answers."
>> Q1 = "What proportion of U.S. adults do you think reported being either somewhat or very satisfied with their life?"
>> Q2 = "What proportion of U.S. adults do you think reported being somewhat satisfied with their life?"
>> Q3 = "What proportion of U.S. adults do you think reported being very satisfied with their life?"

Suppose that you want to test:

  • The effect of the provision of background information (compared to no information) on how people answer the three questions, and...
  • The effect of question presentation order on how people answer the three questions. For this experiment, let's say you wanted to investigate:
    • The effect of presenting Q1 first compared to not doing so (because you might predict this will affect answers due to subadditivity effects, for example), and...
    • The effect of presenting Q2 prior to Q3, compared to Q3 prior to Q2.

This example shows how you could create three "experiments" within the same program, in such a way as to investigate all of the effects listed above (provided your sample size was large enough to do so with enough power for the results to be meaningful).

*experiment: backgroundInfo
	*group: withBackgroundInfo
		>> backgroundInfo = 1
	*group: noBackgroundInfo
		>> backgroundInfo = 0

*if: backgroundInfo = 1
	{backgroundInfo}
	*button: I understand.

*experiment: Q1Position
	*group: askQ1First
		>> askQ1First = 1
	*group: askOtherFirst
		>> askQ1First = 0

*experiment: Q2and3Order
	*group: askQ2BeforeQ3
		>> askQ2BeforeQ3 = 1

		*if: askQ1First= 1
			>> questionsInOrder = [Q1, Q2, Q3]

		*if: askQ1First = 0
			>> questionsInOrder = [Q2, Q3, Q1]

	*group: askQ3BeforeQ2
		>> askQ2BeforeQ3= 0

		*if: askQ1First = 1
			>> questionsInOrder = [Q1, Q3, Q2]

		*if: askQ1First = 0
			>> questionsInOrder = [Q3, Q2, Q1]

*if: backgroundInfo = 1
	*maintain: As mentioned before, {backgroundInfo}

>> pairedQandA = {}
>> i = 1

*for: questionToAsk in questionsInOrder
	*question: {questionToAsk}
		*save: answer

	>> pairedQandA[questionToAsk] = answer

*clear

[1] Note that there will only be equal numbers of participants in each arm of each individual experiment, but if you are using one experiment within another one, e.g., as in factorial designs, you will not necessarily have equal numbers of participants in each subgroup. For example, if you have an experiment randomizing people to groups A and B, and an experiment also randomizing the same people to unrelated groups C and D, you will have at most a difference of n = 1 between any two groups A and B, and between C and D, but you might have a difference of more than n = 1 between people who have groups A and C, vs. people who are in groups A and D, vs. people in groups B and C, vs. people in groups B and D.


Next: