Monetary Incentive Delay Task on Inquisit 4


Author
Message
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
Hello all,

I have purchased Inquisit 5 but because of the parallel port issue we cannot change the computer which is compatible with Inquisit 4. That is why I am desperately trying to write MID task on Inquisit 4 to use with EEG. So far I assume that I fixed some errors but I still have some problems with the script. Expressions part and trial.incentive part don't work. Can you please help me??

<expressions >
/ meanRT_baseline = trial.baseline.totalmeanlatency
/ SD_baseline = trial.baseline.totalsdlatency
/ baselineRT60 = 0.2533*expressions.SD_baseline + expressions.meanRT_baseline
/ determineDuration = round(expressions.baselineRT60)
/ propCorrect_IncentiveReward = values.countcorrect_IncentiveReward/values.count_IncentiveReward
/ propCorrect_NonIncentiveReward = values.countcorrect_NonIncentiveReward/values.count_NonIncentiveReward
/ propCorrect_IncentivePunishment = values.countcorrect_IncentivePunishmnet/values.count_IncentivePunishment
/ propCorrect_NonIncentivePunishment = values.countcorrect_NonIncentivePunishment/values.count_NonIncentivePunishment
/ propCorrect_IncentiveControl = values.countcorrect_IncentiveControl/values.count_IncentiveControl
/ propCorrect_NonIncentiveControl = values.countcorrect_NonIncentiveControl/values.count_NonIncentiveControl
</expressions>


Attachments
monetaryincentivedelaytask.iqx (541 views, 35.00 KB)
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 - Wednesday, August 15, 2018
Hello all,

I have purchased Inquisit 5 but because of the parallel port issue we cannot change the computer which is compatible with Inquisit 4. That is why I am desperately trying to write MID task on Inquisit 4 to use with EEG. So far I assume that I fixed some errors but I still have some problems with the script. Expressions part and trial.incentive part don't work. Can you please help me??

<expressions >
/ meanRT_baseline = trial.baseline.totalmeanlatency
/ SD_baseline = trial.baseline.totalsdlatency
/ baselineRT60 = 0.2533*expressions.SD_baseline + expressions.meanRT_baseline
/ determineDuration = round(expressions.baselineRT60)
/ propCorrect_IncentiveReward = values.countcorrect_IncentiveReward/values.count_IncentiveReward
/ propCorrect_NonIncentiveReward = values.countcorrect_NonIncentiveReward/values.count_NonIncentiveReward
/ propCorrect_IncentivePunishment = values.countcorrect_IncentivePunishmnet/values.count_IncentivePunishment
/ propCorrect_NonIncentivePunishment = values.countcorrect_NonIncentivePunishment/values.count_NonIncentivePunishment
/ propCorrect_IncentiveControl = values.countcorrect_IncentiveControl/values.count_IncentiveControl
/ propCorrect_NonIncentiveControl = values.countcorrect_NonIncentiveControl/values.count_NonIncentiveControl
</expressions>


You have not defined any of the values your expressions element expects. You need to do that, i.e. add those to the script's existing <values> element or define an additional one.

<values>
/countcorrect_IncentiveReward = 0
/count_IncentiveReward = 0
/countcorrect_NonIncentiveReward = 0
/count_NonIncentiveReward = 0
/countcorrect_IncentivePunishmnet = 0
/count_IncentivePunishment = 0
/countcorrect_NonIncentivePunishment = 0
/count_NonIncentivePunishment = 0
/countcorrect_IncentiveControl = 0
/count_IncentiveControl = 0
/countcorrect_NonIncentiveControl = 0
/count_NonIncentiveControl = 0
</values>

And then, of course, you need to actually make sure those values get updated per your <trial>'s /ontrialend logic. Otherwise they won't do anything useful. I.e.

<trial incentive>
...
/ ontrialend = [
    trial.incentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.incentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_IncentiveControl += 1;
        values.countcorrect_IncentiveControl += trial.incentive.correct;

        list.successIncentive_Control.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_IncentiveReward += 1;
        values.countcorrect_IncentiveReward += trial.incentive.correct;

        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_IncentivePunishment += 1;
        values.countcorrect_IncentivePunishmnet += trial.incentive.correct;

        list.successIncentive_Punishment.insertitem(trial.incentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Analogously for <trial nonincentive>, i.e. update the *nonincentive* count and correct count values there.

Then:

<trial incentive>
...
/ response = timeout(values.targetduration)
/ validresponse = (values.responsekey)
/ correctresponse = (values.responsekey)
...
</trial>

is not valid Inquisit 4 syntax and needs to read

<trial incentive>
...
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ isvalidresponse = [trial.incentive.response == values.responsekey]
/ iscorrectresponse = [trial.incentive.response == values.responsekey]
...
</trial>

instead. Again, you need to change <trial nonincentive> analogously.

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
Dave - Wednesday, August 15, 2018
Ozge - Wednesday, August 15, 2018
Hello all,

I have purchased Inquisit 5 but because of the parallel port issue we cannot change the computer which is compatible with Inquisit 4. That is why I am desperately trying to write MID task on Inquisit 4 to use with EEG. So far I assume that I fixed some errors but I still have some problems with the script. Expressions part and trial.incentive part don't work. Can you please help me??

<expressions >
/ meanRT_baseline = trial.baseline.totalmeanlatency
/ SD_baseline = trial.baseline.totalsdlatency
/ baselineRT60 = 0.2533*expressions.SD_baseline + expressions.meanRT_baseline
/ determineDuration = round(expressions.baselineRT60)
/ propCorrect_IncentiveReward = values.countcorrect_IncentiveReward/values.count_IncentiveReward
/ propCorrect_NonIncentiveReward = values.countcorrect_NonIncentiveReward/values.count_NonIncentiveReward
/ propCorrect_IncentivePunishment = values.countcorrect_IncentivePunishmnet/values.count_IncentivePunishment
/ propCorrect_NonIncentivePunishment = values.countcorrect_NonIncentivePunishment/values.count_NonIncentivePunishment
/ propCorrect_IncentiveControl = values.countcorrect_IncentiveControl/values.count_IncentiveControl
/ propCorrect_NonIncentiveControl = values.countcorrect_NonIncentiveControl/values.count_NonIncentiveControl
</expressions>


You have not defined any of the values your expressions element expects. You need to do that, i.e. add those to the script's existing <values> element or define an additional one.

<values>
/countcorrect_IncentiveReward = 0
/count_IncentiveReward = 0
/countcorrect_NonIncentiveReward = 0
/count_NonIncentiveReward = 0
/countcorrect_IncentivePunishmnet = 0
/count_IncentivePunishment = 0
/countcorrect_NonIncentivePunishment = 0
/count_NonIncentivePunishment = 0
/countcorrect_IncentiveControl = 0
/count_IncentiveControl = 0
/countcorrect_NonIncentiveControl = 0
/count_NonIncentiveControl = 0
</values>

And then, of course, you need to actually make sure those values get updated per your <trial>'s /ontrialend logic. Otherwise they won't do anything useful. I.e.

<trial incentive>
...
/ ontrialend = [
    trial.incentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.incentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_IncentiveControl += 1;
        values.countcorrect_IncentiveControl += trial.incentive.correct;

        list.successIncentive_Control.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_IncentiveReward += 1;
        values.countcorrect_IncentiveReward += trial.incentive.correct;

        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_IncentivePunishment += 1;
        values.countcorrect_IncentivePunishmnet += trial.incentive.correct;

        list.successIncentive_Punishment.insertitem(trial.incentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Analogously for <trial nonincentive>, i.e. update the *nonincentive* count and correct count values there.

Then:

<trial incentive>
...
/ response = timeout(values.targetduration)
/ validresponse = (values.responsekey)
/ correctresponse = (values.responsekey)
...
</trial>

is not valid Inquisit 4 syntax and needs to read

<trial incentive>
...
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ isvalidresponse = [trial.incentive.response == values.responsekey]
/ iscorrectresponse = [trial.incentive.response == values.responsekey]
...
</trial>

instead. Again, you need to change <trial nonincentive> analogously.

Thank you so much Dave, it worked!! But, now the response key (when I press the spacebar after square) it doesn't move on, it doesn't accept the response. I don't know why..I think the problem is below, not sure. I tried but couldn't fix it. I actually want participants to click on mouse (both sides clicks) to respond while they are under EEG.. Is that possible to modify the response??

Thanks in advance

Özge.


<expressions>
/buttoninstruct1 = if (values.responsekey){"SPACE response button which will be located at the bottom of your screen";} else {"<SPACEBAR>";}
/buttoninstruct2 = if (values.responsekey){"response button";} else {"<SPACEBAR>";}
</expressions>


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
The iqx file is attached below.
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 - Thursday, August 16, 2018
The iqx file is attached below.

Just as in the incentive and nonincentive trials,

<trial baseline>
/ ontrialbegin = [
    values.delayduration = list.delay.nextvalue;
    trial.baseline.insertstimulustime(shape.target, values.delayduration);
]
/ validresponse = (values.responsekey)
/ beginresponsetime = values.delayduration
/ ontrialend = [
    trial.baseline.resetstimulusframes();
    list.baselineRT.insertitem(trial.baseline.latency, 1);
]
</trial>

is NOT valid Inquisit 4 syntax. This, then, analogously to the changes in <trial incentive> and <trial nonincentive> ought to read
mo
<trial baseline>
/ ontrialbegin = [
    values.delayduration = list.delay.nextvalue;
    trial.baseline.insertstimulustime(shape.target, values.delayduration);
]
/ isvalidresponse =  [trial.baseline.response == values.responsekey]
/ beginresponsetime = values.delayduration
/ ontrialend = [
    trial.baseline.resetstimulusframes();
    list.baselineRT.insertitem(trial.baseline.latency, 1);
]
</trial>
Attachments
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 - Thursday, August 16, 2018
Ozge - Thursday, August 16, 2018
The iqx file is attached below.

Just as in the incentive and nonincentive trials,

<trial baseline>
/ ontrialbegin = [
    values.delayduration = list.delay.nextvalue;
    trial.baseline.insertstimulustime(shape.target, values.delayduration);
]
/ validresponse = (values.responsekey)
/ beginresponsetime = values.delayduration
/ ontrialend = [
    trial.baseline.resetstimulusframes();
    list.baselineRT.insertitem(trial.baseline.latency, 1);
]
</trial>

is NOT valid Inquisit 4 syntax. This, then, analogously to the changes in <trial incentive> and <trial nonincentive> ought to read
mo
<trial baseline>
/ ontrialbegin = [
    values.delayduration = list.delay.nextvalue;
    trial.baseline.insertstimulustime(shape.target, values.delayduration);
]
/ isvalidresponse =  [trial.baseline.response == values.responsekey]
/ beginresponsetime = values.delayduration
/ ontrialend = [
    trial.baseline.resetstimulusframes();
    list.baselineRT.insertitem(trial.baseline.latency, 1);
]
</trial>

Thank you very much Dave!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search