+x+x+xInquisit does not record <data> for a trial in which no response was made. This happens when my trial has multiple responses and includes /responsemessage and /stop criteria. If I change the /stop criteria to /trialduration, I can get the <data> to record all the trials but this trial only shows the /responsemessage for the first response and not the subsequent responses. How do I record a row in <data> for a trial which allows multiple responses and has the /stop criteria, but a participant chooses not to respond in that trial?
You can do
<block myblock>
/ trials = [1=mytrial]
</block>
<values>
/ n_responses = 0
/ rt = 0
/ prev_rt = 0
/ diff_rt = 0
</values>
<trial mytrial>
/ ontrialbegin = [
values.n_responses = 0;
values.rt = 0;
values.prev_rt = 0;
values.diff_rt = 0;
]
/ ontrialend = [
if (trial.mytrial.response == 0);
values.n_responses = 0;
]
/ stop = [
trial.mytrial.latency >=10000;
]
/ trialduration = 10000
/ stimulustimes = [0=clearscreen,mytext]
/ validresponse = ("E", "I")
/ isvalidresponse = [
if (trial.mytrial.responsetext == "E" || trial.mytrial.responsetext == "I"){
values.n_responses += 1;
values.rt = trial.mytrial.latency;
values.diff_rt = values.rt - values.prev_rt;
values.prev_rt = values.rt;
true;
}
]
/ responsemessage = ("E", Epress, 100)
/ responsemessage = ("I", Ipress, 100)
</trial>
<text mytext>
/ items = ("Press the E and I keys. You have 10 seconds.")
/ erase = false
</text>
<text Epress>
/ items = ("Pressed E")
/ position = (50%, 90%)
</text>
<text Ipress>
/ items = ("Pressed I")
/ position = (50%, 90%)
</text>
<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency values.diff_rt values.n_responses)
</data>
for example
I tried having a
/ontrialend = [
if (trial.mytrial.response == 0);
values.n_responses = 0;
]
in the trial and values.n_responses in <data>, but it did not add a row in the output for when the trial had no responses.
What code are you running? What I gave you above, i.e.
<block myblock>
/ trials = [1=mytrial]
</block>
<values>
/ n_responses = 0
/ rt = 0
/ prev_rt = 0
/ diff_rt = 0
</values>
<trial mytrial>
/ ontrialbegin = [
values.n_responses = 0;
values.rt = 0;
values.prev_rt = 0;
values.diff_rt = 0;
]
/ ontrialend = [
if (trial.mytrial.response == 0);
values.n_responses = 0;
]
/ stop = [
trial.mytrial.latency >=10000;
]
/ trialduration = 10000
/ stimulustimes = [0=clearscreen,mytext]
/ validresponse = ("E", "I")
/ isvalidresponse = [
if (trial.mytrial.responsetext == "E" || trial.mytrial.responsetext == "I"){
values.n_responses += 1;
values.rt = trial.mytrial.latency;
values.diff_rt = values.rt - values.prev_rt;
values.prev_rt = values.rt;
true;
}
]
/ responsemessage = ("E", Epress, 100)
/ responsemessage = ("I", Ipress, 100)
</trial>
<text mytext>
/ items = ("Press the E and I keys. You have 10 seconds.")
/ erase = false
</text>
<text Epress>
/ items = ("Pressed E")
/ position = (50%, 90%)
</text>
<text Ipress>
/ items = ("Pressed I")
/ position = (50%, 90%)
</text>
<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency values.diff_rt values.n_responses)
</data>
should produce a data file just fine in case of no response: