Millisecond Forums

Changing recorded response time in Parametric Go/No Go Task

https://forums.millisecond.com/Topic21106.aspx

By EHP Lab - 3/15/2017

Hi,

I am using the parametric go/no go script from the library and I noticed that responses that come anytime after the initial 500 ms during which the target letter is presented are counted as incorrect. So even if a participant hits the spacebar 10 ms into the next letter, it doesn't count as a correct response for the target. The original parametric go/no go did count responses that came in the first part of the next letter following a target. Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter? 

Thanks!
Amie


P.S. I discovered that the syntax for the trial element for the practice for 2TB (2 targets, context) in the script from the library does not provide participants with an opportunity to inhibit their response to a target letter presented two times in a row. I couldn't find the problem that prevented it from showing up, the syntax looked correct, but it definitely wasn't working right so I ended up copying the syntax from the practice for Level 3TB and amending it to be appropriate for Level 2tb and that fixed the problem. So I have no idea what was wrong but if you want to adjust it, here is the syntax I am using:

<trial practice_2TB>
/ontrialbegin = [values.stimulus = list.lettersequence_practice2Tb.nextvalue]

/ontrialbegin = [if (values.stimulus != "s" && values.stimulus != "r") values.trialtype = 1]
/ontrialbegin = [if (values.stimulus == "s" || values.stimulus == "r") values.trialtype = 2]
/ontrialbegin = [if (values.previoustarget!= "" && values.stimulus == values.previoustarget) values.trialtype = 3]

/ontrialbegin = [if (values.previoustarget == "") text.inhibitWMsetB.textcolor = white else text.inhibitWMsetB.textcolor = red]
/ontrialbegin = [if (values.trialtype == 2) {trial.practice_2TB.insertstimulustime(text.responsekeyA, 0)}]
/ontrialbegin = [if (values.trialtype == 3) {trial.practice_2Tb.insertstimulustime(text.responsekeyB, 0)}]

/ontrialbegin = [trial.practice_2TB.insertstimulustime(clearscreen, parameters.stimulusduration_practice)]
/ontrialend = [trial.practice_2TB.resetstimulusframes()]

/stimulustimes = [0 = stimulus, inhibitWMsetB]
/validresponse = (parameters.responsekey)
/iscorrectresponse = [(values.trialtype == 2 && trial.practice_2TB.response == parameters.responsekey) ||
(values.trialtype != 2 && trial.practice_2TB.response == 0)]
/monkeyresponse = (0, 57)
/responseinterrupt = frames
/beginresponsetime = 0

/ontrialend = [if (values.trialtype == 2) values.previoustarget = values.stimulus]
/trialduration = (parameters.stimulusduration_practice + parameters.isi)
/branch = [if (trial.practice_2Tb.correct && (values.trialtype == 2 || values.trialtype == 3)) {values.feedbackselect = 1; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype == 2) {values.feedbackselect = 2; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype != 2) {values.feedbackselect = 3; trial.practicefeedback}]
/recorddata = true
</trial>

By Dave - 3/15/2017

EHP Lab - Wednesday, March 15, 2017
Hi,

I am using the parametric go/no go script from the library and I noticed that responses that come anytime after the initial 500 ms during which the target letter is presented are counted as incorrect. So even if a participant hits the spacebar 10 ms into the next letter, it doesn't count as a correct response for the target. The original parametric go/no go did count responses that came in the first part of the next letter following a target. Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter? 

Thanks!
Amie


P.S. I discovered that the syntax for the trial element for the practice for 2TB (2 targets, context) in the script from the library does not provide participants with an opportunity to inhibit their response to a target letter presented two times in a row. I couldn't find the problem that prevented it from showing up, the syntax looked correct, but it definitely wasn't working right so I ended up copying the syntax from the practice for Level 3TB and amending it to be appropriate for Level 2tb and that fixed the problem. So I have no idea what was wrong but if you want to adjust it, here is the syntax I am using:

<trial practice_2TB>
/ontrialbegin = [values.stimulus = list.lettersequence_practice2Tb.nextvalue]

/ontrialbegin = [if (values.stimulus != "s" && values.stimulus != "r") values.trialtype = 1]
/ontrialbegin = [if (values.stimulus == "s" || values.stimulus == "r") values.trialtype = 2]
/ontrialbegin = [if (values.previoustarget!= "" && values.stimulus == values.previoustarget) values.trialtype = 3]

/ontrialbegin = [if (values.previoustarget == "") text.inhibitWMsetB.textcolor = white else text.inhibitWMsetB.textcolor = red]
/ontrialbegin = [if (values.trialtype == 2) {trial.practice_2TB.insertstimulustime(text.responsekeyA, 0)}]
/ontrialbegin = [if (values.trialtype == 3) {trial.practice_2Tb.insertstimulustime(text.responsekeyB, 0)}]

/ontrialbegin = [trial.practice_2TB.insertstimulustime(clearscreen, parameters.stimulusduration_practice)]
/ontrialend = [trial.practice_2TB.resetstimulusframes()]

/stimulustimes = [0 = stimulus, inhibitWMsetB]
/validresponse = (parameters.responsekey)
/iscorrectresponse = [(values.trialtype == 2 && trial.practice_2TB.response == parameters.responsekey) ||
(values.trialtype != 2 && trial.practice_2TB.response == 0)]
/monkeyresponse = (0, 57)
/responseinterrupt = frames
/beginresponsetime = 0

/ontrialend = [if (values.trialtype == 2) values.previoustarget = values.stimulus]
/trialduration = (parameters.stimulusduration_practice + parameters.isi)
/branch = [if (trial.practice_2Tb.correct && (values.trialtype == 2 || values.trialtype == 3)) {values.feedbackselect = 1; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype == 2) {values.feedbackselect = 2; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype != 2) {values.feedbackselect = 3; trial.practicefeedback}]
/recorddata = true
</trial>


> Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter
> (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter?

No, I'm afraid there is not.
By EHP Lab - 3/15/2017

Dave - Wednesday, March 15, 2017
EHP Lab - Wednesday, March 15, 2017
Hi,

I am using the parametric go/no go script from the library and I noticed that responses that come anytime after the initial 500 ms during which the target letter is presented are counted as incorrect. So even if a participant hits the spacebar 10 ms into the next letter, it doesn't count as a correct response for the target. The original parametric go/no go did count responses that came in the first part of the next letter following a target. Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter? 

Thanks!
Amie


P.S. I discovered that the syntax for the trial element for the practice for 2TB (2 targets, context) in the script from the library does not provide participants with an opportunity to inhibit their response to a target letter presented two times in a row. I couldn't find the problem that prevented it from showing up, the syntax looked correct, but it definitely wasn't working right so I ended up copying the syntax from the practice for Level 3TB and amending it to be appropriate for Level 2tb and that fixed the problem. So I have no idea what was wrong but if you want to adjust it, here is the syntax I am using:

<trial practice_2TB>
/ontrialbegin = [values.stimulus = list.lettersequence_practice2Tb.nextvalue]

/ontrialbegin = [if (values.stimulus != "s" && values.stimulus != "r") values.trialtype = 1]
/ontrialbegin = [if (values.stimulus == "s" || values.stimulus == "r") values.trialtype = 2]
/ontrialbegin = [if (values.previoustarget!= "" && values.stimulus == values.previoustarget) values.trialtype = 3]

/ontrialbegin = [if (values.previoustarget == "") text.inhibitWMsetB.textcolor = white else text.inhibitWMsetB.textcolor = red]
/ontrialbegin = [if (values.trialtype == 2) {trial.practice_2TB.insertstimulustime(text.responsekeyA, 0)}]
/ontrialbegin = [if (values.trialtype == 3) {trial.practice_2Tb.insertstimulustime(text.responsekeyB, 0)}]

/ontrialbegin = [trial.practice_2TB.insertstimulustime(clearscreen, parameters.stimulusduration_practice)]
/ontrialend = [trial.practice_2TB.resetstimulusframes()]

/stimulustimes = [0 = stimulus, inhibitWMsetB]
/validresponse = (parameters.responsekey)
/iscorrectresponse = [(values.trialtype == 2 && trial.practice_2TB.response == parameters.responsekey) ||
(values.trialtype != 2 && trial.practice_2TB.response == 0)]
/monkeyresponse = (0, 57)
/responseinterrupt = frames
/beginresponsetime = 0

/ontrialend = [if (values.trialtype == 2) values.previoustarget = values.stimulus]
/trialduration = (parameters.stimulusduration_practice + parameters.isi)
/branch = [if (trial.practice_2Tb.correct && (values.trialtype == 2 || values.trialtype == 3)) {values.feedbackselect = 1; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype == 2) {values.feedbackselect = 2; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype != 2) {values.feedbackselect = 3; trial.practicefeedback}]
/recorddata = true
</trial>


> Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter
> (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter?

No, I'm afraid there is not.

Is there a difficult way to do this? Or is there no way to do the parametric go/no go like the original version and record a response even after the next letter appears? Is this true of all go/no go scripts in inquisit?

Thank you!
Amie
By Dave - 3/15/2017

EHP Lab - Wednesday, March 15, 2017
Dave - Wednesday, March 15, 2017
EHP Lab - Wednesday, March 15, 2017
Hi,

I am using the parametric go/no go script from the library and I noticed that responses that come anytime after the initial 500 ms during which the target letter is presented are counted as incorrect. So even if a participant hits the spacebar 10 ms into the next letter, it doesn't count as a correct response for the target. The original parametric go/no go did count responses that came in the first part of the next letter following a target. Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter? 

Thanks!
Amie


P.S. I discovered that the syntax for the trial element for the practice for 2TB (2 targets, context) in the script from the library does not provide participants with an opportunity to inhibit their response to a target letter presented two times in a row. I couldn't find the problem that prevented it from showing up, the syntax looked correct, but it definitely wasn't working right so I ended up copying the syntax from the practice for Level 3TB and amending it to be appropriate for Level 2tb and that fixed the problem. So I have no idea what was wrong but if you want to adjust it, here is the syntax I am using:

<trial practice_2TB>
/ontrialbegin = [values.stimulus = list.lettersequence_practice2Tb.nextvalue]

/ontrialbegin = [if (values.stimulus != "s" && values.stimulus != "r") values.trialtype = 1]
/ontrialbegin = [if (values.stimulus == "s" || values.stimulus == "r") values.trialtype = 2]
/ontrialbegin = [if (values.previoustarget!= "" && values.stimulus == values.previoustarget) values.trialtype = 3]

/ontrialbegin = [if (values.previoustarget == "") text.inhibitWMsetB.textcolor = white else text.inhibitWMsetB.textcolor = red]
/ontrialbegin = [if (values.trialtype == 2) {trial.practice_2TB.insertstimulustime(text.responsekeyA, 0)}]
/ontrialbegin = [if (values.trialtype == 3) {trial.practice_2Tb.insertstimulustime(text.responsekeyB, 0)}]

/ontrialbegin = [trial.practice_2TB.insertstimulustime(clearscreen, parameters.stimulusduration_practice)]
/ontrialend = [trial.practice_2TB.resetstimulusframes()]

/stimulustimes = [0 = stimulus, inhibitWMsetB]
/validresponse = (parameters.responsekey)
/iscorrectresponse = [(values.trialtype == 2 && trial.practice_2TB.response == parameters.responsekey) ||
(values.trialtype != 2 && trial.practice_2TB.response == 0)]
/monkeyresponse = (0, 57)
/responseinterrupt = frames
/beginresponsetime = 0

/ontrialend = [if (values.trialtype == 2) values.previoustarget = values.stimulus]
/trialduration = (parameters.stimulusduration_practice + parameters.isi)
/branch = [if (trial.practice_2Tb.correct && (values.trialtype == 2 || values.trialtype == 3)) {values.feedbackselect = 1; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype == 2) {values.feedbackselect = 2; trial.practicefeedback}]
/branch = [if (trial.practice_2Tb.error && values.trialtype != 2) {values.feedbackselect = 3; trial.practicefeedback}]
/recorddata = true
</trial>


> Is there a way to easily edit the inquisit script so that a response presented in the first half of the next letter
> (so the first 250 ms of letter following a target letter) is counted as a correct response for the target letter?

No, I'm afraid there is not.

Is there a difficult way to do this? Or is there no way to do the parametric go/no go like the original version and record a response even after the next letter appears? Is this true of all go/no go scripts in inquisit?

Thank you!
Amie

> Is there a difficult way to do this?

Maybe. Not trying to evade an answer, it just depends on a lot of factors. What is true is that something like this is not straightforward to implement given Inquisit's programming model: When a <trial>, say a "target" or "go" trial is over, it is over. It cannot collect any response after it has terminated / when the next trial has already started, and it cannot retroactively reclassify the response it received (if any). So, doing this would involve some elaborate logic to keep track of whatever kind of trial preceded the *currently running* trial, and the currently running trial would then have to classify *its* response as either "belonging" to the previous trial or itself.