Part of reaction time data missing for some participants

URL of experiment: Sign in · GitLab

Description of the problem: We have finished running this experiment, and have collected data for over 300 participants. The experiment consists of 10 blocks, with each block consisting of a go/no-go or approach-avoidance task, collecting response time data. For only 20 of the participants, one of the blocks does not have any reaction time data. The key.rt variable for that block is missing from the csv file. The other variables related to that keyboard component (key.corr, key.keys) are there, just the .rt variable is not. Again, this only occured for 20 participants, and only for one block of trials (either the first or second block of the experiment). Also, these were not 20 participants who took it in a row; these data files are spread out from when participants first began taking the experiment to close to the end of data collection.

Any ideas what may have caused this? Also, and more importantly, is it possible to recover RT data from .log data files?

Thank you!
Daniel

Hey Daniel,

Sorry to hear about your problem. In previous cases I’ve seen this is often due to the participant showing some kind of unexpected behavior that in turn made the experiment act differently that you expected. I would like to take a look at your repo if that’s OK, just to see if I can find anything suspicious. My gitlab username is tpronk. Searching for experiments on Pavlovia — PsychoPy v2021.2

Cheers, Thomas

Hi Thomas,

Thank you for your reply! I’ve gone ahead and added you to the experiment.

In terms of what to do moving forward, I located the log files associated with the problematic csv data files, and it seems that all of the necessary information to calculate RTs (the time stamps associated with each image presentation and keyboard press) for those trials were indeed recorded. The problem thus appears to be isolated to the csv data files only.

With that said, do you know of any efficient way to load the data from the log file into csv format (ultimately, that data needs to be inputted into SPSS)? I know a bit of python/pandas, and have been trying to do it that way, but perhaps there is an easier way to go about it?

Thanks again!
Daniel

Hi again!

I did some further digging, and found this script (No csv file saved - scrape log file) that I can modify for my purposes.

However, I also came across this old thread from January (Response Times in Log Files, Key Press vs. Release, and EXP log messages) that notes how the RTs computed from the log file do not exactly match the RTs in the csv files. Since I have the complete data for most of my participants, I worry that computing the RTs from the log files for only a few participants would introduce systematic error for those participants only, which could in turn affect the analyses when looking at all of the combined data.

Do you have any suggestions for how to proceed?

Thank you,
Daniel

Excellent work! I don’t really have a solution for eliminating this difference, but I could make a case for why this difference might not be an issue: Following rkempner’s reasoning, you don’t get the RT of when the key is pressed, but that of the next refresh after the key is pressed. This has two consequences:

  1. On average your RTs will be about 8 ms longer. If you are scoring tasks as the difference between the mean RTs of two or more conditions, this systematic difference is subtracted out. See Mental chronometry in the pocket? Timing accuracy of web applications on touchscreen and keyboard devices - PubMed
  2. The RTs will be quantized in multiples of 16 ms. This also doesn’t affect your stats very much. See the refs in my paper above, my favorite being “Good New for Bad Clocks”. https://bpspsychub.onlinelibrary.wiley.com/doi/abs/10.1111/j.2044-8317.1989.tb01111.x

Thanks so much again for your help with this!

1 Like

I am going through the same issue right now. But I don’t know how to extract button press information from the log files. I noticed that it took these participants abnormally long to finish the task. I contacted one of them and they told me that their screen locked during the task, but didn’t elaborate on what that meant for the experiment. Weirdly enough the space bar press was recorded. One participant got really agitated with me when I said that I can’t accept their data due to no left or right arrow key presses being recorded, so I want to see if they have been pressing other buttons. However, I don’t know how to do this.