Help with a script


Author
Message
Jakala
Jakala
New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)
Group: Forum Members
Posts: 2, Visits: 8
Hi all,

We need your support in writing a script that is useful for our research goal.

We would like to create a script for a test in which the word to associate is placed at the center and 2 images are placed to the right and to the left of the screen. The task consists of clicking on a specific keyboard button (e.g., “E” for left and “I” for right). 

Specifically, what we would like to achieve is:
-    a word appears in the center of the screen (e.g., “Plastic”)
-    after 1 second, two images ( e.g., Recycle bins) appear, one to the right and one to the left
-    all 3 stimuli remain in their position until the participant responds by pressing the letter "E" (left image) or "I" (right image). There will be no time limit.

The stimuli are:

Stimulus at the center of the screen (words)
- Plastic
- Paper
- Glass
- Cans
- Cardboard

Stimuli on the right and left (images):
- blue bin
- yellow bin
- green bin

Metrics:
- frequency of choices (participants see plastic and click on the blu bin)
- Reaction times related to the associations they made

All distinct word items (e.g., plastic, glass, cans etc.) must be paired with all possible combinations of images (i.e., green/blue, yellow/green and yellow/green.). Both words and images should be counterbalanced.

Attached is an example of the experimental screen we want to submit to our participant for the item "PLASTIC".

Can you please help us? We've tried to modify two different typologies of script (i.e., BARTT and SC IAT) but we have not found a way to overcome the problem...

Thank you a lot. Best,
Jakala Team



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: 98K
Jakala - 10/6/2023
Hi all,

We need your support in writing a script that is useful for our research goal.

We would like to create a script for a test in which the word to associate is placed at the center and 2 images are placed to the right and to the left of the screen. The task consists of clicking on a specific keyboard button (e.g., “E” for left and “I” for right). 

Specifically, what we would like to achieve is:
-    a word appears in the center of the screen (e.g., “Plastic”)
-    after 1 second, two images ( e.g., Recycle bins) appear, one to the right and one to the left
-    all 3 stimuli remain in their position until the participant responds by pressing the letter "E" (left image) or "I" (right image). There will be no time limit.

The stimuli are:

Stimulus at the center of the screen (words)
- Plastic
- Paper
- Glass
- Cans
- Cardboard

Stimuli on the right and left (images):
- blue bin
- yellow bin
- green bin

Metrics:
- frequency of choices (participants see plastic and click on the blu bin)
- Reaction times related to the associations they made

All distinct word items (e.g., plastic, glass, cans etc.) must be paired with all possible combinations of images (i.e., green/blue, yellow/green and yellow/green.). Both words and images should be counterbalanced.

Attached is an example of the experimental screen we want to submit to our participant for the item "PLASTIC".

Can you please help us? We've tried to modify two different typologies of script (i.e., BARTT and SC IAT) but we have not found a way to overcome the problem...

Thank you a lot. Best,
Jakala Team



So what are your specific questions you need help with?

Jakala
Jakala
New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)New Member (25 reputation)
Group: Forum Members
Posts: 2, Visits: 8
We would need a basic, already functioning script for the experiment we want to create. Unfortunately, we couldn't find a script in the library that could serve as a foundation for our test.

Thank you
Jakala team
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: 98K
Jakala - 10/6/2023
We would need a basic, already functioning script for the experiment we want to create. Unfortunately, we couldn't find a script in the library that could serve as a foundation for our test.

Thank you
Jakala team

You won't find anything in the library that exactly matches and taking some existing script that does some of what you want, lots of other things you don't want, and doesn't do various things you want will not make sense. You'll need to build this from scratch, and in order to do this you need to learn the basics of Inquisit syntax first by working through the programmer's manual and some tutorials. WIthout that grounding nothing I tell you will get you anywhere, so please do that first.

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: 98K
Dave - 10/6/2023
Jakala - 10/6/2023
We would need a basic, already functioning script for the experiment we want to create. Unfortunately, we couldn't find a script in the library that could serve as a foundation for our test.

Thank you
Jakala team

You won't find anything in the library that exactly matches and taking some existing script that does some of what you want, lots of other things you don't want, and doesn't do various things you want will not make sense. You'll need to build this from scratch, and in order to do this you need to learn the basics of Inquisit syntax first by working through the programmer's manual and some tutorials. WIthout that grounding nothing I tell you will get you anywhere, so please do that first.

Once you're done with the manual and tutorials, work through the below untl you fully understand what it does and how it works. If you don't understand some specific part, look up the relevant sections of the manual and if you still can't make sense of it, ask about the specific part here. Then extend the example to cover the remaining three words (GLASS, CANS & CARDBOARD).

<block example>
/ trials = [1-12 = noreplace(
    plastic_blue_green, plastic_blue_yellow, plastic_green_blue, plastic_green_yellow, plastic_yellow_blue, plastic_yellow_green,
    paper_blue_green, paper_blue_yellow, paper_green_blue, paper_green_yellow, paper_yellow_blue, paper_yellow_green
    )
]
</block>

<parameters>
/ leftkey = "E" // left response key
/ rightkey = "I" // right response key
/ leftbinx = 25% // x position of the left bin
/ rightbinx = 75% // x position of the right bin
/ iti = 500 // inter-trial interval
</parameters>

<values>
/ worditem = 1

/ bluekey = " "
/ greenkey = " "
/ yellowkey = " "
/ bluex = 0%
/ greenx = 0%
/ yellowx = 0%

// choice counts for PLASTIC
/ plastic_blue_count = 0
/ plastic_green_count = 0
/ plastic_yellow_count = 0

// choice counts for PAPER
/ paper_blue_count = 0
/ paper_green_count = 0
/ paper_yellow_count = 0
</values>

<expressions>
// mean RTs for PLASTIC choices
/ plastic_blue_meanRT = list.plastic_blue_RT.mean
/ plastic_green_meanRT = list.plastic_green_RT.mean
/ plastic_yellow_meanRT = list.plastic_yellow_RT.mean

// mean RTs for PAPER choices
/ paper_blue_meanRT = list.paper_blue_RT.mean
/ paper_green_meanRT = list.paper_green_RT.mean
/ paper_yellow_meanRT = list.paper_yellow_RT.mean
</expressions>

// lists to collect RTs for PLASTIC
<list plastic_blue_RT>
</list>
<list plastic_green_RT>
</list>
<list plastic_yellow_RT>
</list>

// lists to collect RTs for PAPER
<list paper_blue_RT>
</list>
<list paper_green_RT>
</list>
<list paper_yellow_RT>
</list>

// PLASTIC trials
<trial plastic_blue_green>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 1; // item number 1 is PLASTIC
    values.bluekey = parameters.leftkey; // left indicates blue
    values.greenkey = parameters.rightkey; // right indicates green
    values.bluex = parameters.leftbinx; // set blue bin to left position
    values.greenx = parameters.rightbinx; // set green bin to right position
]
/ ontrialend = [
    if (trial.plastic_blue_green.responsetext == values.bluekey) { // if blue was indicated
        values.plastic_blue_count += 1; // increase plastic & blue choice count by one
        list.plastic_blue_RT.appenditem(trial.plastic_blue_green.latency); // add RT to the plastic & blue list
    } else { // otherwise
        values.plastic_green_count += 1; // increase plastic & green choice count by one
        list.plastic_green_RT.appenditem(trial.plastic_blue_green.latency); // add RT to the plastic & green list
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, green_bin] // clear screen & display word; 1 second later, display bins
/ validresponse = (values.bluekey, values.greenkey) // response options are blue and green in this trial
</trial>

<trial plastic_green_blue>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 1;
    values.bluekey = parameters.rightkey;
    values.greenkey = parameters.leftkey;
    values.bluex = parameters.rightbinx;
    values.greenx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.plastic_green_blue.responsetext == values.bluekey) {
        values.plastic_blue_count += 1;
        list.plastic_blue_RT.appenditem(trial.plastic_green_blue.latency);
    } else {
        values.plastic_green_count += 1;
        list.plastic_green_RT.appenditem(trial.plastic_green_blue.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, green_bin]
/ validresponse = (values.bluekey, values.greenkey)
</trial>

<trial plastic_blue_yellow>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 1;
    values.bluekey = parameters.leftkey;
    values.yellowkey = parameters.rightkey;
    values.bluex = parameters.leftbinx;
    values.yellowx = parameters.rightbinx;
]
/ ontrialend = [
    if (trial.plastic_blue_yellow.responsetext == values.bluekey) {
        values.plastic_blue_count += 1;
        list.plastic_blue_RT.appenditem(trial.plastic_blue_yellow.latency);
    } else {
        values.plastic_yellow_count += 1;
        list.plastic_yellow_RT.appenditem(trial.plastic_blue_yellow.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, yellow_bin]
/ validresponse = (values.bluekey, values.yellowkey)
</trial>

<trial plastic_yellow_blue>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 1;
    values.bluekey = parameters.rightkey;
    values.yellowkey = parameters.leftkey;
    values.bluex = parameters.rightbinx;
    values.yellowx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.plastic_yellow_blue.responsetext == values.bluekey) {
        values.plastic_blue_count += 1;
        list.plastic_blue_RT.appenditem(trial.plastic_yellow_blue.latency);
    } else {
        values.plastic_yellow_count += 1;
        list.plastic_yellow_RT.appenditem(trial.plastic_yellow_blue.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, yellow_bin]
/ validresponse = (values.bluekey, values.yellowkey)
</trial>

<trial plastic_green_yellow>
/ ontrialbegin = [
    values.worditem = 1;
    values.greenkey = parameters.leftkey;
    values.yellowkey = parameters.rightkey;
    values.greenx = parameters.leftbinx;
    values.yellowx = parameters.rightbinx;
]
/ ontrialend = [
    if (trial.plastic_green_yellow.responsetext == values.greenkey) {
        values.plastic_green_count += 1;
        list.plastic_green_RT.appenditem(trial.plastic_green_yellow.latency);
    } else {
        values.plastic_yellow_count += 1;
        list.plastic_yellow_RT.appenditem(trial.plastic_green_yellow.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=green_bin, yellow_bin]
/ validresponse = (values.greenkey, values.yellowkey)
</trial>

<trial plastic_yellow_green>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 1;
    values.greenkey = parameters.rightkey;
    values.yellowkey = parameters.leftkey;
    values.greenx = parameters.rightbinx;
    values.yellowx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.plastic_yellow_green.responsetext == values.greenkey) {
        values.plastic_green_count += 1;
        list.plastic_green_RT.appenditem(trial.plastic_yellow_green.latency);
    } else {
        values.plastic_yellow_count += 1;
        list.plastic_yellow_RT.appenditem(trial.plastic_yellow_green.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=green_bin, yellow_bin]
/ validresponse = (values.greenkey, values.yellowkey)
</trial>

// PAPER trials
<trial paper_blue_green>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 2;
    values.bluekey = parameters.leftkey;
    values.greenkey = parameters.rightkey;
    values.bluex = parameters.leftbinx;
    values.greenx = parameters.rightbinx;
]
/ ontrialend = [
    if (trial.paper_blue_green.responsetext == values.bluekey) {
        values.paper_blue_count += 1;
        list.paper_blue_RT.appenditem(trial.paper_blue_green.latency);
    } else {
        values.paper_green_count += 1;
        list.paper_green_RT.appenditem(trial.paper_blue_green.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, green_bin]
/ validresponse = (values.bluekey, values.greenkey)
</trial>

<trial paper_green_blue>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 2;
    values.bluekey = parameters.rightkey;
    values.greenkey = parameters.leftkey;
    values.bluex = parameters.rightbinx;
    values.greenx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.paper_green_blue.responsetext == values.bluekey) {
        values.paper_blue_count += 1;
        list.paper_blue_RT.appenditem(trial.paper_green_blue.latency);
    } else {
        values.paper_green_count += 1;
        list.paper_green_RT.appenditem(trial.paper_green_blue.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, green_bin]
/ validresponse = (values.bluekey, values.greenkey)
</trial>

<trial paper_blue_yellow>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 2;
    values.bluekey = parameters.leftkey;
    values.yellowkey = parameters.rightkey;
    values.bluex = parameters.leftbinx;
    values.yellowx = parameters.rightbinx;
]
/ ontrialend = [
    if (trial.paper_blue_yellow.responsetext == values.bluekey) {
        values.paper_blue_count += 1;
        list.paper_blue_RT.appenditem(trial.paper_blue_yellow.latency);
    } else {
        values.paper_yellow_count += 1;
        list.paper_yellow_RT.appenditem(trial.paper_blue_yellow.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, yellow_bin]
/ validresponse = (values.bluekey, values.yellowkey)
</trial>

<trial paper_yellow_blue>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 2;
    values.bluekey = parameters.rightkey;
    values.yellowkey = parameters.leftkey;
    values.bluex = parameters.rightbinx;
    values.yellowx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.paper_yellow_blue.responsetext == values.bluekey) {
        values.paper_blue_count += 1;
        list.paper_blue_RT.appenditem(trial.paper_yellow_blue.latency);
    } else {
        values.paper_yellow_count += 1;
        list.paper_yellow_RT.appenditem(trial.paper_yellow_blue.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=blue_bin, yellow_bin]
/ validresponse = (values.bluekey, values.yellowkey)
</trial>

<trial paper_green_yellow>
/ ontrialbegin = [
    values.worditem = 2;
    values.greenkey = parameters.leftkey;
    values.yellowkey = parameters.rightkey;
    values.greenx = parameters.leftbinx;
    values.yellowx = parameters.rightbinx;
]
/ ontrialend = [
    if (trial.paper_green_yellow.responsetext == values.greenkey) {
        values.paper_green_count += 1;
        list.paper_green_RT.appenditem(trial.paper_green_yellow.latency);
    } else {
        values.paper_yellow_count += 1;
        list.paper_yellow_RT.appenditem(trial.paper_green_yellow.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=green_bin, yellow_bin]
/ validresponse = (values.greenkey, values.yellowkey)
</trial>

<trial paper_yellow_green>
/ posttrialpause = parameters.iti
/ ontrialbegin = [
    values.worditem = 2;
    values.greenkey = parameters.rightkey;
    values.yellowkey = parameters.leftkey;
    values.greenx = parameters.rightbinx;
    values.yellowx = parameters.leftbinx;
]
/ ontrialend = [
    if (trial.paper_yellow_green.responsetext == values.greenkey) {
        values.paper_green_count += 1;
        list.paper_green_RT.appenditem(trial.paper_yellow_green.latency);
    } else {
        values.paper_yellow_count += 1;
        list.paper_yellow_RT.appenditem(trial.paper_yellow_green.latency);
    }
]
/ stimulustimes = [0=clearscreen, word; 1000=green_bin, yellow_bin]
/ validresponse = (values.greenkey, values.yellowkey)
</trial>

// word stimulus at center of screen
<text word>
/ items = worditems
/ select = values.worditem
/ position = (50%, 50%)
/ fontstyle = ("Arial", 5%, true)
</text>

<item worditems>
/ 1 = "PLASTIC"
/ 2 = "PAPER"
/ 3 = "GLASS"
/ 4 = "CANS"
/ 5 = "CARDBOARD"
</item>

// BIN stimuli; you'll want to change these to picture elements
// blue bin
<shape blue_bin>
/ shape = rectangle
/ color = blue
/ size = (10%, 40%)
/ hposition = values.bluex
/ vposition = 50%
</shape>

// green bin
<shape green_bin>
/ shape = rectangle
/ color = green
/ size = (10%, 40%)
/ hposition = values.greenx
/ vposition = 50%
</shape>

// yellow bin
<shape yellow_bin>
/ shape = rectangle
/ color = yellow
/ size = (10%, 40%)
/ hposition = values.yellowx
/ vposition = 50%
</shape>

<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode text.word.currentitem response latency
    values.plastic_blue_count values.plastic_green_count values.plastic_yellow_count
    expressions.plastic_blue_meanRT expressions.plastic_green_meanRT expressions.plastic_yellow_meanRT
    values.paper_blue_count values.paper_green_count values.paper_yellow_count
    expressions.paper_blue_meanRT expressions.paper_green_meanRT expressions.paper_yellow_meanRT
    )
</data>

<summarydata>
/ columns = (script.startdate script.starttime script.subjectid script.groupid script.sessionid script.elapsedtime
    values.plastic_blue_count values.plastic_green_count values.plastic_yellow_count
    expressions.plastic_blue_meanRT expressions.plastic_green_meanRT expressions.plastic_yellow_meanRT
    values.paper_blue_count values.paper_green_count values.paper_yellow_count
    expressions.paper_blue_meanRT expressions.paper_green_meanRT expressions.paper_yellow_meanRT
    )
</summarydata>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search