Emotional N-Back


Author
Message
elisegrimm
elisegrimm
Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)
Group: Forum Members
Posts: 24, Visits: 96
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm
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
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.
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 - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Since in your n-back you will want participants to make judgments based on a given stimulus's category (is the category, e.g. "happy," the same as the category two trials back?) rather than on the identity of the stimulus (is the image exactly the same as the one displayed two trials back?), the below example might be helpful:

https://www.millisecond.com/forums/FindPost17408.aspx

elisegrimm
elisegrimm
Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)
Group: Forum Members
Posts: 24, Visits: 96
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise
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
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

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 - 3/16/2020
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

Let's start with the 0-back blocks and leave out the gender-dimension for now. These should be fairly trivial. At the core, you have a simple two-choice task in these blocks and all participants need to do is decide whether the given stimulus in a trial matches the current target emotion set for that block of trials. A basic sketch of this could look like this:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<expt>
/ blocks = [1-3 = 0back]
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
</text>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
/ 6 = "happy06.jpg"
/ 7 = "happy07.jpg"
/ 8 = "happy08.jpg"
/ 9 = "happy09.jpg"
/ 10 = "happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
</text>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
/ 6 = "sad06.jpg"
/ 7 = "sad07.jpg"
/ 8 = "sad08.jpg"
/ 9 = "sad09.jpg"
/ 10 = "sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
</text>

<item neutralfaces>
/ 1 = "neutral01.jpg"
/ 2 = "neutral02.jpg"
/ 3 = "neutral03.jpg"
/ 4 = "neutral04.jpg"
/ 5 = "neutral05.jpg"
/ 6 = "neutral06.jpg"
/ 7 = "neutral07.jpg"
/ 8 = "neutral08.jpg"
/ 9 = "neutral09.jpg"
/ 10 = "neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>


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 - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

Let's start with the 0-back blocks and leave out the gender-dimension for now. These should be fairly trivial. At the core, you have a simple two-choice task in these blocks and all participants need to do is decide whether the given stimulus in a trial matches the current target emotion set for that block of trials. A basic sketch of this could look like this:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<expt>
/ blocks = [1-3 = 0back]
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
</text>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
/ 6 = "happy06.jpg"
/ 7 = "happy07.jpg"
/ 8 = "happy08.jpg"
/ 9 = "happy09.jpg"
/ 10 = "happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
</text>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
/ 6 = "sad06.jpg"
/ 7 = "sad07.jpg"
/ 8 = "sad08.jpg"
/ 9 = "sad09.jpg"
/ 10 = "sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
</text>

<item neutralfaces>
/ 1 = "neutral01.jpg"
/ 2 = "neutral02.jpg"
/ 3 = "neutral03.jpg"
/ 4 = "neutral04.jpg"
/ 5 = "neutral05.jpg"
/ 6 = "neutral06.jpg"
/ 7 = "neutral07.jpg"
/ 8 = "neutral08.jpg"
/ 9 = "neutral09.jpg"
/ 10 = "neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>


Now, as the next step, let's take the above and add in the gender-dimension. This could be done like so (there's almost always more than one way to go about something, so this is one possibility only):

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
    values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
    values.currentitemnumber = list.happystims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.happystims.poolsize;
    };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.sadstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.sadstims.poolsize;
    };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
    values.currentitemnumber = list.neutralstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.neutralstims.poolsize;
    };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"

/ 11 = "m_happy01.jpg"
/ 12 = "m_happy02.jpg"
/ 13 = "m_happy03.jpg"
/ 14 = "m_happy04.jpg"
/ 15 = "m_happy05.jpg"
/ 16 = "m_happy06.jpg"
/ 17 = "m_happy07.jpg"
/ 18 = "m_happy08.jpg"
/ 19 = "m_happy09.jpg"
/ 20 = "m_happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"

/ 11 = "m_sad01.jpg"
/ 12 = "m_sad02.jpg"
/ 13 = "m_sad03.jpg"
/ 14 = "m_sad04.jpg"
/ 15 = "m_sad05.jpg"
/ 16 = "m_sad06.jpg"
/ 17 = "m_sad07.jpg"
/ 18 = "m_sad08.jpg"
/ 19 = "m_sad09.jpg"
/ 20 = "m_sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"

/ 11 = "m_neutral01.jpg"
/ 12 = "m_neutral02.jpg"
/ 13 = "m_neutral03.jpg"
/ 14 = "m_neutral04.jpg"
/ 15 = "m_neutral05.jpg"
/ 16 = "m_neutral06.jpg"
/ 17 = "m_neutral07.jpg"
/ 18 = "m_neutral08.jpg"
/ 19 = "m_neutral09.jpg"
/ 20 = "m_neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>



elisegrimm
elisegrimm
Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)
Group: Forum Members
Posts: 24, Visits: 96
Dave - 3/16/2020
Dave - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

Let's start with the 0-back blocks and leave out the gender-dimension for now. These should be fairly trivial. At the core, you have a simple two-choice task in these blocks and all participants need to do is decide whether the given stimulus in a trial matches the current target emotion set for that block of trials. A basic sketch of this could look like this:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<expt>
/ blocks = [1-3 = 0back]
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
</text>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
/ 6 = "happy06.jpg"
/ 7 = "happy07.jpg"
/ 8 = "happy08.jpg"
/ 9 = "happy09.jpg"
/ 10 = "happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
</text>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
/ 6 = "sad06.jpg"
/ 7 = "sad07.jpg"
/ 8 = "sad08.jpg"
/ 9 = "sad09.jpg"
/ 10 = "sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
</text>

<item neutralfaces>
/ 1 = "neutral01.jpg"
/ 2 = "neutral02.jpg"
/ 3 = "neutral03.jpg"
/ 4 = "neutral04.jpg"
/ 5 = "neutral05.jpg"
/ 6 = "neutral06.jpg"
/ 7 = "neutral07.jpg"
/ 8 = "neutral08.jpg"
/ 9 = "neutral09.jpg"
/ 10 = "neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>


Now, as the next step, let's take the above and add in the gender-dimension. This could be done like so (there's almost always more than one way to go about something, so this is one possibility only):

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
    values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
    values.currentitemnumber = list.happystims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.happystims.poolsize;
    };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.sadstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.sadstims.poolsize;
    };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
    values.currentitemnumber = list.neutralstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.neutralstims.poolsize;
    };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"

/ 11 = "m_happy01.jpg"
/ 12 = "m_happy02.jpg"
/ 13 = "m_happy03.jpg"
/ 14 = "m_happy04.jpg"
/ 15 = "m_happy05.jpg"
/ 16 = "m_happy06.jpg"
/ 17 = "m_happy07.jpg"
/ 18 = "m_happy08.jpg"
/ 19 = "m_happy09.jpg"
/ 20 = "m_happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"

/ 11 = "m_sad01.jpg"
/ 12 = "m_sad02.jpg"
/ 13 = "m_sad03.jpg"
/ 14 = "m_sad04.jpg"
/ 15 = "m_sad05.jpg"
/ 16 = "m_sad06.jpg"
/ 17 = "m_sad07.jpg"
/ 18 = "m_sad08.jpg"
/ 19 = "m_sad09.jpg"
/ 20 = "m_sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"

/ 11 = "m_neutral01.jpg"
/ 12 = "m_neutral02.jpg"
/ 13 = "m_neutral03.jpg"
/ 14 = "m_neutral04.jpg"
/ 15 = "m_neutral05.jpg"
/ 16 = "m_neutral06.jpg"
/ 17 = "m_neutral07.jpg"
/ 18 = "m_neutral08.jpg"
/ 19 = "m_neutral09.jpg"
/ 20 = "m_neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>



Thank you so much, this is incredible, and I am eternally grateful! Given that I will have 24 female faces and 22 male faces per emotion, is there any other way besides the "poolsize" function to identify the two categories? 
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
elisegrimm - 3/19/2020
Dave - 3/16/2020
Dave - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

Let's start with the 0-back blocks and leave out the gender-dimension for now. These should be fairly trivial. At the core, you have a simple two-choice task in these blocks and all participants need to do is decide whether the given stimulus in a trial matches the current target emotion set for that block of trials. A basic sketch of this could look like this:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<expt>
/ blocks = [1-3 = 0back]
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
</text>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
/ 6 = "happy06.jpg"
/ 7 = "happy07.jpg"
/ 8 = "happy08.jpg"
/ 9 = "happy09.jpg"
/ 10 = "happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
</text>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
/ 6 = "sad06.jpg"
/ 7 = "sad07.jpg"
/ 8 = "sad08.jpg"
/ 9 = "sad09.jpg"
/ 10 = "sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
</text>

<item neutralfaces>
/ 1 = "neutral01.jpg"
/ 2 = "neutral02.jpg"
/ 3 = "neutral03.jpg"
/ 4 = "neutral04.jpg"
/ 5 = "neutral05.jpg"
/ 6 = "neutral06.jpg"
/ 7 = "neutral07.jpg"
/ 8 = "neutral08.jpg"
/ 9 = "neutral09.jpg"
/ 10 = "neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>


Now, as the next step, let's take the above and add in the gender-dimension. This could be done like so (there's almost always more than one way to go about something, so this is one possibility only):

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
    values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
    values.currentitemnumber = list.happystims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.happystims.poolsize;
    };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.sadstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.sadstims.poolsize;
    };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
    values.currentitemnumber = list.neutralstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.neutralstims.poolsize;
    };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"

/ 11 = "m_happy01.jpg"
/ 12 = "m_happy02.jpg"
/ 13 = "m_happy03.jpg"
/ 14 = "m_happy04.jpg"
/ 15 = "m_happy05.jpg"
/ 16 = "m_happy06.jpg"
/ 17 = "m_happy07.jpg"
/ 18 = "m_happy08.jpg"
/ 19 = "m_happy09.jpg"
/ 20 = "m_happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"

/ 11 = "m_sad01.jpg"
/ 12 = "m_sad02.jpg"
/ 13 = "m_sad03.jpg"
/ 14 = "m_sad04.jpg"
/ 15 = "m_sad05.jpg"
/ 16 = "m_sad06.jpg"
/ 17 = "m_sad07.jpg"
/ 18 = "m_sad08.jpg"
/ 19 = "m_sad09.jpg"
/ 20 = "m_sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"

/ 11 = "m_neutral01.jpg"
/ 12 = "m_neutral02.jpg"
/ 13 = "m_neutral03.jpg"
/ 14 = "m_neutral04.jpg"
/ 15 = "m_neutral05.jpg"
/ 16 = "m_neutral06.jpg"
/ 17 = "m_neutral07.jpg"
/ 18 = "m_neutral08.jpg"
/ 19 = "m_neutral09.jpg"
/ 20 = "m_neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>



Thank you so much, this is incredible, and I am eternally grateful! Given that I will have 24 female faces and 22 male faces per emotion, is there any other way besides the "poolsize" function to identify the two categories? 

Just set up separate <list> elements for female and male:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("m");
  list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
  values.currenttarget = list.0backtargets.nextvalue;
  values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.happystims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.happystims_m.nextindex + list.happystims_f.poolsize;
  };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "happy") {
   trial.happytrial.response == parameters.samekey;
  } else if (values.currenttarget != "happy") {
   trial.happytrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.sadstims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.sadstims_m.nextindex + list.sadstims_f.poolsize;
  };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "sad") {
   trial.sadtrial.response == parameters.samekey;
  } else if (values.currenttarget != "sad") {
   trial.sadtrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.neutralstims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.neutralstims_m.nextindex + list.neutralstims_f.poolsize;
  };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "neutral") {
   trial.neutraltrial.response == parameters.samekey;
  } else if (values.currenttarget != "neutral") {
   trial.neutraltrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims_f>
/ poolsize = 24
</list>

<list happystims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"
/ 11 = "f_happy11.jpg"
/ 12 = "f_happy12.jpg"
/ 13 = "f_happy13.jpg"
/ 14 = "f_happy14.jpg"
/ 15 = "f_happy15.jpg"
/ 16 = "f_happy16.jpg"
/ 17 = "f_happy17.jpg"
/ 18 = "f_happy18.jpg"
/ 19 = "f_happy19.jpg"
/ 20 = "f_happy20.jpg"
/ 21 = "f_happy21.jpg"
/ 22 = "f_happy22.jpg"
/ 23 = "f_happy23.jpg"
/ 24 = "f_happy24.jpg"

/ 25 = "m_happy01.jpg"
/ 26 = "m_happy02.jpg"
/ 27 = "m_happy03.jpg"
/ 28 = "m_happy04.jpg"
/ 29 = "m_happy05.jpg"
/ 30 = "m_happy06.jpg"
/ 31 = "m_happy07.jpg"
/ 32 = "m_happy08.jpg"
/ 33 = "m_happy09.jpg"
/ 34 = "m_happy10.jpg"
/ 35 = "m_happy11.jpg"
/ 36 = "m_happy12.jpg"
/ 37 = "m_happy13.jpg"
/ 38 = "m_happy14.jpg"
/ 39 = "m_happy15.jpg"
/ 40 = "m_happy16.jpg"
/ 41 = "m_happy17.jpg"
/ 42 = "m_happy18.jpg"
/ 43 = "m_happy19.jpg"
/ 44 = "m_happy20.jpg"
/ 45 = "m_happy21.jpg"
/ 46 = "m_happy22.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims_f>
/ poolsize = 24
</list>

<list sadstims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"
/ 11 = "f_sad11.jpg"
/ 12 = "f_sad12.jpg"
/ 13 = "f_sad13.jpg"
/ 14 = "f_sad14.jpg"
/ 15 = "f_sad15.jpg"
/ 16 = "f_sad16.jpg"
/ 17 = "f_sad17.jpg"
/ 18 = "f_sad18.jpg"
/ 19 = "f_sad19.jpg"
/ 20 = "f_sad20.jpg"
/ 21 = "f_sad21.jpg"
/ 22 = "f_sad22.jpg"
/ 23 = "f_sad23.jpg"
/ 24 = "f_sad24.jpg"

/ 25 = "m_sad01.jpg"
/ 26 = "m_sad02.jpg"
/ 27 = "m_sad03.jpg"
/ 28 = "m_sad04.jpg"
/ 29 = "m_sad05.jpg"
/ 30 = "m_sad06.jpg"
/ 31 = "m_sad07.jpg"
/ 32 = "m_sad08.jpg"
/ 33 = "m_sad09.jpg"
/ 34 = "m_sad10.jpg"
/ 35 = "m_sad11.jpg"
/ 36 = "m_sad12.jpg"
/ 37 = "m_sad13.jpg"
/ 38 = "m_sad14.jpg"
/ 39 = "m_sad15.jpg"
/ 40 = "m_sad16.jpg"
/ 41 = "m_sad17.jpg"
/ 42 = "m_sad18.jpg"
/ 43 = "m_sad19.jpg"
/ 44 = "m_sad20.jpg"
/ 45 = "m_sad21.jpg"
/ 46 = "m_sad22.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims_f>
/ poolsize = 24
</list>

<list neutralstims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"
/ 11 = "f_neutral11.jpg"
/ 12 = "f_neutral12.jpg"
/ 13 = "f_neutral13.jpg"
/ 14 = "f_neutral14.jpg"
/ 15 = "f_neutral15.jpg"
/ 16 = "f_neutral16.jpg"
/ 17 = "f_neutral17.jpg"
/ 18 = "f_neutral18.jpg"
/ 19 = "f_neutral19.jpg"
/ 20 = "f_neutral20.jpg"
/ 21 = "f_neutral21.jpg"
/ 22 = "f_neutral22.jpg"
/ 23 = "f_neutral23.jpg"
/ 24 = "f_neutral24.jpg"

/ 25 = "m_neutral01.jpg"
/ 26 = "m_neutral02.jpg"
/ 27 = "m_neutral03.jpg"
/ 28 = "m_neutral04.jpg"
/ 29 = "m_neutral05.jpg"
/ 30 = "m_neutral06.jpg"
/ 31 = "m_neutral07.jpg"
/ 32 = "m_neutral08.jpg"
/ 33 = "m_neutral09.jpg"
/ 34 = "m_neutral10.jpg"
/ 35 = "m_neutral11.jpg"
/ 36 = "m_neutral12.jpg"
/ 37 = "m_neutral13.jpg"
/ 38 = "m_neutral14.jpg"
/ 39 = "m_neutral15.jpg"
/ 40 = "m_neutral16.jpg"
/ 41 = "m_neutral17.jpg"
/ 42 = "m_neutral18.jpg"
/ 43 = "m_neutral19.jpg"
/ 44 = "m_neutral20.jpg"
/ 45 = "m_neutral21.jpg"
/ 46 = "m_neutral22.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>
elisegrimm
elisegrimm
Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)Associate Member (288 reputation)
Group: Forum Members
Posts: 24, Visits: 96
Dave - 3/19/2020
elisegrimm - 3/19/2020
Dave - 3/16/2020
Dave - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
Dave - 3/16/2020
elisegrimm - 3/16/2020
I am attempting to recreate Levens & Gotlib's (2010) Emotional N-Back Task into Inquisit but I've run into a few difficulties. 

For the 0-Back:
- I would like to have 3 blocks of trials (one with sad faces, one with happy faces, and one with neutral faces), and would like to counterbalance face gender across blocks ie., 2 blocks of male and 1 block female, or vice versa. Besides creating two separate testing programs, is there any other way I could manually counterbalance gender in that task? How do I tell Inquisit to select only female blocks? Right now, I currently have different stimuli variables according to expression and gender ie., femalesad, femalehappy, etc., 

For the 2-Back (3 blocks of female faces and 3 blocks of male faces):
- Participants are asked to indicate whether the emotional expression is the same or different as that presented two faces earlier (using two separate keys). The authors identify 4 different types of trials:
1) Match-set trials ("same" response trial), where the currently presented facial expression is the same as that presented two trials earlier
2) Break-set trial ("different" response trial), which immediately follows a match-set trial; "The facial expression presented three trials earlier, which must be discarded, was one expression in a matched pair."
3) Perseveration-set trial ("different response trial), similar to break-set trial in that they must follow a match-set trial. In perseveration set trials, however, the current face is the same valence as the face presented three trials earlier, the stimulus that must be removed from WM (ie., a happy face (n+6) immediately follows a happy face (n+5) when a happy was present at (n+3)
4) No-set trials ("different" response trial), does not follow a match-set. Participants simply need to determine that there is no match between the current picture and that presented 2 trials earlier.
My question is: is there anyway Inquisit can identify these trials for me to analyze more easily, or will I need to sort through the data myself and analyze the RT based on the faces that were presented?

For the entire task
- Is there any way I can have 3 0-Back blocks followed by 6 2-Back blocks into one experiment? I would like them to follow one another, as opposed to having participants alternate between the two tasks (as is currently the case in the n-back script on Inquisit)

Thank you so much in advance,

Best,

Elise Grimm

You can counterbalance blocks by creating several <expt> elements in the script.

You can code the trials to have Inquisit score them automatically. It's not clear to me what specific problems or questions you have with respect to questions 1), 2), 3) and 4).

And finally, yes, you can absolutely have 3 0-back blocks followed by 6 2-back blocks in one experiment. Here, too, it's not clear to me what kind of problem you're running into.

Thank you for your reply!

My question referred to how can I code the program to have the 3 (neutral, sad, happy) 0-back blocks (which are themselves counterbalanced ie., 2 blocks of female faces and 1 block of male faces, or 2 blocks of male faces and 1 block of female faces) be followed by the 6 2-back blocks (which are a mixture of neutral male, neutral female, happy male, happy female, sad male, sad female)? 

I'm trying to update the current emotional n-back available on Inquisit to make the faces the actual targets. What I am struggling with, is knowing where in the script I can make this a possibility, especially as the idea is to have two response keys (1 for "same face" and 1 for "different"). 

Best,

Elise

I think it's a mistake to try and modify the available emotional n-back script. It's an entirely different procedure. Rather, I'd recommend working through and studying the available n-back scripts (and not primarily the emotional n-back), taking the concepts and perhaps part of the code to then build your own exactly the way you want it to.

As to the "how" question, it's too broad and vague for me to answer, I'm afraid. Can you please get these on a more concrete level, i.e. what exactly are you struggling with code-wise or conceptually? And if you're not yet familiar with Inquisit syntax and building basic tasks with it at all, I'd strongly advise first working through the tutorials contained in the documentation.

Let's start with the 0-back blocks and leave out the gender-dimension for now. These should be fairly trivial. At the core, you have a simple two-choice task in these blocks and all participants need to do is decide whether the given stimulus in a trial matches the current target emotion set for that block of trials. A basic sketch of this could look like this:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<expt>
/ blocks = [1-3 = 0back]
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
</text>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
/ 6 = "happy06.jpg"
/ 7 = "happy07.jpg"
/ 8 = "happy08.jpg"
/ 9 = "happy09.jpg"
/ 10 = "happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
</text>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
/ 6 = "sad06.jpg"
/ 7 = "sad07.jpg"
/ 8 = "sad08.jpg"
/ 9 = "sad09.jpg"
/ 10 = "sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
</text>

<item neutralfaces>
/ 1 = "neutral01.jpg"
/ 2 = "neutral02.jpg"
/ 3 = "neutral03.jpg"
/ 4 = "neutral04.jpg"
/ 5 = "neutral05.jpg"
/ 6 = "neutral06.jpg"
/ 7 = "neutral07.jpg"
/ 8 = "neutral08.jpg"
/ 9 = "neutral09.jpg"
/ 10 = "neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>


Now, as the next step, let's take the above and add in the gender-dimension. This could be done like so (there's almost always more than one way to go about something, so this is one possibility only):

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
    list.0backstimsets.appenditem("f");
    list.0backstimsets.appenditem("m");
    list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
    values.currenttarget = list.0backtargets.nextvalue;
    values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
    values.currentitemnumber = list.happystims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.happystims.poolsize;
    };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "happy") {
        trial.happytrial.response == parameters.samekey;
    } else if (values.currenttarget != "happy") {
        trial.happytrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.sadstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.sadstims.poolsize;
    };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "sad") {
        trial.sadtrial.response == parameters.samekey;
    } else if (values.currenttarget != "sad") {
        trial.sadtrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
    values.currentitemnumber = list.neutralstims.nextindex;
    if (values.currentstimset == "m") {
        values.currentitemnumber = values.currentitemnumber + list.neutralstims.poolsize;
    };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
    if (values.currenttarget == "neutral") {
        trial.neutraltrial.response == parameters.samekey;
    } else if (values.currenttarget != "neutral") {
        trial.neutraltrial.response == parameters.differentkey;
    }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"

/ 11 = "m_happy01.jpg"
/ 12 = "m_happy02.jpg"
/ 13 = "m_happy03.jpg"
/ 14 = "m_happy04.jpg"
/ 15 = "m_happy05.jpg"
/ 16 = "m_happy06.jpg"
/ 17 = "m_happy07.jpg"
/ 18 = "m_happy08.jpg"
/ 19 = "m_happy09.jpg"
/ 20 = "m_happy10.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"

/ 11 = "m_sad01.jpg"
/ 12 = "m_sad02.jpg"
/ 13 = "m_sad03.jpg"
/ 14 = "m_sad04.jpg"
/ 15 = "m_sad05.jpg"
/ 16 = "m_sad06.jpg"
/ 17 = "m_sad07.jpg"
/ 18 = "m_sad08.jpg"
/ 19 = "m_sad09.jpg"
/ 20 = "m_sad10.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims>
/ poolsize = 10
</list>

// female items are 1 to 10
// male items are 11 to 20
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"

/ 11 = "m_neutral01.jpg"
/ 12 = "m_neutral02.jpg"
/ 13 = "m_neutral03.jpg"
/ 14 = "m_neutral04.jpg"
/ 15 = "m_neutral05.jpg"
/ 16 = "m_neutral06.jpg"
/ 17 = "m_neutral07.jpg"
/ 18 = "m_neutral08.jpg"
/ 19 = "m_neutral09.jpg"
/ 20 = "m_neutral10.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>



Thank you so much, this is incredible, and I am eternally grateful! Given that I will have 24 female faces and 22 male faces per emotion, is there any other way besides the "poolsize" function to identify the two categories? 

Just set up separate <list> elements for female and male:

<parameters>
/ samekey = 18
/ samekeylabel = "E"
/ differentkey = 23
/ differentkeylabel = "E"
</parameters>

<values>
/ currenttarget = ""
/ currentstimset = 1
/ currentitemnumber = 1
</values>

<list 0backtargets>
/ items = ("happy", "sad", "neutral")
/ selectionmode = random
/ replace = false
/ resetinterval = 0
</list>

<list 0backstimsets>
</list>

// in this condition 2 of the 0-back blocks will administer female-only stimuli, 1 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (1 of 2)
/ groupassignment = groupnumber
</expt>

// in this condition 1 of the 0-back blocks will administer female-only stimuli, 2 of the 0-back blocks will administer male-only stimuli.
<expt>
/ onexptbegin = [
  list.0backstimsets.appenditem("f");
  list.0backstimsets.appenditem("m");
  list.0backstimsets.appenditem("m");
]
/ blocks = [1-3 = 0back]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
</expt>

<block 0back>
/ preinstructions = (zeroback_intro)
/ onblockbegin = [
  values.currenttarget = list.0backtargets.nextvalue;
  values.currentstimset = list.0backstimsets.nextvalue;
]
/ trials = [1-30 = noreplace(happytrial, sadtrial, neutraltrial)]
</block>

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a <%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a <%toupper(values.currenttarget)%> face.
</page>


<trial happytrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.happystims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.happystims_m.nextindex + list.happystims_f.poolsize;
  };
]
/ stimulusframes = [1=happyface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "happy") {
   trial.happytrial.response == parameters.samekey;
  } else if (values.currenttarget != "happy") {
   trial.happytrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial sadtrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.sadstims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.sadstims_m.nextindex + list.sadstims_f.poolsize;
  };
]
/ stimulusframes = [1=sadface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "sad") {
   trial.sadtrial.response == parameters.samekey;
  } else if (values.currenttarget != "sad") {
   trial.sadtrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<trial neutraltrial>
/ ontrialbegin = [
  if (values.currentstimset == "f") {
        values.currentitemnumber = list.neutralstims_f.nextindex;
    };
  if (values.currentstimset == "m") {
   values.currentitemnumber = list.neutralstims_m.nextindex + list.neutralstims_f.poolsize;
  };
]
/ stimulusframes = [1=neutralface, reminder]
/ validresponse = (parameters.samekey, parameters.differentkey)
/ iscorrectresponse = [
  if (values.currenttarget == "neutral") {
   trial.neutraltrial.response == parameters.samekey;
  } else if (values.currenttarget != "neutral") {
   trial.neutraltrial.response == parameters.differentkey;
  }
]
/ correctmessage = true(correctmsg, 500)
/ errormessage = true(errormsg, 500)
</trial>

<text happyface>
/ items = happyfaces
/ select = values.currentitemnumber
</text>

<list happystims_f>
/ poolsize = 24
</list>

<list happystims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item happyfaces>
/ 1 = "f_happy01.jpg"
/ 2 = "f_happy02.jpg"
/ 3 = "f_happy03.jpg"
/ 4 = "f_happy04.jpg"
/ 5 = "f_happy05.jpg"
/ 6 = "f_happy06.jpg"
/ 7 = "f_happy07.jpg"
/ 8 = "f_happy08.jpg"
/ 9 = "f_happy09.jpg"
/ 10 = "f_happy10.jpg"
/ 11 = "f_happy11.jpg"
/ 12 = "f_happy12.jpg"
/ 13 = "f_happy13.jpg"
/ 14 = "f_happy14.jpg"
/ 15 = "f_happy15.jpg"
/ 16 = "f_happy16.jpg"
/ 17 = "f_happy17.jpg"
/ 18 = "f_happy18.jpg"
/ 19 = "f_happy19.jpg"
/ 20 = "f_happy20.jpg"
/ 21 = "f_happy21.jpg"
/ 22 = "f_happy22.jpg"
/ 23 = "f_happy23.jpg"
/ 24 = "f_happy24.jpg"

/ 25 = "m_happy01.jpg"
/ 26 = "m_happy02.jpg"
/ 27 = "m_happy03.jpg"
/ 28 = "m_happy04.jpg"
/ 29 = "m_happy05.jpg"
/ 30 = "m_happy06.jpg"
/ 31 = "m_happy07.jpg"
/ 32 = "m_happy08.jpg"
/ 33 = "m_happy09.jpg"
/ 34 = "m_happy10.jpg"
/ 35 = "m_happy11.jpg"
/ 36 = "m_happy12.jpg"
/ 37 = "m_happy13.jpg"
/ 38 = "m_happy14.jpg"
/ 39 = "m_happy15.jpg"
/ 40 = "m_happy16.jpg"
/ 41 = "m_happy17.jpg"
/ 42 = "m_happy18.jpg"
/ 43 = "m_happy19.jpg"
/ 44 = "m_happy20.jpg"
/ 45 = "m_happy21.jpg"
/ 46 = "m_happy22.jpg"
</item>

<text sadface>
/ items = sadfaces
/ select = values.currentitemnumber
</text>

<list sadstims_f>
/ poolsize = 24
</list>

<list sadstims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item sadfaces>
/ 1 = "f_sad01.jpg"
/ 2 = "f_sad02.jpg"
/ 3 = "f_sad03.jpg"
/ 4 = "f_sad04.jpg"
/ 5 = "f_sad05.jpg"
/ 6 = "f_sad06.jpg"
/ 7 = "f_sad07.jpg"
/ 8 = "f_sad08.jpg"
/ 9 = "f_sad09.jpg"
/ 10 = "f_sad10.jpg"
/ 11 = "f_sad11.jpg"
/ 12 = "f_sad12.jpg"
/ 13 = "f_sad13.jpg"
/ 14 = "f_sad14.jpg"
/ 15 = "f_sad15.jpg"
/ 16 = "f_sad16.jpg"
/ 17 = "f_sad17.jpg"
/ 18 = "f_sad18.jpg"
/ 19 = "f_sad19.jpg"
/ 20 = "f_sad20.jpg"
/ 21 = "f_sad21.jpg"
/ 22 = "f_sad22.jpg"
/ 23 = "f_sad23.jpg"
/ 24 = "f_sad24.jpg"

/ 25 = "m_sad01.jpg"
/ 26 = "m_sad02.jpg"
/ 27 = "m_sad03.jpg"
/ 28 = "m_sad04.jpg"
/ 29 = "m_sad05.jpg"
/ 30 = "m_sad06.jpg"
/ 31 = "m_sad07.jpg"
/ 32 = "m_sad08.jpg"
/ 33 = "m_sad09.jpg"
/ 34 = "m_sad10.jpg"
/ 35 = "m_sad11.jpg"
/ 36 = "m_sad12.jpg"
/ 37 = "m_sad13.jpg"
/ 38 = "m_sad14.jpg"
/ 39 = "m_sad15.jpg"
/ 40 = "m_sad16.jpg"
/ 41 = "m_sad17.jpg"
/ 42 = "m_sad18.jpg"
/ 43 = "m_sad19.jpg"
/ 44 = "m_sad20.jpg"
/ 45 = "m_sad21.jpg"
/ 46 = "m_sad22.jpg"
</item>

<text neutralface>
/ items = neutralfaces
/ select = values.currentitemnumber
</text>

<list neutralstims_f>
/ poolsize = 24
</list>

<list neutralstims_m>
/ poolsize = 22
</list>

// female items are 1 to 24
// male items are 25 to 46
<item neutralfaces>
/ 1 = "f_neutral01.jpg"
/ 2 = "f_neutral02.jpg"
/ 3 = "f_neutral03.jpg"
/ 4 = "f_neutral04.jpg"
/ 5 = "f_neutral05.jpg"
/ 6 = "f_neutral06.jpg"
/ 7 = "f_neutral07.jpg"
/ 8 = "f_neutral08.jpg"
/ 9 = "f_neutral09.jpg"
/ 10 = "f_neutral10.jpg"
/ 11 = "f_neutral11.jpg"
/ 12 = "f_neutral12.jpg"
/ 13 = "f_neutral13.jpg"
/ 14 = "f_neutral14.jpg"
/ 15 = "f_neutral15.jpg"
/ 16 = "f_neutral16.jpg"
/ 17 = "f_neutral17.jpg"
/ 18 = "f_neutral18.jpg"
/ 19 = "f_neutral19.jpg"
/ 20 = "f_neutral20.jpg"
/ 21 = "f_neutral21.jpg"
/ 22 = "f_neutral22.jpg"
/ 23 = "f_neutral23.jpg"
/ 24 = "f_neutral24.jpg"

/ 25 = "m_neutral01.jpg"
/ 26 = "m_neutral02.jpg"
/ 27 = "m_neutral03.jpg"
/ 28 = "m_neutral04.jpg"
/ 29 = "m_neutral05.jpg"
/ 30 = "m_neutral06.jpg"
/ 31 = "m_neutral07.jpg"
/ 32 = "m_neutral08.jpg"
/ 33 = "m_neutral09.jpg"
/ 34 = "m_neutral10.jpg"
/ 35 = "m_neutral11.jpg"
/ 36 = "m_neutral12.jpg"
/ 37 = "m_neutral13.jpg"
/ 38 = "m_neutral14.jpg"
/ 39 = "m_neutral15.jpg"
/ 40 = "m_neutral16.jpg"
/ 41 = "m_neutral17.jpg"
/ 42 = "m_neutral18.jpg"
/ 43 = "m_neutral19.jpg"
/ 44 = "m_neutral20.jpg"
/ 45 = "m_neutral21.jpg"
/ 46 = "m_neutral22.jpg"
</item>

<text reminder>
/ items = ("Press '<%parameters.samekeylabel%>' when you see a <%toupper(values.currenttarget)%> face, press '<%parameters.differentkeylabel%>' when you see a different emotion.")
/ erase = false
/ position = (50%, 5%)
</text>

<text correctmsg>
/ items = ("O")
/ txcolor = green
/ position = (50%, 75%)
</text>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>

Thank you so much. I have one last question and I will try to figure it out by myself after this! I would like that the instructions show a picture of the example target emotion. For now, there is an instructions page, with a text identifying the next target for the upcoming emotional block;

<page zeroback_intro>
^In this block, your target category is <%toupper(values.currenttarget)%>.
^^Press the '<%parameters.samekeylabel%>'-key whenever the stimulus on the screen is a
<%toupper(values.currenttarget)%> face.
^^Press the '<%parameters.differentkeylabel%>'-key whenever the stimulus on the screen is NOT a
<%toupper(values.currenttarget)%> face.
</page>

How can I insert the matching emotion picture above the target instructions? Thank you once again for your time and your precious help.

Best,
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search