does not record for a trial when no response was made with /stop criteria


Author
Message
nidhi_desai
nidhi_desai
Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)
Group: Forum Members
Posts: 42, Visits: 274
Inquisit 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?
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
nidhi_desai - 1/26/2021
Inquisit 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



nidhi_desai
nidhi_desai
Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)
Group: Forum Members
Posts: 42, Visits: 274
Dave - 1/27/2021
nidhi_desai - 1/26/2021
Inquisit 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



So is it not recording a row in <data> because non of the values changed in a trial where no response was made compared to the previosu one?
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
nidhi_desai - 1/27/2021
Dave - 1/27/2021
nidhi_desai - 1/26/2021
Inquisit 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



So is it not recording a row in <data> because non of the values changed in a trial where no response was made compared to the previosu one?

It's not recording data in the other case because there is no data to record and the trial does not "know" that it has an implicit timeout due to the stop criterion. The solution is to make the timeout explicit and adjust the stop criterion accordingly (if a trial times out and no response is received, the trial's timeout value is treated as the trial's latency).
nidhi_desai
nidhi_desai
Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)Respected Member (474 reputation)
Group: Forum Members
Posts: 42, Visits: 274
Dave - 1/27/2021
nidhi_desai - 1/26/2021
Inquisit 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.
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
nidhi_desai - 1/27/2021
Dave - 1/27/2021
nidhi_desai - 1/26/2021
Inquisit 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:


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search