The Total Duration of a Concatenated Response
Hello, I hope all is well with everyone.
I used to receive a great support from this forum, and I successfully ran my experiment. Thank you so much again. (https://forum.cogsci.nl/discussion/7909/sort-the-concatenated-response-and-compare-it-to-the-answer#latest)
I need to find out the total response time of my concatenated there responses (which means the time between the first key stroke ("response_time_problem_solving_keyboard") and to the end of the third key stroke(which I don't know the name of the variable!). As I was making the script, I had inserted an empty "final_RT" after receiving the three concatenated answers to measure the time, so on my datasheet, I have "time_final_RT," but this shows an accumulated time across trials, so I cannot use it to analyse to measure the total response time. Is there any way that I can measure the total response time to choose three cards? I suspect it should be either "time_tracking_problem_solving" or "time_final_RT." I don't know which is correct. Could you see the script and tell me which will be more appropriate? Thank you!
OSF (partial) https://www.dropbox.com/s/mxw7yzvkxcyjif4/Finding%20RT.osexp.zip?dl=0
Datafile (partial) https://www.dropbox.com/s/fmsdi2gngaie84s/con%20%284%29.csv?dl=0
Comments
Hi @Soan,
I had a quick look at your task. the simplest way to implement this, is to take a time stamp before the the problem is presented and then again right after the problem is solved.
I searched a little and found that in Javascript you can use
performance.now
to get a time stamp in ms.So you can set up a time stamp, let's call it
startTime
in thetrack_problem_solving
inline object, executing it only when the first response has been registered:That way, the timer starts from the first response.
Then another time stamp, let's call it
endTime
right after the problem's been solved:You can calculate the difference between endTime and startTime and you'll have the time it took from first response to the third (including the time corresponding to possible backspace responses etc.).
Note that if you wanted to measure the total time from the presentation of the problem to the third response, you'0d simply have to place the
vars.startTime = performance.now()
code into thesetup_problem_solving
inline object (that is, right before the problem is presented).You can download my modification here: https://www.dropbox.com/s/ucbs0ubfu0aaant/Finding%20RT%20Fab.osexp?dl=0
Have a look to see if it does what you want.
Best,
Fabrice.
Thank you so much, Fabrice! (I've sent you a coffee)
It was exactly what I needed, but I already ran the experiment. I think I can utilize your code in my follow-up experiment soon. Thank you so much again.
For the current experiment, I want to know what "time_tracking_problem_solving", means. Could you explain what "time" is?
I have the information on every variable, and I'm looking for the one that I can use to compare the duration of choosing the three cards between my two groups of subjects.
I'm wondering if I can use the value of "time_tracking_problem_solving", but I don't know what the value means, which accumulates like this:
1 312562.00
2 343259.00
3 354860.00
4 368776.00
5 381692.00
As I calculated the difference between the rows, it goes like this. It seems like the total duration of the three responses (I gave them 30,000ms to solve each problem.)
1 NaN
2 30697.00
3 11601.00
4 13916.00
5 12916.00
I look forward to your response. Thank you.
Hi @Soan,
Many thanks for the coffee; much appreciated! :)
To answer your question, the "Time_" prefix of an object corresponds to the time stamp of the onset of that object. the time stamp is a record of the computer internal time clock in ms. So, "time_tracking_problem_solving" would be the time when the "tracking_problem_solving" object was last executed before the logger registered it. That event would be executed every time the "problem:seq" sequence runs, so the time stamp showing in the data log would correspond to the last time the "tracking_problem_solving" code was executed,. which would be after the third response is registered. So, computing the difference between these values from one row to the previous would not give you the total time it took for participants to produce their responses in a trial, but rather it corresponds to the time that passed between the processing of the last response in trial t and the processing of the last response in trial t+1.
To get an estimate of the total time participants took to produce all of their response in a trial, what you can do is to compare the time stamp for "setup_problem_solving" (which runs right before the problem is displayed) and the time stamp of "sort_problem_solving" (which runs right after the third response is registered). This would be an estimate because the computer will take a few ms to actually execute the code, but this would be fairly constant across trials and subjects and reliable enough to analyze your already collected data.
I attach your partial data set file with some annotations to illustrate it.
For this illustration, I inserted the difference in a column below the data set, but you should just add it to an extra column in your data set, so that you can process your data more easily (for example, using pivot tables).
Excel file:
Hope this helps,
Fabrice.
Thank you so much!!! You've solved my issue. Sent you a coffee!
Hi @Soan,
Glad I could be of help. Many thanks for the ☕️! Much appreciated! 😀
Good luck with your experiment,
Fabrice.