{"id":279,"date":"2018-12-05T12:00:55","date_gmt":"2018-12-05T10:00:55","guid":{"rendered":"http:\/\/benediktehinger.de\/blog\/science\/?p=279"},"modified":"2018-12-01T12:32:14","modified_gmt":"2018-12-01T10:32:14","slug":"no-evidence-for-periodicity-in-reaction-time-histograms","status":"publish","type":"post","link":"https:\/\/benediktehinger.de\/blog\/science\/no-evidence-for-periodicity-in-reaction-time-histograms\/","title":{"rendered":"No evidence for periodicity in reaction time histograms"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>In my last lab we discussed findings on the periodicity of reaction times (e.g. referred in Van Rullen 2003). These studies are usually old (Starting with Harter 1968, P\u00f6ppel 1968), with small N and not many trials. There was also a extensive discussion in the Max-Planck Journal &#8220;Naturwissenschaften&#8221; in the 90s (mostly in German, e.g. Vorberg &amp; Schwarz 1987). A methodological critique is from Vorberg &amp; Schwarz 1987. More discussion in Gregson (Gregson, Vorberg, Schwarz 1988). A new method to analyse periodicity is proposed by Jokeit 1990.<\/p>\n<p>This is the newest research I could find on this topic.<\/p>\n<p>&nbsp;<\/p>\n<h3>Analysing a large corpus of RT-data<\/h3>\n<p>I stumbled upon a large reaction time dataset (816 subjects, \u00e1 3370 trials, 2.3 million RTs)\u00a0 from the English Lexicon Project (Balota et al 2007) and decided to look for these oscillations in reaction times .<\/p>\n<p><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/histogramRT.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-286 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/histogramRT-300x263.png\" alt=\"\" width=\"300\" height=\"263\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/histogramRT-300x263.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/histogramRT-768x674.png 768w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/histogramRT.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After outlier correction (3*mad rule, see below), I applied a fourier-transformation on the histogram (1ms bins, accuracy of RT=1ms). Then I looked for peaks in the spectrum which are consistent over subjects.<\/p>\n<p><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/Rplot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-283 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/Rplot-300x125.png\" alt=\"\" width=\"300\" height=\"125\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/Rplot-300x125.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/Rplot-768x319.png 768w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/Rplot.png 998w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Each subject is one line, no effect is visible here (in a log-scaled y-axis also no effect can be seen). The range (above ~7Hz) of the subject variance is roughly between +0 and 100<\/p>\n<p>&nbsp;<\/p>\n<p>The following graph summarizes\u00a0 the above graph (blue-smoother-curve = loess, span=0.1, each dot = mean over 800 subjects)):<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/spectrum_zoom.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-282 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/spectrum_zoom-300x220.png\" alt=\"\" width=\"300\" height=\"220\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/spectrum_zoom-300x220.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/spectrum_zoom.png 675w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>There are no peaks in the spectrum which I consider as consistent over subjects. I included higher frequencies (up to 250Hz) to get a visual estimate of the noise level (at such high frequencies, an effect seems utterly implausible). But of course, I&#8217;m ignoring\u00a0 within subject information (i.e. a mixed model of some sort could be appropriate).<\/p>\n<h3>Conclusions<\/h3>\n<p>In this large dataset, I cannot find periodicities of reaction time.<\/p>\n<h3>Disclaimer<\/h3>\n<p>My approach may be too naive. I&#8217;m looking for more powerful ways to analyse these data. If you have an idea please leave a comment! I&#8217;m also not suggesting that the effects e.g. in P\u00f6ppels data are not real. Maybe there is a mistake in my analysis, I don&#8217;t know the data by heart, it might depend on the task employed &#8230;<\/p>\n<h3>Thoughts<\/h3>\n<p>I had results like in Jokeit 1990 (but with 50Hz not with 100Hz), when I was using a bin-width of 5ms to 10ms bins.\u00a0 The peak (in the figure with 6ms bins =&gt; 150hz) shifted depending on bin-size. I&#8217;m not perfectly sure, but I think it has to do with how integers are binned. In any case, if the effect is real and not an artefact of bin-width, it has to show up also with higher bin-sizes. Please note that Jokeit 1990 used a different methodology, he calculated the FFT on the histogram of reaction time **differences**.<\/p>\n<p><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/binproblem.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-284 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/binproblem-300x220.png\" alt=\"\" width=\"300\" height=\"220\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/binproblem-300x220.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/binproblem.png 675w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/jokeit1990.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-287 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/jokeit1990-300x213.png\" alt=\"\" width=\"300\" height=\"213\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/jokeit1990-300x213.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2018\/01\/jokeit1990.png 602w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I tried to use density estimates, but so far failed to get better results.<\/p>\n<h3>Outlier plot<\/h3>\n<p><a href=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/outlier.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-281 aligncenter\" src=\"http:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/outlier-300x220.png\" alt=\"\" width=\"300\" height=\"220\" srcset=\"https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/outlier-300x220.png 300w, https:\/\/benediktehinger.de\/blog\/science\/upload\/sites\/2\/2017\/12\/outlier.png 675w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Percentage of trials marked as outliers. This is well in the recommended range of 10% (Ratcliff).<\/p>\n<h3>References<\/h3>\n<p>Bolota, D.A., Yap, M.J., Cortese, M.J., Hutchison, K.A., Kessler, B., Loftis, B., Neely, J.H., Nelson, D.L., Simpson, G.B., &amp; Treiman, R. (2007). The English Lexicon Project. Behavior Research Methods, 39, 445-459. &#8211; http:\/\/elexicon.wustl.edu\/about.asp<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">library(ggplot2)\r\nlibrary(dplyr)\r\ntheme_set(theme_minimal(20))\r\nd = rbind(read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_1to100.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_101to200.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_201to300.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_301to400.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_401to500.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_501to600.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_601to700.csv',header=T),\r\n      read.table('C:\\\\Users\\\\behinger\\\\cloud\\\\PhD\\\\exercises\\\\reactiontimes\\\\elexicon_701toend.csv',header=T))\r\n\r\nd$Sub_ID = factor(d$Sub_ID)\r\nd$D_RT = as.integer(d$D_RT)\r\n\r\n# 3*mad outlier correction\r\nd = d%&gt;%group_by(Sub_ID)%&gt;%mutate(outlier = abs(D_RT-median(D_RT))&gt;3*mad(D_RT,na.rm = T))\r\nd$outlier[d$D_RT&lt;1] = TRUE\r\nd$outlier[is.na(d$D_RT)] = TRUE\r\n\r\n# outlier plot\r\nggplot(d%&gt;%group_by(Sub_ID)%&gt;%summarise(outlier=mean(outlier)),aes(x=outlier))+geom_histogram(binwidth = 0.001)\r\n\r\n\r\nfft_on_hist = function (inp){\r\n  maxT = 4\r\n  minT = 0\r\n  fs = 1000\r\n  \r\n  \r\n  h = hist(inp$D_RT,breaks = 1000*seq(minT,maxT,1\/fs),plot = F)\r\n  h = h$counts;\r\n  \r\n  # I tried to use density estimates instead of histograms, but it was difficult\r\n  #h = density(inp$D_RT,from = minT,to=4000,n=4000)\r\n  #h = h$y\r\n  f = fft(h)\r\n  f = abs(f[seq(1,length(f)\/2)])\r\n  \r\n  return(data.frame(power = f, freq = seq(0,fs\/2-1\/maxT,1\/maxT)))\r\n}\r\n\r\n\r\nd_power = d%&gt;%subset(outlier==F)%&gt;%group_by(Sub_ID)%&gt;%do(fft_on_hist(.))\r\n\r\nggplot(d_power,aes(x=freq,y=(power),group=Sub_ID))+geom_path(alpha=0.01)\r\nggplot(d_power,aes(x=freq,y=log10(power)))+geom_path(alpha=0.01)\r\n\r\nggplot(d_power%&gt;%group_by(freq)%&gt;%summarise(power=mean(power)),aes(x=freq,y=(power)))+geom_point()+stat_smooth(method='loess',span=0.1,se=F,size=2)+xlim(c(10,250))+ ylim(c(47,53))\r\n\r\n\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In my last lab we discussed findings on the periodicity of reaction times (e.g. referred in Van Rullen 2003). These studies are usually old (Starting with Harter 1968, P\u00f6ppel 1968), with small N and not many trials. There was also a extensive discussion in the Max-Planck Journal &#8220;Naturwissenschaften&#8221; in the 90s (mostly in German, e.g. Vorberg &amp; Schwarz 1987). A methodological critique is from Vorberg &amp; Schwarz 1987. More discussion in Gregson (Gregson, Vorberg, Schwarz 1988). A new method to analyse periodicity is proposed by Jokeit 1990. This is the newest research I could find on this topic. &nbsp;&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-279","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/comments?post=279"}],"version-history":[{"count":0,"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"wp:attachment":[{"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benediktehinger.de\/blog\/science\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}