Monetary Incentive Delay Task on EEG with Inquisit 4


Author
Message
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
Ozge - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

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

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge



This is the nonincentive trial from the script you attached:

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, values.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, values.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (values.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (values.cueduration + values.delayduration));
]
/ stimulustimes = [0 = nonincentivecue, total]
/ beginresponsetime = values.cueduration + values.delayduration
/ responseinterrupt = immediate
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ monkeyresponse = (values.responsekey)
/ ontrialend = [
    trial.nonincentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.nonincentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_NonIncentiveControl += 1;
        values.countcorrect_NonIncentiveControl += trial.nonincentive.correct;
        list.successNonIncentive_Control.insertitem(trial.nonincentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_NonIncentiveReward += 1;
        values.countcorrect_NonIncentiveReward += trial.nonincentive.correct;
        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_NonIncentivePunishment += 1;
        values.countcorrect_NonIncentivePunishment += trial.nonincentive.correct;
        list.successNonIncentive_Punishment.insertitem(trial.nonincentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Where do you send the nonincentivecue EEG marker? It appears you don't. Why? All you send is the target EEG marker. Add the nonincentive marker as I have explained previously, please.

Then, you'll probably want to define _different_ markers to indicate response. Here,

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
...

#1: What does "incentivecue" do in <trial nonincentive>?
#2: "incentivecue" is not a port marker, and neither is nonincentivecue. Those are <shape> elements. Your port elements are called incentivecueeeg and nonincentivecueeeg respectively.

<shape incentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>
<shape nonincentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

#3: You almost certainly will want to send those markes for longer than just 0 ms, since it's not guaranteed that there will be a substantive post trial pause. Set it to a minimum of, say, 50 ms.

Ozge
Ozge
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 13, Visits: 82
Dave - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

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

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge



This is the nonincentive trial from the script you attached:

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, values.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, values.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (values.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (values.cueduration + values.delayduration));
]
/ stimulustimes = [0 = nonincentivecue, total]
/ beginresponsetime = values.cueduration + values.delayduration
/ responseinterrupt = immediate
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ monkeyresponse = (values.responsekey)
/ ontrialend = [
    trial.nonincentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.nonincentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_NonIncentiveControl += 1;
        values.countcorrect_NonIncentiveControl += trial.nonincentive.correct;
        list.successNonIncentive_Control.insertitem(trial.nonincentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_NonIncentiveReward += 1;
        values.countcorrect_NonIncentiveReward += trial.nonincentive.correct;
        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_NonIncentivePunishment += 1;
        values.countcorrect_NonIncentivePunishment += trial.nonincentive.correct;
        list.successNonIncentive_Punishment.insertitem(trial.nonincentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Where do you send the nonincentivecue EEG marker? It appears you don't. Why? All you send is the target EEG marker. Add the nonincentive marker as I have explained previously, please.

Then, you'll probably want to define _different_ markers to indicate response. Here,

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
...

#1: What does "incentivecue" do in <trial nonincentive>?
#2: "incentivecue" is not a port marker, and neither is nonincentivecue. Those are <shape> elements. Your port elements are called incentivecueeeg and nonincentivecueeeg respectively.

<shape incentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>
<shape nonincentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

#3: You almost certainly will want to send those markes for longer than just 0 ms, since it's not guaranteed that there will be a substantive post trial pause. Set it to a minimum of, say, 50 ms.

Hi Dave again,

I want to change number of incentive and non-incentive cues on trials like 30 incentive and 70 non incentive cues instead of original 20-80.. I think it is possible but I could not do it. I modified 1-80 like 1-70 but it did not solve the problem. How can I do it? I searched on the forum but could not see what I can do.

Can you please have a look at?

/ trials = [1-70 = noreplace(incentive, nonincentive, nonincentive, nonincentive)]

Thank you so much

Özge


Attachments
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
Ozge - Friday, September 28, 2018

Hi Dave again,

I want to change number of incentive and non-incentive cues on trials like 30 incentive and 70 non incentive cues instead of original 20-80.. I think it is possible but I could not do it. I modified 1-80 like 1-70 but it did not solve the problem. How can I do it? I searched on the forum but could not see what I can do.

Can you please have a look at?

/ trials = [1-70 = noreplace(incentive, nonincentive, nonincentive, nonincentive)]

Thank you so much

Özge


If you want 70 trials total, with 30 incentive and 40 nonincentive, then you need to specify the proporions accordingly in your noreplace() pool.

/ trials = [1-70 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive)]

i.e. 3 to 4.



Edited 6 Years Ago by Dave
Ozge
Ozge
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 13, Visits: 82
No I still want 100 trials total each.. including 30 incentive and 70 non incentive cue.. What should I write to the script?

Thanks
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
Ozge - Friday, September 28, 2018
No I still want 100 trials total each.. including 30 incentive and 70 non incentive cue.. What should I write to the script?Thanks

Then your /trials attribute needs to read

/ trials = [1-100 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)]

obviously.

1-100 -> 100 trials

sampled randomly without replacement from a pool

noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)

with a 3 (incentive) to 7 (nonincentive) ratio.

How that works is easy to understand:

/trials = [1-12 = noreplace(a, b)]

will run 12 trials, with trial "a" and trial "b" in equal proportions, 1 to 1.

/trials = [1-12 = noreplace(a, b, b)]

would also run trials, but with a 1 to 2 ratio, giving you only 4 "a" trials but twice as many "b" trials, i.e. 8 "b" trials.

Ozge
Ozge
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 13, Visits: 82
Dave - Friday, September 28, 2018
Ozge - Friday, September 28, 2018
No I still want 100 trials total each.. including 30 incentive and 70 non incentive cue.. What should I write to the script?Thanks

Then your /trials attribute needs to read

/ trials = [1-100 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)]

obviously.

1-100 -> 100 trials

sampled randomly without replacement from a pool

noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)

with a 3 (incentive) to 7 (nonincentive) ratio.

How that works is easy to understand:

/trials = [1-12 = noreplace(a, b)]

will run 12 trials, with trial "a" and trial "b" in equal proportions, 1 to 1.

/trials = [1-12 = noreplace(a, b, b)]

would also run trials, but with a 1 to 2 ratio, giving you only 4 "a" trials but twice as many "b" trials, i.e. 8 "b" trials.

Hi Dave, 

Sorry to inform you that it is not working as I wish. I understand what you mean and it makes sense, however when I rearranged the script as you wrote, I get 100 nonincentive cues and 30 incentive cues making a total of 130 trials. I do not know where I did go wrong. 

/ trials = [1-100 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)] is not working how I wanted. 

I want to keep the MID task original (100 trials in total), I only want to increase incentive cue number from 20 to 30 and decrease nonincentive cue number from 80 to 70..still making a total of 100 trials in each condition. Can you please have a look at?

Thank you very very much.

Özge



Attachments
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
Ozge - Tuesday, October 9, 2018
Dave - Friday, September 28, 2018
Ozge - Friday, September 28, 2018
No I still want 100 trials total each.. including 30 incentive and 70 non incentive cue.. What should I write to the script?Thanks

Then your /trials attribute needs to read

/ trials = [1-100 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)]

obviously.

1-100 -> 100 trials

sampled randomly without replacement from a pool

noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)

with a 3 (incentive) to 7 (nonincentive) ratio.

How that works is easy to understand:

/trials = [1-12 = noreplace(a, b)]

will run 12 trials, with trial "a" and trial "b" in equal proportions, 1 to 1.

/trials = [1-12 = noreplace(a, b, b)]

would also run trials, but with a 1 to 2 ratio, giving you only 4 "a" trials but twice as many "b" trials, i.e. 8 "b" trials.

Hi Dave, 

Sorry to inform you that it is not working as I wish. I understand what you mean and it makes sense, however when I rearranged the script as you wrote, I get 100 nonincentive cues and 30 incentive cues making a total of 130 trials. I do not know where I did go wrong. 

/ trials = [1-100 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive, nonincentive)] is not working how I wanted. 

I want to keep the MID task original (100 trials in total), I only want to increase incentive cue number from 20 to 30 and decrease nonincentive cue number from 80 to 70..still making a total of 100 trials in each condition. Can you please have a look at?

Thank you very very much.

Özge



You are missing one thing:

- 100 trials
- 20 incentive trials
- 80 nonincentive trials
=> The order is randomized with the constraint that incentive trials cannot be presented consecutively

How does the script realize that constraint? It does so by invoking an additional nonincentive trial via /branch after every incentive trial:

<trial feedback>
/ ontrialbegin = [
if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) {
text.feedback.textcolor = green;
} else {
text.feedback.textcolor = red;
};
]
/ posttrialpause = values.fixediti
/ stimulusframes = [1 = feedback,feedbackeeg, total]
/ timeout = values.cueduration + values.targetduration
/ posttrialpause = values.iti
/ recorddata = false
/ branch = [
if (values.incentive_condition == 1) {
trial.nonincentive;
};

]
</trial>

That's why you get more. Either ditch the constraint by removing the /branch or lower the amount of nonincentive trials in your <block>s' /trials accordingly.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search