Millisecond Forums

Response time and average response time

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

By wuaham - 2/7/2024

Hello, I need a bit of help on how to find response time and average response time.

That is, after presenting the stimuli, I would like to know how long time subject took to response and after all stimuli presentations would like know average response time. A small caveat is that if subject do mistakes, I display a message (using /branch) which consumes about 800ms.
To show average response, I would like not to count the time consumed (due to mistake) into my average response time.

What script I need to add into my trial (may be in /ontrialend?)

Would appreciate any help.
Thank you in advance.
By Dave - 2/7/2024

wuaham - 2/7/2024
Hello, I need a bit of help on how to find response time and average response time.

That is, after presenting the stimuli, I would like to know how long time subject took to response and after all stimuli presentations would like know average response time. A small caveat is that if subject do mistakes, I display a message (using /branch) which consumes about 800ms.
To show average response, I would like not to count the time consumed (due to mistake) into my average response time.

What script I need to add into my trial (may be in /ontrialend?)

Would appreciate any help.
Thank you in advance.

Provide runnable example code that faithfully represents your setup, then your question can be answered. As it is, it is too generic to be answerable.

As a general matter, the latency property of the trial in which the response occured reflects response time in the current trial. (That you may /branch to some other trial after that does not matter). To calculate average response time, you can add the latency to a <list> /ontrialend and the list's mean property gives you the average of all latencies that were added to it.
By wuaham - 2/8/2024

Dave - 2/7/2024
wuaham - 2/7/2024
Hello, I need a bit of help on how to find response time and average response time.

That is, after presenting the stimuli, I would like to know how long time subject took to response and after all stimuli presentations would like know average response time. A small caveat is that if subject do mistakes, I display a message (using /branch) which consumes about 800ms.
To show average response, I would like not to count the time consumed (due to mistake) into my average response time.

What script I need to add into my trial (may be in /ontrialend?)

Would appreciate any help.
Thank you in advance.

Provide runnable example code that faithfully represents your setup, then your question can be answered. As it is, it is too generic to be answerable.

As a general matter, the latency property of the trial in which the response occured reflects response time in the current trial. (That you may /branch to some other trial after that does not matter). To calculate average response time, you can add the latency to a <list> /ontrialend and the list's mean property gives you the average of all latencies that were added to it.

Thank you Dave – that’s a good idea, I have implemented it by adding the latency and after end of block I will display the result to the subject. I will post a question along with the implementation on the script that you supported earlier.

Have a great day.