Displaying a stimulus selected by the participant


Author
Message
sakm
sakm
Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)
Group: Forum Members
Posts: 20, Visits: 58
Hi, 
 
I have a selection task where participants "Accept" or "Reject" certain profiles (code below). What I now need to do is store one participant choice and then display it in a separate block. Can this be done with the following script? I would appreciate any help!

Thanks!



<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
/ inputdevice = keyboard
</defaults>

### Loading pictures into memory

<picture profiles>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg",
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
</picture>

<picture faces>
/ items = ("Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg",
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
</picture>



### Welcome screen. This is optional.

<item welcome>
/ 1 = "Welcome! Press the spacebar to continue."
</item>

<text welcome>
/ items = welcome
/ fontstyle = ("Arial", 4.59%, true, false, false, false, 5, 0)
/ numitems = 1
</text>

<trial welcome>
/ stimulusframes = [1=Welcome]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata = false
</trial>

<block welcome>
/ trials = [1 = welcome]
</block>

### Attention check 1

<dropdown att1>
/ caption="What is your favourite drink?"
/ options=("Wine", "Beer", "Vodka", "Whisky", "Carrot Juice", "Other")
/ required=true
</dropdown>

<surveypage att1>
/caption = "This is a simple question. When asked for your favourite drink, please pick 'Carrot Juice'. This is an attention check:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1= att1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block attention1>
/ trials = [1=att1]
</block>


### Instructions. These instructions are for an academic context and are the same as those used in Axt, Nguyen & Nosek (2016), but should be adapted to whatever version of the JBT you develop.

<item InstructionsPage1>
/1= "INSTRUCTIONS: Welcome to our virtual world. In this task, you will play the role of selection committee member for an academic honor society. You will see a variety of virtual avatars (as applicants) and their information, and it is up to you to decide who to accept into the honor society and who to reject. It is your job to try and select the most qualified candidates.

More specifically, each applicant will have four pieces of information that are available to you:

1) Science Grade: Average grade (out of 10.0) in science classes (biology, chemistry, etc.)
2) Humanities Grade: Average grade (out of 10.0) in humanities classes (English, foreign languages, etc.)
3) Letters of Recommendation: The overall quality (poor, fair, good or excellent) of the letters of recommendation that accompanied the application.
4) Interview Score: The interview score (out of 100) that the applicant received during the first round of the application process, which just ended.

PRESS THE SPACE BAR TO CONTINUE."

</item>

<text InstructionsPage1>
/ items = InstructionsPage1
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage1>
/ stimulusframes = [1=InstructionsPage1]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage2>
/1= "
Importantly, this academic honor society is looking for very well-rounded applicants, so it is crucial that you weigh and consider each of the four qualifications equally when you make your decision about who to accept and who to reject into the next round of the application process.

For this round of the application process, you need to reject around half of the applicants, so try to keep an estimate of what percentage of the applicants you have rejected as you complete the task.

PRESS THE SPACE BAR TO CONTINUE."
</item>

<text InstructionsPage2>
/ items = InstructionsPage2
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage2>
/ stimulusframes = [1=InstructionsPage2]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage3>
/1= "
On the next few screens, you will be shown each applicant and their credentials. This is just to get you familiar with the applicant pool. For this round, there are 40 total applicants.

After you see each applicant briefly, you will then be presented with applicants one at a time. There will be a button on the screen for 'Accept' and another for 'Reject'.

There are no right or wrong answers, but please try your best to select the most qualified applicants.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text InstructionsPage3>
/ items = InstructionsPage3
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage3>
/ stimulusframes = [1=InstructionsPage3]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<block instructions>
/ trials = [1=InstructionsPage1; 2=InstructionsPage2; 3 = InstructionsPage3]
</block>

### Test Instructions. These instructions are displayed after the encoding phase but before the testing phase.

<item TestInstructions>
/1= "
On the next screen, you will begin seeing each of the 40 applicants, one at a time. There will be one button for 'Accept' and another for 'Reject'.

Again, you should be accepting approximately half of the applicants to reach the next round.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text TestInstructions>
/ items = TestInstructions
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial TestInstructions>
/ stimulusframes = [1=TestInstructions]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

### Category Images
### There should be two pictures created for each LEVEL (should be accepted/should be rejected) and each CATEGORY (Dutch/Moroccan).
### For this coding, Level A means should be accepted, Level B means should be rejected, Category A means Dutch and Category B means Moroccan.
### There need to be two pictures made in order for the same combinations to be presented at both encoding and testing
### Notice that the second version of each picture has a 'select' option that refers to the first version
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<picture levela_categorya1>
/items = levela_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categorya2>
/items = levela_categorya2
/ select = current(levela_categorya1)
/position=(50%,34.2%)
</picture>

<picture levela_categoryb1>
/items = levela_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categoryb2>
/items = levela_categoryb2
/ select = current(levela_categoryb1)
/position=(50%,34.2%)
</picture>

<picture levelb_categorya1>
/items = levelb_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categorya2>
/items = levelb_categorya2
/ select = current(levelb_categorya1)
/position=(50%,34.2%)
</picture>

<picture levelb_categoryb1>
/items = levelb_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categoryb2>
/items = levelb_categoryb2
/ select = current(levelb_categoryb1)
/position=(50%,34.2%)
</picture>

### Making each picture set an item
### Each of the eight images made above will also need to be its own item
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<item levela_categorya1>
</item>

<item levela_categorya2>
</item>

<item levela_categoryb1>
</item>

<item levela_categoryb2>
</item>

<item levelb_categorya1>
</item>

<item levelb_categorya2>
</item>

<item levelb_categoryb1>
</item>

<item levelb_categoryb2>
</item>

### Response Option Images
### These are the two images you will use for your response options during the task. In this version, the response options are accept and reject.
### You can update these to whatever you think is appropriate for your task (e.g., approach/avoid, admit/deny, etc.).
### The response options should be made as separate image files.
### In this version, Level A means accept and Level B means reject.
### To adapt this coding for your own purposes, just make new response option buttons (if other than accept/reject) and change the 'items' lines in the two pictures below to whatever images you would like to use.

<picture levelabutton>
/items = ("Accept.jpg")
/ position = (85%,80%)
/size = (16%,16%)
</picture>

<picture levelbbutton>
/items = ("Reject.jpg")
/ position = (15%,80%)
/size = (16%,16%)
</picture>

### Creating counters for each level and for each category
### To adapt the JBT to your own needs, you'll need to replace the 'items' in each counter to refer to your own stimuli and decide beforehand what your levels and categories will be
### In this version, Leval A refers to those applicants that should be accepted, Level B to those applicants that should be rejected, Category A means Dutch and Category B means Moroccans

<counter setup_levela>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_levelb>
/ items = (
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categorya>
/ items = (
"Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categoryb>
/ items = (
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

### Pairing trials.
### These trials are the first thing run in the study but are not presented to the participant. They create the randomly selected pairs between the category images and the level profiles
### This ensures that each participant is getting randomly assigned pairings, such that half of the cat images are paired with 'reject' profiles, and half with 'accept' profiles. Same for the dog images.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial pair_levela_categorya>
/ ontrialbegin = [item.levela_categorya1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categorya>
/ ontrialbegin = [item.levelb_categorya1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levela_categoryb>
/ ontrialbegin = [item.levela_categoryb1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categoryb>
/ ontrialbegin = [item.levelb_categoryb1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

### Encoding trials.
### These trials are presented to the participant after the instructions. There is no response option and particpants passively view the profiles
### These trials are necessary for participants to get an exposure to the range of profiles before they begin accepting and rejecting them.
### Make a trial to present the each application/image combination during the encoding phase
### For this version, each image is presented for one second, with a 200 millisecond pause between profiles. You can alter these values by changing the 'timeout' and 'posttrialpause' lines
### You do not need to alter any of the coding below to adapt the JBT to your own use other than to play with the timing of how long each profile is presented for.

<trial encode_levela_categorya>
/stimulusframes = [1=levela_categorya1,levela_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelb_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levela_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelb_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>


##################
### Testing trials.
### These are the only trials set up to record data. The program automatically records whether participants are making a correct or incorrect decision.
### Make one trial for each application/image combination for the test phase.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial test_levela_categorya>
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

### Creating the blocks for pairings, encoding, and testing.
### Note that the first trial in the testing block is the 'TestInstructions' page made previously.
### To adapt the JBT to your own needs, the only thing you'll need to change is /trials line in the block component below. It is set up for 64 trials (there are 64 total profiles and 64 total category images).
### You will need to change the block component to have however many trials are necessary for your version of the JBT.

<block pairings>
/ trials = [1-40=noreplace(pair_levela_categorya, pair_levelb_categorya, pair_levela_categoryb, pair_levelb_categoryb)]
</block>

<block encoding>
/ trials = [1-40=noreplace(encode_levela_categorya, encode_levelb_categorya, encode_levela_categoryb, encode_levelb_categoryb)]
</block>

<block testing>
/ trials = [1=TestInstructions; 2-41=noreplace(test_levela_categorya, test_levelb_categorya, test_levela_categoryb, test_levelb_categoryb)]
</block>

### Demographics


<dropdown q1>
/ caption="Please state what gender you identify with:"
/ options=("Female", "Male", "Non-binary", "Other", "Prefer not to say")
/ required=true
</dropdown>

<textbox q2>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (12, 120)
</textbox>


<dropdown att2>
/ caption="This colour test is very simple. When asked for your favourite color, please pick 'Green'. This is an attention check.
What is your favourite colour?"
/ options=("Red", "Blue", "Green", "Orange", "Brown")
/ required=true
</dropdown>


<surveypage s2>
/caption = "Thanks for completing the task. To complete the study, please answer the questions below:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1=q1; 2 = q2; 3 = att2]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block demographics>
/ trials = [1=s2]
</block>

### End study screen. This is the last page that participants will see.

<item endstudy>
/1= "Thank you for participating in this study! The main goal of this research is to investigate the extent to which people favour White-Dutch applicants compared to Moroccan-Dutch appearing applicants. In this study, you completed a task that measures social biases in individuals.

The task required you to accept or reject a number of applicants applying for an academic honour society. Within the pool of applicants, we varied the qualifications of the applicants to create two groups. There was one set of applicants that was more qualified (that should have been accepted) and another set that was less qualified (that should have been rejected). Furthermore, within each set of applicants that should have been accepted or rejected, we used avatars created from either Moroccan-Dutch or White-Dutch faces.

If you have further questions about the study please contact the investigator, Afreen Khalid (afreen.khalid@ru.nl).

PRESS SPACEBAR TO EXIT AND RECEIVE YOUR COMPLETION CODE"
</item>

<text endstudy>
/ items = endstudy
/ fontstyle = ("Arial", 1.96%, false, false, false, false, 5, 0)
/ position = (50%, 25%)
/ size = (80%, 30%)
/ hjustify = left
</text>

<trial endstudy>
/ stimulusframes = [1=endstudy]
/ validresponse = (" ")
/ inputdevice = keyboard
/ showmousecursor = true
/ recorddata= false
</trial>

<block endstudy>
/ trials = [1=endstudy]
</block>

### Experiment component.
### You do not need to alter any of the coding below to adapt the JBT to your own use, though you may need to if you want to add in more questions, tasks, etc.

<expt>
/blocks = [1=pairings;2=welcome; 3=attention1;4=instructions;5=encoding; 6=testing;7=demographics; 8=endstudy]
</expt>

### Formatting the data columns

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency,stimulusnumber,stimulusitem, stimulusitem,stimulusitem,stimulusitem]
</data>








Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 97K
sakm - 4/6/2023
Hi, 
 
I have a selection task where participants "Accept" or "Reject" certain profiles (code below). What I now need to do is store one participant choice and then display it in a separate block. Can this be done with the following script? I would appreciate any help!

Thanks!



<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
/ inputdevice = keyboard
</defaults>

### Loading pictures into memory

<picture profiles>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg",
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
</picture>

<picture faces>
/ items = ("Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg",
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
</picture>



### Welcome screen. This is optional.

<item welcome>
/ 1 = "Welcome! Press the spacebar to continue."
</item>

<text welcome>
/ items = welcome
/ fontstyle = ("Arial", 4.59%, true, false, false, false, 5, 0)
/ numitems = 1
</text>

<trial welcome>
/ stimulusframes = [1=Welcome]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata = false
</trial>

<block welcome>
/ trials = [1 = welcome]
</block>

### Attention check 1

<dropdown att1>
/ caption="What is your favourite drink?"
/ options=("Wine", "Beer", "Vodka", "Whisky", "Carrot Juice", "Other")
/ required=true
</dropdown>

<surveypage att1>
/caption = "This is a simple question. When asked for your favourite drink, please pick 'Carrot Juice'. This is an attention check:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1= att1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block attention1>
/ trials = [1=att1]
</block>


### Instructions. These instructions are for an academic context and are the same as those used in Axt, Nguyen & Nosek (2016), but should be adapted to whatever version of the JBT you develop.

<item InstructionsPage1>
/1= "INSTRUCTIONS: Welcome to our virtual world. In this task, you will play the role of selection committee member for an academic honor society. You will see a variety of virtual avatars (as applicants) and their information, and it is up to you to decide who to accept into the honor society and who to reject. It is your job to try and select the most qualified candidates.

More specifically, each applicant will have four pieces of information that are available to you:

1) Science Grade: Average grade (out of 10.0) in science classes (biology, chemistry, etc.)
2) Humanities Grade: Average grade (out of 10.0) in humanities classes (English, foreign languages, etc.)
3) Letters of Recommendation: The overall quality (poor, fair, good or excellent) of the letters of recommendation that accompanied the application.
4) Interview Score: The interview score (out of 100) that the applicant received during the first round of the application process, which just ended.

PRESS THE SPACE BAR TO CONTINUE."

</item>

<text InstructionsPage1>
/ items = InstructionsPage1
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage1>
/ stimulusframes = [1=InstructionsPage1]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage2>
/1= "
Importantly, this academic honor society is looking for very well-rounded applicants, so it is crucial that you weigh and consider each of the four qualifications equally when you make your decision about who to accept and who to reject into the next round of the application process.

For this round of the application process, you need to reject around half of the applicants, so try to keep an estimate of what percentage of the applicants you have rejected as you complete the task.

PRESS THE SPACE BAR TO CONTINUE."
</item>

<text InstructionsPage2>
/ items = InstructionsPage2
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage2>
/ stimulusframes = [1=InstructionsPage2]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage3>
/1= "
On the next few screens, you will be shown each applicant and their credentials. This is just to get you familiar with the applicant pool. For this round, there are 40 total applicants.

After you see each applicant briefly, you will then be presented with applicants one at a time. There will be a button on the screen for 'Accept' and another for 'Reject'.

There are no right or wrong answers, but please try your best to select the most qualified applicants.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text InstructionsPage3>
/ items = InstructionsPage3
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage3>
/ stimulusframes = [1=InstructionsPage3]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<block instructions>
/ trials = [1=InstructionsPage1; 2=InstructionsPage2; 3 = InstructionsPage3]
</block>

### Test Instructions. These instructions are displayed after the encoding phase but before the testing phase.

<item TestInstructions>
/1= "
On the next screen, you will begin seeing each of the 40 applicants, one at a time. There will be one button for 'Accept' and another for 'Reject'.

Again, you should be accepting approximately half of the applicants to reach the next round.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text TestInstructions>
/ items = TestInstructions
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial TestInstructions>
/ stimulusframes = [1=TestInstructions]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

### Category Images
### There should be two pictures created for each LEVEL (should be accepted/should be rejected) and each CATEGORY (Dutch/Moroccan).
### For this coding, Level A means should be accepted, Level B means should be rejected, Category A means Dutch and Category B means Moroccan.
### There need to be two pictures made in order for the same combinations to be presented at both encoding and testing
### Notice that the second version of each picture has a 'select' option that refers to the first version
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<picture levela_categorya1>
/items = levela_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categorya2>
/items = levela_categorya2
/ select = current(levela_categorya1)
/position=(50%,34.2%)
</picture>

<picture levela_categoryb1>
/items = levela_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categoryb2>
/items = levela_categoryb2
/ select = current(levela_categoryb1)
/position=(50%,34.2%)
</picture>

<picture levelb_categorya1>
/items = levelb_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categorya2>
/items = levelb_categorya2
/ select = current(levelb_categorya1)
/position=(50%,34.2%)
</picture>

<picture levelb_categoryb1>
/items = levelb_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categoryb2>
/items = levelb_categoryb2
/ select = current(levelb_categoryb1)
/position=(50%,34.2%)
</picture>

### Making each picture set an item
### Each of the eight images made above will also need to be its own item
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<item levela_categorya1>
</item>

<item levela_categorya2>
</item>

<item levela_categoryb1>
</item>

<item levela_categoryb2>
</item>

<item levelb_categorya1>
</item>

<item levelb_categorya2>
</item>

<item levelb_categoryb1>
</item>

<item levelb_categoryb2>
</item>

### Response Option Images
### These are the two images you will use for your response options during the task. In this version, the response options are accept and reject.
### You can update these to whatever you think is appropriate for your task (e.g., approach/avoid, admit/deny, etc.).
### The response options should be made as separate image files.
### In this version, Level A means accept and Level B means reject.
### To adapt this coding for your own purposes, just make new response option buttons (if other than accept/reject) and change the 'items' lines in the two pictures below to whatever images you would like to use.

<picture levelabutton>
/items = ("Accept.jpg")
/ position = (85%,80%)
/size = (16%,16%)
</picture>

<picture levelbbutton>
/items = ("Reject.jpg")
/ position = (15%,80%)
/size = (16%,16%)
</picture>

### Creating counters for each level and for each category
### To adapt the JBT to your own needs, you'll need to replace the 'items' in each counter to refer to your own stimuli and decide beforehand what your levels and categories will be
### In this version, Leval A refers to those applicants that should be accepted, Level B to those applicants that should be rejected, Category A means Dutch and Category B means Moroccans

<counter setup_levela>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_levelb>
/ items = (
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categorya>
/ items = (
"Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categoryb>
/ items = (
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

### Pairing trials.
### These trials are the first thing run in the study but are not presented to the participant. They create the randomly selected pairs between the category images and the level profiles
### This ensures that each participant is getting randomly assigned pairings, such that half of the cat images are paired with 'reject' profiles, and half with 'accept' profiles. Same for the dog images.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial pair_levela_categorya>
/ ontrialbegin = [item.levela_categorya1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categorya>
/ ontrialbegin = [item.levelb_categorya1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levela_categoryb>
/ ontrialbegin = [item.levela_categoryb1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categoryb>
/ ontrialbegin = [item.levelb_categoryb1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

### Encoding trials.
### These trials are presented to the participant after the instructions. There is no response option and particpants passively view the profiles
### These trials are necessary for participants to get an exposure to the range of profiles before they begin accepting and rejecting them.
### Make a trial to present the each application/image combination during the encoding phase
### For this version, each image is presented for one second, with a 200 millisecond pause between profiles. You can alter these values by changing the 'timeout' and 'posttrialpause' lines
### You do not need to alter any of the coding below to adapt the JBT to your own use other than to play with the timing of how long each profile is presented for.

<trial encode_levela_categorya>
/stimulusframes = [1=levela_categorya1,levela_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelb_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levela_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelb_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>


##################
### Testing trials.
### These are the only trials set up to record data. The program automatically records whether participants are making a correct or incorrect decision.
### Make one trial for each application/image combination for the test phase.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial test_levela_categorya>
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

### Creating the blocks for pairings, encoding, and testing.
### Note that the first trial in the testing block is the 'TestInstructions' page made previously.
### To adapt the JBT to your own needs, the only thing you'll need to change is /trials line in the block component below. It is set up for 64 trials (there are 64 total profiles and 64 total category images).
### You will need to change the block component to have however many trials are necessary for your version of the JBT.

<block pairings>
/ trials = [1-40=noreplace(pair_levela_categorya, pair_levelb_categorya, pair_levela_categoryb, pair_levelb_categoryb)]
</block>

<block encoding>
/ trials = [1-40=noreplace(encode_levela_categorya, encode_levelb_categorya, encode_levela_categoryb, encode_levelb_categoryb)]
</block>

<block testing>
/ trials = [1=TestInstructions; 2-41=noreplace(test_levela_categorya, test_levelb_categorya, test_levela_categoryb, test_levelb_categoryb)]
</block>

### Demographics


<dropdown q1>
/ caption="Please state what gender you identify with:"
/ options=("Female", "Male", "Non-binary", "Other", "Prefer not to say")
/ required=true
</dropdown>

<textbox q2>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (12, 120)
</textbox>


<dropdown att2>
/ caption="This colour test is very simple. When asked for your favourite color, please pick 'Green'. This is an attention check.
What is your favourite colour?"
/ options=("Red", "Blue", "Green", "Orange", "Brown")
/ required=true
</dropdown>


<surveypage s2>
/caption = "Thanks for completing the task. To complete the study, please answer the questions below:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1=q1; 2 = q2; 3 = att2]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block demographics>
/ trials = [1=s2]
</block>

### End study screen. This is the last page that participants will see.

<item endstudy>
/1= "Thank you for participating in this study! The main goal of this research is to investigate the extent to which people favour White-Dutch applicants compared to Moroccan-Dutch appearing applicants. In this study, you completed a task that measures social biases in individuals.

The task required you to accept or reject a number of applicants applying for an academic honour society. Within the pool of applicants, we varied the qualifications of the applicants to create two groups. There was one set of applicants that was more qualified (that should have been accepted) and another set that was less qualified (that should have been rejected). Furthermore, within each set of applicants that should have been accepted or rejected, we used avatars created from either Moroccan-Dutch or White-Dutch faces.

If you have further questions about the study please contact the investigator, Afreen Khalid (afreen.khalid@ru.nl).

PRESS SPACEBAR TO EXIT AND RECEIVE YOUR COMPLETION CODE"
</item>

<text endstudy>
/ items = endstudy
/ fontstyle = ("Arial", 1.96%, false, false, false, false, 5, 0)
/ position = (50%, 25%)
/ size = (80%, 30%)
/ hjustify = left
</text>

<trial endstudy>
/ stimulusframes = [1=endstudy]
/ validresponse = (" ")
/ inputdevice = keyboard
/ showmousecursor = true
/ recorddata= false
</trial>

<block endstudy>
/ trials = [1=endstudy]
</block>

### Experiment component.
### You do not need to alter any of the coding below to adapt the JBT to your own use, though you may need to if you want to add in more questions, tasks, etc.

<expt>
/blocks = [1=pairings;2=welcome; 3=attention1;4=instructions;5=encoding; 6=testing;7=demographics; 8=endstudy]
</expt>

### Formatting the data columns

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency,stimulusnumber,stimulusitem, stimulusitem,stimulusitem,stimulusitem]
</data>








You'll need to be more specific.

> "What I now need to do is store one participant choice and then display it in a separate block"

How do you want to determine that one choice and what exactly is it you want to display?

Also, if you have code that requires external files to run, please always provide those files along with the code.
sakm
sakm
Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)
Group: Forum Members
Posts: 20, Visits: 58
Dave - 4/6/2023
sakm - 4/6/2023
Hi, 
 
I have a selection task where participants "Accept" or "Reject" certain profiles (code below). What I now need to do is store one participant choice and then display it in a separate block. Can this be done with the following script? I would appreciate any help!

Thanks!



<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
/ inputdevice = keyboard
</defaults>

### Loading pictures into memory

<picture profiles>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg",
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
</picture>

<picture faces>
/ items = ("Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg",
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
</picture>



### Welcome screen. This is optional.

<item welcome>
/ 1 = "Welcome! Press the spacebar to continue."
</item>

<text welcome>
/ items = welcome
/ fontstyle = ("Arial", 4.59%, true, false, false, false, 5, 0)
/ numitems = 1
</text>

<trial welcome>
/ stimulusframes = [1=Welcome]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata = false
</trial>

<block welcome>
/ trials = [1 = welcome]
</block>

### Attention check 1

<dropdown att1>
/ caption="What is your favourite drink?"
/ options=("Wine", "Beer", "Vodka", "Whisky", "Carrot Juice", "Other")
/ required=true
</dropdown>

<surveypage att1>
/caption = "This is a simple question. When asked for your favourite drink, please pick 'Carrot Juice'. This is an attention check:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1= att1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block attention1>
/ trials = [1=att1]
</block>


### Instructions. These instructions are for an academic context and are the same as those used in Axt, Nguyen & Nosek (2016), but should be adapted to whatever version of the JBT you develop.

<item InstructionsPage1>
/1= "INSTRUCTIONS: Welcome to our virtual world. In this task, you will play the role of selection committee member for an academic honor society. You will see a variety of virtual avatars (as applicants) and their information, and it is up to you to decide who to accept into the honor society and who to reject. It is your job to try and select the most qualified candidates.

More specifically, each applicant will have four pieces of information that are available to you:

1) Science Grade: Average grade (out of 10.0) in science classes (biology, chemistry, etc.)
2) Humanities Grade: Average grade (out of 10.0) in humanities classes (English, foreign languages, etc.)
3) Letters of Recommendation: The overall quality (poor, fair, good or excellent) of the letters of recommendation that accompanied the application.
4) Interview Score: The interview score (out of 100) that the applicant received during the first round of the application process, which just ended.

PRESS THE SPACE BAR TO CONTINUE."

</item>

<text InstructionsPage1>
/ items = InstructionsPage1
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage1>
/ stimulusframes = [1=InstructionsPage1]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage2>
/1= "
Importantly, this academic honor society is looking for very well-rounded applicants, so it is crucial that you weigh and consider each of the four qualifications equally when you make your decision about who to accept and who to reject into the next round of the application process.

For this round of the application process, you need to reject around half of the applicants, so try to keep an estimate of what percentage of the applicants you have rejected as you complete the task.

PRESS THE SPACE BAR TO CONTINUE."
</item>

<text InstructionsPage2>
/ items = InstructionsPage2
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage2>
/ stimulusframes = [1=InstructionsPage2]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage3>
/1= "
On the next few screens, you will be shown each applicant and their credentials. This is just to get you familiar with the applicant pool. For this round, there are 40 total applicants.

After you see each applicant briefly, you will then be presented with applicants one at a time. There will be a button on the screen for 'Accept' and another for 'Reject'.

There are no right or wrong answers, but please try your best to select the most qualified applicants.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text InstructionsPage3>
/ items = InstructionsPage3
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage3>
/ stimulusframes = [1=InstructionsPage3]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<block instructions>
/ trials = [1=InstructionsPage1; 2=InstructionsPage2; 3 = InstructionsPage3]
</block>

### Test Instructions. These instructions are displayed after the encoding phase but before the testing phase.

<item TestInstructions>
/1= "
On the next screen, you will begin seeing each of the 40 applicants, one at a time. There will be one button for 'Accept' and another for 'Reject'.

Again, you should be accepting approximately half of the applicants to reach the next round.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text TestInstructions>
/ items = TestInstructions
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial TestInstructions>
/ stimulusframes = [1=TestInstructions]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

### Category Images
### There should be two pictures created for each LEVEL (should be accepted/should be rejected) and each CATEGORY (Dutch/Moroccan).
### For this coding, Level A means should be accepted, Level B means should be rejected, Category A means Dutch and Category B means Moroccan.
### There need to be two pictures made in order for the same combinations to be presented at both encoding and testing
### Notice that the second version of each picture has a 'select' option that refers to the first version
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<picture levela_categorya1>
/items = levela_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categorya2>
/items = levela_categorya2
/ select = current(levela_categorya1)
/position=(50%,34.2%)
</picture>

<picture levela_categoryb1>
/items = levela_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categoryb2>
/items = levela_categoryb2
/ select = current(levela_categoryb1)
/position=(50%,34.2%)
</picture>

<picture levelb_categorya1>
/items = levelb_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categorya2>
/items = levelb_categorya2
/ select = current(levelb_categorya1)
/position=(50%,34.2%)
</picture>

<picture levelb_categoryb1>
/items = levelb_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categoryb2>
/items = levelb_categoryb2
/ select = current(levelb_categoryb1)
/position=(50%,34.2%)
</picture>

### Making each picture set an item
### Each of the eight images made above will also need to be its own item
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<item levela_categorya1>
</item>

<item levela_categorya2>
</item>

<item levela_categoryb1>
</item>

<item levela_categoryb2>
</item>

<item levelb_categorya1>
</item>

<item levelb_categorya2>
</item>

<item levelb_categoryb1>
</item>

<item levelb_categoryb2>
</item>

### Response Option Images
### These are the two images you will use for your response options during the task. In this version, the response options are accept and reject.
### You can update these to whatever you think is appropriate for your task (e.g., approach/avoid, admit/deny, etc.).
### The response options should be made as separate image files.
### In this version, Level A means accept and Level B means reject.
### To adapt this coding for your own purposes, just make new response option buttons (if other than accept/reject) and change the 'items' lines in the two pictures below to whatever images you would like to use.

<picture levelabutton>
/items = ("Accept.jpg")
/ position = (85%,80%)
/size = (16%,16%)
</picture>

<picture levelbbutton>
/items = ("Reject.jpg")
/ position = (15%,80%)
/size = (16%,16%)
</picture>

### Creating counters for each level and for each category
### To adapt the JBT to your own needs, you'll need to replace the 'items' in each counter to refer to your own stimuli and decide beforehand what your levels and categories will be
### In this version, Leval A refers to those applicants that should be accepted, Level B to those applicants that should be rejected, Category A means Dutch and Category B means Moroccans

<counter setup_levela>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_levelb>
/ items = (
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categorya>
/ items = (
"Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categoryb>
/ items = (
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

### Pairing trials.
### These trials are the first thing run in the study but are not presented to the participant. They create the randomly selected pairs between the category images and the level profiles
### This ensures that each participant is getting randomly assigned pairings, such that half of the cat images are paired with 'reject' profiles, and half with 'accept' profiles. Same for the dog images.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial pair_levela_categorya>
/ ontrialbegin = [item.levela_categorya1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categorya>
/ ontrialbegin = [item.levelb_categorya1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levela_categoryb>
/ ontrialbegin = [item.levela_categoryb1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categoryb>
/ ontrialbegin = [item.levelb_categoryb1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

### Encoding trials.
### These trials are presented to the participant after the instructions. There is no response option and particpants passively view the profiles
### These trials are necessary for participants to get an exposure to the range of profiles before they begin accepting and rejecting them.
### Make a trial to present the each application/image combination during the encoding phase
### For this version, each image is presented for one second, with a 200 millisecond pause between profiles. You can alter these values by changing the 'timeout' and 'posttrialpause' lines
### You do not need to alter any of the coding below to adapt the JBT to your own use other than to play with the timing of how long each profile is presented for.

<trial encode_levela_categorya>
/stimulusframes = [1=levela_categorya1,levela_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelb_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levela_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelb_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>


##################
### Testing trials.
### These are the only trials set up to record data. The program automatically records whether participants are making a correct or incorrect decision.
### Make one trial for each application/image combination for the test phase.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial test_levela_categorya>
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

### Creating the blocks for pairings, encoding, and testing.
### Note that the first trial in the testing block is the 'TestInstructions' page made previously.
### To adapt the JBT to your own needs, the only thing you'll need to change is /trials line in the block component below. It is set up for 64 trials (there are 64 total profiles and 64 total category images).
### You will need to change the block component to have however many trials are necessary for your version of the JBT.

<block pairings>
/ trials = [1-40=noreplace(pair_levela_categorya, pair_levelb_categorya, pair_levela_categoryb, pair_levelb_categoryb)]
</block>

<block encoding>
/ trials = [1-40=noreplace(encode_levela_categorya, encode_levelb_categorya, encode_levela_categoryb, encode_levelb_categoryb)]
</block>

<block testing>
/ trials = [1=TestInstructions; 2-41=noreplace(test_levela_categorya, test_levelb_categorya, test_levela_categoryb, test_levelb_categoryb)]
</block>

### Demographics


<dropdown q1>
/ caption="Please state what gender you identify with:"
/ options=("Female", "Male", "Non-binary", "Other", "Prefer not to say")
/ required=true
</dropdown>

<textbox q2>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (12, 120)
</textbox>


<dropdown att2>
/ caption="This colour test is very simple. When asked for your favourite color, please pick 'Green'. This is an attention check.
What is your favourite colour?"
/ options=("Red", "Blue", "Green", "Orange", "Brown")
/ required=true
</dropdown>


<surveypage s2>
/caption = "Thanks for completing the task. To complete the study, please answer the questions below:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1=q1; 2 = q2; 3 = att2]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block demographics>
/ trials = [1=s2]
</block>

### End study screen. This is the last page that participants will see.

<item endstudy>
/1= "Thank you for participating in this study! The main goal of this research is to investigate the extent to which people favour White-Dutch applicants compared to Moroccan-Dutch appearing applicants. In this study, you completed a task that measures social biases in individuals.

The task required you to accept or reject a number of applicants applying for an academic honour society. Within the pool of applicants, we varied the qualifications of the applicants to create two groups. There was one set of applicants that was more qualified (that should have been accepted) and another set that was less qualified (that should have been rejected). Furthermore, within each set of applicants that should have been accepted or rejected, we used avatars created from either Moroccan-Dutch or White-Dutch faces.

If you have further questions about the study please contact the investigator, Afreen Khalid (afreen.khalid@ru.nl).

PRESS SPACEBAR TO EXIT AND RECEIVE YOUR COMPLETION CODE"
</item>

<text endstudy>
/ items = endstudy
/ fontstyle = ("Arial", 1.96%, false, false, false, false, 5, 0)
/ position = (50%, 25%)
/ size = (80%, 30%)
/ hjustify = left
</text>

<trial endstudy>
/ stimulusframes = [1=endstudy]
/ validresponse = (" ")
/ inputdevice = keyboard
/ showmousecursor = true
/ recorddata= false
</trial>

<block endstudy>
/ trials = [1=endstudy]
</block>

### Experiment component.
### You do not need to alter any of the coding below to adapt the JBT to your own use, though you may need to if you want to add in more questions, tasks, etc.

<expt>
/blocks = [1=pairings;2=welcome; 3=attention1;4=instructions;5=encoding; 6=testing;7=demographics; 8=endstudy]
</expt>

### Formatting the data columns

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency,stimulusnumber,stimulusitem, stimulusitem,stimulusitem,stimulusitem]
</data>








You'll need to be more specific.

> "What I now need to do is store one participant choice and then display it in a separate block"

How do you want to determine that one choice and what exactly is it you want to display?

Also, if you have code that requires external files to run, please always provide those files along with the code.

I'm sorry, I'm unable to upload any files because it tells me that I've exceeded the space available to upload files. However, you can find the zip file with all the stimuli in an earlier forum post of mine: https://forums.millisecond.com/Topic34870.aspx

More specifically, the first task is a selection task where a participant can 'Accept' or 'Reject' a number of profiles (Accept and Reject correspond to the levelabutton and levelbbutton in the script). The idea is that out of all the profiles that the participant selected (this could be several), one profile is randomly selected and displayed in a second block. Participants will be told that they will play a second game together with the person they chose in the first part. So the picture of one of the Accept profiles has to be displayed before the game begins.

I hope that makes it clear. I am happy to provide more information if needed.

sakm
sakm
Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)Associate Member (273 reputation)
Group: Forum Members
Posts: 20, Visits: 58
sakm - 4/6/2023
Dave - 4/6/2023
sakm - 4/6/2023
Hi, 
 
I have a selection task where participants "Accept" or "Reject" certain profiles (code below). What I now need to do is store one participant choice and then display it in a separate block. Can this be done with the following script? I would appreciate any help!

Thanks!



<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
/ inputdevice = keyboard
</defaults>

### Loading pictures into memory

<picture profiles>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg",
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
</picture>

<picture faces>
/ items = ("Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg",
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
</picture>



### Welcome screen. This is optional.

<item welcome>
/ 1 = "Welcome! Press the spacebar to continue."
</item>

<text welcome>
/ items = welcome
/ fontstyle = ("Arial", 4.59%, true, false, false, false, 5, 0)
/ numitems = 1
</text>

<trial welcome>
/ stimulusframes = [1=Welcome]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata = false
</trial>

<block welcome>
/ trials = [1 = welcome]
</block>

### Attention check 1

<dropdown att1>
/ caption="What is your favourite drink?"
/ options=("Wine", "Beer", "Vodka", "Whisky", "Carrot Juice", "Other")
/ required=true
</dropdown>

<surveypage att1>
/caption = "This is a simple question. When asked for your favourite drink, please pick 'Carrot Juice'. This is an attention check:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1= att1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block attention1>
/ trials = [1=att1]
</block>


### Instructions. These instructions are for an academic context and are the same as those used in Axt, Nguyen & Nosek (2016), but should be adapted to whatever version of the JBT you develop.

<item InstructionsPage1>
/1= "INSTRUCTIONS: Welcome to our virtual world. In this task, you will play the role of selection committee member for an academic honor society. You will see a variety of virtual avatars (as applicants) and their information, and it is up to you to decide who to accept into the honor society and who to reject. It is your job to try and select the most qualified candidates.

More specifically, each applicant will have four pieces of information that are available to you:

1) Science Grade: Average grade (out of 10.0) in science classes (biology, chemistry, etc.)
2) Humanities Grade: Average grade (out of 10.0) in humanities classes (English, foreign languages, etc.)
3) Letters of Recommendation: The overall quality (poor, fair, good or excellent) of the letters of recommendation that accompanied the application.
4) Interview Score: The interview score (out of 100) that the applicant received during the first round of the application process, which just ended.

PRESS THE SPACE BAR TO CONTINUE."

</item>

<text InstructionsPage1>
/ items = InstructionsPage1
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage1>
/ stimulusframes = [1=InstructionsPage1]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage2>
/1= "
Importantly, this academic honor society is looking for very well-rounded applicants, so it is crucial that you weigh and consider each of the four qualifications equally when you make your decision about who to accept and who to reject into the next round of the application process.

For this round of the application process, you need to reject around half of the applicants, so try to keep an estimate of what percentage of the applicants you have rejected as you complete the task.

PRESS THE SPACE BAR TO CONTINUE."
</item>

<text InstructionsPage2>
/ items = InstructionsPage2
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage2>
/ stimulusframes = [1=InstructionsPage2]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage3>
/1= "
On the next few screens, you will be shown each applicant and their credentials. This is just to get you familiar with the applicant pool. For this round, there are 40 total applicants.

After you see each applicant briefly, you will then be presented with applicants one at a time. There will be a button on the screen for 'Accept' and another for 'Reject'.

There are no right or wrong answers, but please try your best to select the most qualified applicants.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text InstructionsPage3>
/ items = InstructionsPage3
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage3>
/ stimulusframes = [1=InstructionsPage3]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<block instructions>
/ trials = [1=InstructionsPage1; 2=InstructionsPage2; 3 = InstructionsPage3]
</block>

### Test Instructions. These instructions are displayed after the encoding phase but before the testing phase.

<item TestInstructions>
/1= "
On the next screen, you will begin seeing each of the 40 applicants, one at a time. There will be one button for 'Accept' and another for 'Reject'.

Again, you should be accepting approximately half of the applicants to reach the next round.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text TestInstructions>
/ items = TestInstructions
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial TestInstructions>
/ stimulusframes = [1=TestInstructions]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

### Category Images
### There should be two pictures created for each LEVEL (should be accepted/should be rejected) and each CATEGORY (Dutch/Moroccan).
### For this coding, Level A means should be accepted, Level B means should be rejected, Category A means Dutch and Category B means Moroccan.
### There need to be two pictures made in order for the same combinations to be presented at both encoding and testing
### Notice that the second version of each picture has a 'select' option that refers to the first version
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<picture levela_categorya1>
/items = levela_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categorya2>
/items = levela_categorya2
/ select = current(levela_categorya1)
/position=(50%,34.2%)
</picture>

<picture levela_categoryb1>
/items = levela_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categoryb2>
/items = levela_categoryb2
/ select = current(levela_categoryb1)
/position=(50%,34.2%)
</picture>

<picture levelb_categorya1>
/items = levelb_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categorya2>
/items = levelb_categorya2
/ select = current(levelb_categorya1)
/position=(50%,34.2%)
</picture>

<picture levelb_categoryb1>
/items = levelb_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categoryb2>
/items = levelb_categoryb2
/ select = current(levelb_categoryb1)
/position=(50%,34.2%)
</picture>

### Making each picture set an item
### Each of the eight images made above will also need to be its own item
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<item levela_categorya1>
</item>

<item levela_categorya2>
</item>

<item levela_categoryb1>
</item>

<item levela_categoryb2>
</item>

<item levelb_categorya1>
</item>

<item levelb_categorya2>
</item>

<item levelb_categoryb1>
</item>

<item levelb_categoryb2>
</item>

### Response Option Images
### These are the two images you will use for your response options during the task. In this version, the response options are accept and reject.
### You can update these to whatever you think is appropriate for your task (e.g., approach/avoid, admit/deny, etc.).
### The response options should be made as separate image files.
### In this version, Level A means accept and Level B means reject.
### To adapt this coding for your own purposes, just make new response option buttons (if other than accept/reject) and change the 'items' lines in the two pictures below to whatever images you would like to use.

<picture levelabutton>
/items = ("Accept.jpg")
/ position = (85%,80%)
/size = (16%,16%)
</picture>

<picture levelbbutton>
/items = ("Reject.jpg")
/ position = (15%,80%)
/size = (16%,16%)
</picture>

### Creating counters for each level and for each category
### To adapt the JBT to your own needs, you'll need to replace the 'items' in each counter to refer to your own stimuli and decide beforehand what your levels and categories will be
### In this version, Leval A refers to those applicants that should be accepted, Level B to those applicants that should be rejected, Category A means Dutch and Category B means Moroccans

<counter setup_levela>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_levelb>
/ items = (
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categorya>
/ items = (
"Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categoryb>
/ items = (
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

### Pairing trials.
### These trials are the first thing run in the study but are not presented to the participant. They create the randomly selected pairs between the category images and the level profiles
### This ensures that each participant is getting randomly assigned pairings, such that half of the cat images are paired with 'reject' profiles, and half with 'accept' profiles. Same for the dog images.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial pair_levela_categorya>
/ ontrialbegin = [item.levela_categorya1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categorya>
/ ontrialbegin = [item.levelb_categorya1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levela_categoryb>
/ ontrialbegin = [item.levela_categoryb1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categoryb>
/ ontrialbegin = [item.levelb_categoryb1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

### Encoding trials.
### These trials are presented to the participant after the instructions. There is no response option and particpants passively view the profiles
### These trials are necessary for participants to get an exposure to the range of profiles before they begin accepting and rejecting them.
### Make a trial to present the each application/image combination during the encoding phase
### For this version, each image is presented for one second, with a 200 millisecond pause between profiles. You can alter these values by changing the 'timeout' and 'posttrialpause' lines
### You do not need to alter any of the coding below to adapt the JBT to your own use other than to play with the timing of how long each profile is presented for.

<trial encode_levela_categorya>
/stimulusframes = [1=levela_categorya1,levela_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelb_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levela_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelb_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>


##################
### Testing trials.
### These are the only trials set up to record data. The program automatically records whether participants are making a correct or incorrect decision.
### Make one trial for each application/image combination for the test phase.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial test_levela_categorya>
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

### Creating the blocks for pairings, encoding, and testing.
### Note that the first trial in the testing block is the 'TestInstructions' page made previously.
### To adapt the JBT to your own needs, the only thing you'll need to change is /trials line in the block component below. It is set up for 64 trials (there are 64 total profiles and 64 total category images).
### You will need to change the block component to have however many trials are necessary for your version of the JBT.

<block pairings>
/ trials = [1-40=noreplace(pair_levela_categorya, pair_levelb_categorya, pair_levela_categoryb, pair_levelb_categoryb)]
</block>

<block encoding>
/ trials = [1-40=noreplace(encode_levela_categorya, encode_levelb_categorya, encode_levela_categoryb, encode_levelb_categoryb)]
</block>

<block testing>
/ trials = [1=TestInstructions; 2-41=noreplace(test_levela_categorya, test_levelb_categorya, test_levela_categoryb, test_levelb_categoryb)]
</block>

### Demographics


<dropdown q1>
/ caption="Please state what gender you identify with:"
/ options=("Female", "Male", "Non-binary", "Other", "Prefer not to say")
/ required=true
</dropdown>

<textbox q2>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (12, 120)
</textbox>


<dropdown att2>
/ caption="This colour test is very simple. When asked for your favourite color, please pick 'Green'. This is an attention check.
What is your favourite colour?"
/ options=("Red", "Blue", "Green", "Orange", "Brown")
/ required=true
</dropdown>


<surveypage s2>
/caption = "Thanks for completing the task. To complete the study, please answer the questions below:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1=q1; 2 = q2; 3 = att2]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block demographics>
/ trials = [1=s2]
</block>

### End study screen. This is the last page that participants will see.

<item endstudy>
/1= "Thank you for participating in this study! The main goal of this research is to investigate the extent to which people favour White-Dutch applicants compared to Moroccan-Dutch appearing applicants. In this study, you completed a task that measures social biases in individuals.

The task required you to accept or reject a number of applicants applying for an academic honour society. Within the pool of applicants, we varied the qualifications of the applicants to create two groups. There was one set of applicants that was more qualified (that should have been accepted) and another set that was less qualified (that should have been rejected). Furthermore, within each set of applicants that should have been accepted or rejected, we used avatars created from either Moroccan-Dutch or White-Dutch faces.

If you have further questions about the study please contact the investigator, Afreen Khalid (afreen.khalid@ru.nl).

PRESS SPACEBAR TO EXIT AND RECEIVE YOUR COMPLETION CODE"
</item>

<text endstudy>
/ items = endstudy
/ fontstyle = ("Arial", 1.96%, false, false, false, false, 5, 0)
/ position = (50%, 25%)
/ size = (80%, 30%)
/ hjustify = left
</text>

<trial endstudy>
/ stimulusframes = [1=endstudy]
/ validresponse = (" ")
/ inputdevice = keyboard
/ showmousecursor = true
/ recorddata= false
</trial>

<block endstudy>
/ trials = [1=endstudy]
</block>

### Experiment component.
### You do not need to alter any of the coding below to adapt the JBT to your own use, though you may need to if you want to add in more questions, tasks, etc.

<expt>
/blocks = [1=pairings;2=welcome; 3=attention1;4=instructions;5=encoding; 6=testing;7=demographics; 8=endstudy]
</expt>

### Formatting the data columns

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency,stimulusnumber,stimulusitem, stimulusitem,stimulusitem,stimulusitem]
</data>








You'll need to be more specific.

> "What I now need to do is store one participant choice and then display it in a separate block"

How do you want to determine that one choice and what exactly is it you want to display?

Also, if you have code that requires external files to run, please always provide those files along with the code.

I'm sorry, I'm unable to upload any files because it tells me that I've exceeded the space available to upload files. However, you can find the zip file with all the stimuli in an earlier forum post of mine: https://forums.millisecond.com/Topic34870.aspx

More specifically, the first task is a selection task where a participant can 'Accept' or 'Reject' a number of profiles (Accept and Reject correspond to the levelabutton and levelbbutton in the script). The idea is that out of all the profiles that the participant selected (this could be several), one profile is randomly selected and displayed in a second block. Participants will be told that they will play a second game together with the person they chose in the first part. So the picture of one of the Accept profiles has to be displayed before the game begins.

I hope that makes it clear. I am happy to provide more information if needed.

Also, just to be clearer, the second game/task has not been programmed yet. I am only looking for a way I can get all participants' Accept responses and then pick one randomly and display that stimulus on the screen once the task is over with a message like "You selected the following application. On the next page, you will play a game together"


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 97K
sakm - 4/6/2023
Dave - 4/6/2023
sakm - 4/6/2023
Hi, 
 
I have a selection task where participants "Accept" or "Reject" certain profiles (code below). What I now need to do is store one participant choice and then display it in a separate block. Can this be done with the following script? I would appreciate any help!

Thanks!



<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
/ inputdevice = keyboard
</defaults>

### Loading pictures into memory

<picture profiles>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg",
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
</picture>

<picture faces>
/ items = ("Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg",
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
</picture>



### Welcome screen. This is optional.

<item welcome>
/ 1 = "Welcome! Press the spacebar to continue."
</item>

<text welcome>
/ items = welcome
/ fontstyle = ("Arial", 4.59%, true, false, false, false, 5, 0)
/ numitems = 1
</text>

<trial welcome>
/ stimulusframes = [1=Welcome]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata = false
</trial>

<block welcome>
/ trials = [1 = welcome]
</block>

### Attention check 1

<dropdown att1>
/ caption="What is your favourite drink?"
/ options=("Wine", "Beer", "Vodka", "Whisky", "Carrot Juice", "Other")
/ required=true
</dropdown>

<surveypage att1>
/caption = "This is a simple question. When asked for your favourite drink, please pick 'Carrot Juice'. This is an attention check:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1= att1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block attention1>
/ trials = [1=att1]
</block>


### Instructions. These instructions are for an academic context and are the same as those used in Axt, Nguyen & Nosek (2016), but should be adapted to whatever version of the JBT you develop.

<item InstructionsPage1>
/1= "INSTRUCTIONS: Welcome to our virtual world. In this task, you will play the role of selection committee member for an academic honor society. You will see a variety of virtual avatars (as applicants) and their information, and it is up to you to decide who to accept into the honor society and who to reject. It is your job to try and select the most qualified candidates.

More specifically, each applicant will have four pieces of information that are available to you:

1) Science Grade: Average grade (out of 10.0) in science classes (biology, chemistry, etc.)
2) Humanities Grade: Average grade (out of 10.0) in humanities classes (English, foreign languages, etc.)
3) Letters of Recommendation: The overall quality (poor, fair, good or excellent) of the letters of recommendation that accompanied the application.
4) Interview Score: The interview score (out of 100) that the applicant received during the first round of the application process, which just ended.

PRESS THE SPACE BAR TO CONTINUE."

</item>

<text InstructionsPage1>
/ items = InstructionsPage1
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage1>
/ stimulusframes = [1=InstructionsPage1]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage2>
/1= "
Importantly, this academic honor society is looking for very well-rounded applicants, so it is crucial that you weigh and consider each of the four qualifications equally when you make your decision about who to accept and who to reject into the next round of the application process.

For this round of the application process, you need to reject around half of the applicants, so try to keep an estimate of what percentage of the applicants you have rejected as you complete the task.

PRESS THE SPACE BAR TO CONTINUE."
</item>

<text InstructionsPage2>
/ items = InstructionsPage2
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage2>
/ stimulusframes = [1=InstructionsPage2]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<item InstructionsPage3>
/1= "
On the next few screens, you will be shown each applicant and their credentials. This is just to get you familiar with the applicant pool. For this round, there are 40 total applicants.

After you see each applicant briefly, you will then be presented with applicants one at a time. There will be a button on the screen for 'Accept' and another for 'Reject'.

There are no right or wrong answers, but please try your best to select the most qualified applicants.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text InstructionsPage3>
/ items = InstructionsPage3
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial InstructionsPage3>
/ stimulusframes = [1=InstructionsPage3]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

<block instructions>
/ trials = [1=InstructionsPage1; 2=InstructionsPage2; 3 = InstructionsPage3]
</block>

### Test Instructions. These instructions are displayed after the encoding phase but before the testing phase.

<item TestInstructions>
/1= "
On the next screen, you will begin seeing each of the 40 applicants, one at a time. There will be one button for 'Accept' and another for 'Reject'.

Again, you should be accepting approximately half of the applicants to reach the next round.

PRESS THE SPACE BAR TO BEGIN SEEING THE APPLICANTS. "
</item>

<text TestInstructions>
/ items = TestInstructions
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ position = (50%, 50%)
/ size = (80%, 70%)
/ hjustify = left
</text>

<trial TestInstructions>
/ stimulusframes = [1=TestInstructions]
/ validresponse = (" ")
/ inputdevice = keyboard
/ recorddata= false
</trial>

### Category Images
### There should be two pictures created for each LEVEL (should be accepted/should be rejected) and each CATEGORY (Dutch/Moroccan).
### For this coding, Level A means should be accepted, Level B means should be rejected, Category A means Dutch and Category B means Moroccan.
### There need to be two pictures made in order for the same combinations to be presented at both encoding and testing
### Notice that the second version of each picture has a 'select' option that refers to the first version
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<picture levela_categorya1>
/items = levela_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categorya2>
/items = levela_categorya2
/ select = current(levela_categorya1)
/position=(50%,34.2%)
</picture>

<picture levela_categoryb1>
/items = levela_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levela_categoryb2>
/items = levela_categoryb2
/ select = current(levela_categoryb1)
/position=(50%,34.2%)
</picture>

<picture levelb_categorya1>
/items = levelb_categorya1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categorya2>
/items = levelb_categorya2
/ select = current(levelb_categorya1)
/position=(50%,34.2%)
</picture>

<picture levelb_categoryb1>
/items = levelb_categoryb1
/select=noreplace
/size=(75%,75%)
</picture>

<picture levelb_categoryb2>
/items = levelb_categoryb2
/ select = current(levelb_categoryb1)
/position=(50%,34.2%)
</picture>

### Making each picture set an item
### Each of the eight images made above will also need to be its own item
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<item levela_categorya1>
</item>

<item levela_categorya2>
</item>

<item levela_categoryb1>
</item>

<item levela_categoryb2>
</item>

<item levelb_categorya1>
</item>

<item levelb_categorya2>
</item>

<item levelb_categoryb1>
</item>

<item levelb_categoryb2>
</item>

### Response Option Images
### These are the two images you will use for your response options during the task. In this version, the response options are accept and reject.
### You can update these to whatever you think is appropriate for your task (e.g., approach/avoid, admit/deny, etc.).
### The response options should be made as separate image files.
### In this version, Level A means accept and Level B means reject.
### To adapt this coding for your own purposes, just make new response option buttons (if other than accept/reject) and change the 'items' lines in the two pictures below to whatever images you would like to use.

<picture levelabutton>
/items = ("Accept.jpg")
/ position = (85%,80%)
/size = (16%,16%)
</picture>

<picture levelbbutton>
/items = ("Reject.jpg")
/ position = (15%,80%)
/size = (16%,16%)
</picture>

### Creating counters for each level and for each category
### To adapt the JBT to your own needs, you'll need to replace the 'items' in each counter to refer to your own stimuli and decide beforehand what your levels and categories will be
### In this version, Leval A refers to those applicants that should be accepted, Level B to those applicants that should be rejected, Category A means Dutch and Category B means Moroccans

<counter setup_levela>
/ items = (
"Profile_Accept1.jpg",
"Profile_Accept2.jpg",
"Profile_Accept3.jpg",
"Profile_Accept4.jpg",
"Profile_Accept5.jpg",
"Profile_Accept6.jpg",
"Profile_Accept7.jpg",
"Profile_Accept8.jpg",
"Profile_Accept9.jpg",
"Profile_Accept10.jpg",
"Profile_Accept11.jpg",
"Profile_Accept12.jpg",
"Profile_Accept13.jpg",
"Profile_Accept14.jpg",
"Profile_Accept15.jpg",
"Profile_Accept16.jpg",
"Profile_Accept17.jpg",
"Profile_Accept18.jpg",
"Profile_Accept19.jpg",
"Profile_Accept20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_levelb>
/ items = (
"Profile_Reject1.jpg",
"Profile_Reject2.jpg",
"Profile_Reject3.jpg",
"Profile_Reject4.jpg",
"Profile_Reject5.jpg",
"Profile_Reject6.jpg",
"Profile_Reject7.jpg",
"Profile_Reject8.jpg",
"Profile_Reject9.jpg",
"Profile_Reject10.jpg",
"Profile_Reject11.jpg",
"Profile_Reject12.jpg",
"Profile_Reject13.jpg",
"Profile_Reject14.jpg",
"Profile_Reject15.jpg",
"Profile_Reject16.jpg",
"Profile_Reject17.jpg",
"Profile_Reject18.jpg",
"Profile_Reject19.jpg",
"Profile_Reject20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categorya>
/ items = (
"Stim1.jpg",
"Stim2.jpg",
"Stim3.jpg",
"Stim4.jpg",
"Stim5.jpg",
"Stim6.jpg",
"Stim7.jpg",
"Stim8.jpg",
"Stim9.jpg",
"Stim10.jpg",
"Stim11.jpg",
"Stim12.jpg",
"Stim13.jpg",
"Stim14.jpg",
"Stim15.jpg",
"Stim16.jpg",
"Stim17.jpg",
"Stim18.jpg",
"Stim19.jpg",
"Stim20.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

<counter setup_categoryb>
/ items = (
"Stim1W.jpg",
"Stim2W.jpg",
"Stim3W.jpg",
"Stim4W.jpg",
"Stim5W.jpg",
"Stim6W.jpg",
"Stim7W.jpg",
"Stim8W.jpg",
"Stim9W.jpg",
"Stim10W.jpg",
"Stim11W.jpg",
"Stim12W.jpg",
"Stim13W.jpg",
"Stim14W.jpg",
"Stim15W.jpg",
"Stim16W.jpg",
"Stim17W.jpg",
"Stim18W.jpg",
"Stim19W.jpg",
"Stim20W.jpg")
/ select = noreplace
/ selectionrate = trial
</counter>

### Pairing trials.
### These trials are the first thing run in the study but are not presented to the participant. They create the randomly selected pairs between the category images and the level profiles
### This ensures that each participant is getting randomly assigned pairings, such that half of the cat images are paired with 'reject' profiles, and half with 'accept' profiles. Same for the dog images.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial pair_levela_categorya>
/ ontrialbegin = [item.levela_categorya1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categorya>
/ ontrialbegin = [item.levelb_categorya1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categorya2.item=counter.setup_categorya.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levela_categoryb>
/ ontrialbegin = [item.levela_categoryb1.item=counter.setup_levela.selectedvalue]
/ ontrialbegin = [item.levela_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

<trial pair_levelb_categoryb>
/ ontrialbegin = [item.levelb_categoryb1.item=counter.setup_levelb.selectedvalue]
/ ontrialbegin = [item.levelb_categoryb2.item=counter.setup_categoryb.selectedvalue]
/ trialduration = 0
/ recorddata = false
</trial>

### Encoding trials.
### These trials are presented to the participant after the instructions. There is no response option and particpants passively view the profiles
### These trials are necessary for participants to get an exposure to the range of profiles before they begin accepting and rejecting them.
### Make a trial to present the each application/image combination during the encoding phase
### For this version, each image is presented for one second, with a 200 millisecond pause between profiles. You can alter these values by changing the 'timeout' and 'posttrialpause' lines
### You do not need to alter any of the coding below to adapt the JBT to your own use other than to play with the timing of how long each profile is presented for.

<trial encode_levela_categorya>
/stimulusframes = [1=levela_categorya1,levela_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelb_categorya2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levela_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>

<trial encode_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelb_categoryb2]
/timeout=1000
/posttrialpause=200
/recorddata = false
</trial>


##################
### Testing trials.
### These are the only trials set up to record data. The program automatically records whether participants are making a correct or incorrect decision.
### Make one trial for each application/image combination for the test phase.
### You do not need to alter any of the coding below to adapt the JBT to your own use.

<trial test_levela_categorya>
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

### Creating the blocks for pairings, encoding, and testing.
### Note that the first trial in the testing block is the 'TestInstructions' page made previously.
### To adapt the JBT to your own needs, the only thing you'll need to change is /trials line in the block component below. It is set up for 64 trials (there are 64 total profiles and 64 total category images).
### You will need to change the block component to have however many trials are necessary for your version of the JBT.

<block pairings>
/ trials = [1-40=noreplace(pair_levela_categorya, pair_levelb_categorya, pair_levela_categoryb, pair_levelb_categoryb)]
</block>

<block encoding>
/ trials = [1-40=noreplace(encode_levela_categorya, encode_levelb_categorya, encode_levela_categoryb, encode_levelb_categoryb)]
</block>

<block testing>
/ trials = [1=TestInstructions; 2-41=noreplace(test_levela_categorya, test_levelb_categorya, test_levela_categoryb, test_levelb_categoryb)]
</block>

### Demographics


<dropdown q1>
/ caption="Please state what gender you identify with:"
/ options=("Female", "Male", "Non-binary", "Other", "Prefer not to say")
/ required=true
</dropdown>

<textbox q2>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (12, 120)
</textbox>


<dropdown att2>
/ caption="This colour test is very simple. When asked for your favourite color, please pick 'Green'. This is an attention check.
What is your favourite colour?"
/ options=("Red", "Blue", "Green", "Orange", "Brown")
/ required=true
</dropdown>


<surveypage s2>
/caption = "Thanks for completing the task. To complete the study, please answer the questions below:"
/ fontstyle = ("Arial", 2.73%, false, false, false, false, 5, 0)
/ questions = [1=q1; 2 = q2; 3 = att2]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Next"
</surveypage>

<block demographics>
/ trials = [1=s2]
</block>

### End study screen. This is the last page that participants will see.

<item endstudy>
/1= "Thank you for participating in this study! The main goal of this research is to investigate the extent to which people favour White-Dutch applicants compared to Moroccan-Dutch appearing applicants. In this study, you completed a task that measures social biases in individuals.

The task required you to accept or reject a number of applicants applying for an academic honour society. Within the pool of applicants, we varied the qualifications of the applicants to create two groups. There was one set of applicants that was more qualified (that should have been accepted) and another set that was less qualified (that should have been rejected). Furthermore, within each set of applicants that should have been accepted or rejected, we used avatars created from either Moroccan-Dutch or White-Dutch faces.

If you have further questions about the study please contact the investigator, Afreen Khalid (afreen.khalid@ru.nl).

PRESS SPACEBAR TO EXIT AND RECEIVE YOUR COMPLETION CODE"
</item>

<text endstudy>
/ items = endstudy
/ fontstyle = ("Arial", 1.96%, false, false, false, false, 5, 0)
/ position = (50%, 25%)
/ size = (80%, 30%)
/ hjustify = left
</text>

<trial endstudy>
/ stimulusframes = [1=endstudy]
/ validresponse = (" ")
/ inputdevice = keyboard
/ showmousecursor = true
/ recorddata= false
</trial>

<block endstudy>
/ trials = [1=endstudy]
</block>

### Experiment component.
### You do not need to alter any of the coding below to adapt the JBT to your own use, though you may need to if you want to add in more questions, tasks, etc.

<expt>
/blocks = [1=pairings;2=welcome; 3=attention1;4=instructions;5=encoding; 6=testing;7=demographics; 8=endstudy]
</expt>

### Formatting the data columns

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency,stimulusnumber,stimulusitem, stimulusitem,stimulusitem,stimulusitem]
</data>








You'll need to be more specific.

> "What I now need to do is store one participant choice and then display it in a separate block"

How do you want to determine that one choice and what exactly is it you want to display?

Also, if you have code that requires external files to run, please always provide those files along with the code.

I'm sorry, I'm unable to upload any files because it tells me that I've exceeded the space available to upload files. However, you can find the zip file with all the stimuli in an earlier forum post of mine: https://forums.millisecond.com/Topic34870.aspx

More specifically, the first task is a selection task where a participant can 'Accept' or 'Reject' a number of profiles (Accept and Reject correspond to the levelabutton and levelbbutton in the script). The idea is that out of all the profiles that the participant selected (this could be several), one profile is randomly selected and displayed in a second block. Participants will be told that they will play a second game together with the person they chose in the first part. So the picture of one of the Accept profiles has to be displayed before the game begins.

I hope that makes it clear. I am happy to provide more information if needed.

Okay, so store all accepted profiles (actually a profle & stimulus image pair) in empty item elements and then select one at random out of those in the later block.

<picture accepted_profile>
/ items = item.accepted_profiles
/ select = noreplace
/ selectionrate = block
</picture>

<picture accepted_stim>
/ items = item.accepted_stims
/ select = picture.accepted_profile.currentindex
</picture>

<item accepted_profiles>
</item>

<item accepted_stims>
</item>


with

<trial test_levela_categorya>
/ ontrialend = [
    // if response is accept, add profile & associated face image to item elements
    if (trial.test_levela_categorya.response == "levelabutton") {
        item.accepted_profiles.appenditem(picture.levela_categorya1.currentitem);
        item.accepted_stims.appenditem(picture.levela_categorya2);
    }
]
/stimulusframes = [1=levela_categorya1,levelabutton,levelbbutton,levela_categorya2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categorya>
/ ontrialend = [
    if (trial.test_levelb_categorya.response == "levelabutton") {
        item.accepted_profiles.appenditem(picture.levelb_categorya1.currentitem);
        item.accepted_stims.appenditem(picture.levelb_categorya2);
    }
]
/stimulusframes = [1=levelb_categorya1,levelabutton,levelbbutton,levelb_categorya2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levela_categoryb>
/ ontrialend = [
    if (trial.test_levela_categoryb.response == "levelabutton") {
        item.accepted_profiles.appenditem(picture.levela_categoryb1.currentitem);
        item.accepted_stims.appenditem(picture.levela_categoryb2);
    }
]
/stimulusframes = [1=levela_categoryb1,levelabutton,levelbbutton,levela_categoryb2]
/correctresponse = (levelabutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>

<trial test_levelb_categoryb>
/ ontrialend = [
    if (trial.test_levelb_categoryb.response == "levelabutton") {
        item.accepted_profiles.appenditem(picture.levelb_categoryb1.currentitem);
        item.accepted_stims.appenditem(picture.levelb_categoryb2);
    }
]
/stimulusframes = [1=levelb_categoryb1,levelabutton,levelbbutton,levelb_categoryb2]
/correctresponse = (levelbbutton)
/validresponse = (levelabutton,levelbbutton)
/inputdevice = mouse
/timeout = 1800
/posttrialpause=300
</trial>


In the later block, then, simply have a trial display <picture accepted_profile> and <picture accepted_stim>.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search