Experiment Files - Advanced

Is current?: 

This entry shows how to create an experiment file with advanced branching using the "advanced.expt" file (downloadable at the bottom).

For this example, we have two conditions, each with a different manipulation but that both use the same counterbalancing of the IAT.


Because the study file has two conditions that use the some of the same materials, the definition section needs to have two ids per task for each of the tasks that is re-used. For example, we want to use the same "iatraceinstruct.htm" page for both conditions. However, the expt file cannot call the same id twice within a study. To offset this problem, we create two separte ids, "iatraceinstructa" and "iatraceinstructb". Notice that both of these ids call the same file. The same reasoning explains the IAT files as well.

<Task id="startpage">/common/en-us/html/Instructions.jsp</Task>
<Task id="consent">consent.htm</Task>
<Task id="dropdown">dropdown.htm</Task>
<Task id="radiobutton">radiobutton.htm</Task>
<Task id="iatraceinstructa">iatraceinstruct.htm</Task>
<Task id="iatraceinstructb">iatraceinstruct.htm</Task>
<Task id="iatrace1a" file="iatrace1.xml">/common/en-us/html/iattask6.jsp</Task>
<Task id="iatrace2a" file="iatrace2.xml">/common/en-us/html/iattask6.jsp</Task>
<Task id="iatrace1b" file="iatrace1.xml">/common/en-us/html/iattask6.jsp</Task>
<Task id="iatrace2b" file="iatrace2.xml">/common/en-us/html/iattask6.jsp</Task>
<Task id="lastpage">lastpage.htm</Task>
<Task id="debriefing">debriefing.jsp</Task>


The study map begins as usual, with participants receiving the start page and consent page in a fixed order.

<Task id="startpage"/>
<Task id="consent"/>

Now, however, we have our first branch. This branch tells our experiment to only select one of the following two conditions: conditionA or conditionB.

<Branch id="condition" type="group" select="1">

Once selecting conditionA, it receives another branch. This branch tells the experiment file all of the tasks that need to be called in conditionA. Items in this branch will continue to be executed in order. So, for example, it will execute "manipa" first.

<Branch id="conditionA" type="group">
<Task id="dropdown"/>

However, after this execution, it now receives another branch. This time, it is refering to the IAT counterbalancing. Remember, the ids need to be distinct. Thus the branch id is denoted as "raceiata" since it belongs to conditionA. This branch tells the study to do everything inside the sub-branch before moving on. A description of the inner branch can be found on the moderate experiment file. The remaining "</Branch"> " tags are closing tags that close each of the original branches we started. 

<Branch id="raceiata" type="group">
<Task id="iatraceinstructa" />
<Branch id="iatrace1of2a" type="group" select="1">
<Task id="iatrace1a" />
<Task id="iatrace2a" />

Here is the identical branch and sub-branch for conditionB:

<Branch id="conditionB" type="group">
<Task id="radiobutton"/>
<Branch id="raceiatb" type="group">
<Task id="iatraceinstructb" />
<Branch id="iatrace1of2b" type="group" select="1">
<Task id="iatrace1b" />
<Task id="iatrace2b" />

Finally, the below code closes the initial branch as well as the map and study.

<Task id="lastpage"/>
<Task id="debriefing"/>