Millisecond Forums

Using errorstreak for slow responses ?

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

By abhi - 1/26/2014

Hi,

/ responsemessage = (noresponse, warning, 500)
can I use errorstreak to display a message 'Too slow' only when subjects respond slowly for 3 consecutive trials.

I saw in help- there is one answer for incorrect responses. But can it done for slow responses  ?


Thanks 

Abhi



By Dave - 1/26/2014

No, you cannot use errorstreak unless you programmatically consider slow responses as errors. You will want to use <values> to keep track of consecutive "too slow" responses (whatever that may mean concretely) and then /branch to a feedback <trial> if appropriate.
By abhi - 1/27/2014

Thanks Dave,

Tried writing values element, but couldn't do it.

Can you please help with an example ?

Lets say 600 ms is the ideal time to respond. And a message is displayed if subject is slow on three consecutive times .

Thanks

Abhi



By Dave - 1/27/2014

<values>
/ slowrespcount = 0
</values>

<block myblock>
/ trials = [1-20 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [if (trial.mytrial.latency >= 600) values.slowrespcount += 1 else values.slowrespcount = 0]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
/ branch = [if (values.slowrespcount >= 3) trial.tooslowtrial]
</trial>

<trial tooslowtrial>
/ ontrialend = [values.slowrespcount = 0]
/ stimulusframes = [1=tooslowtext]
/ trialduration = 500
</trial>

<text mytext>
/ items = ("Press SPACEBAR as quickly as possible.")
</text>

<text tooslowtext>
/ items = ("You're too slow.")
</text>