Skip to content

Vincentizing Reaction Time data in R

13 messages · Gabriel WEINDEL, John McKown, Daniel Nordlund +4 more

#
Dear all,

For my master thesis, I'm currently working in cognitive neuroscience on 
executive control through measurement of reaction time and I need to get 
my data 'vincentized' with an exclusive use of R set by my statistic 
teacher for a test purpose, for this reason I can't use the python code 
the lab team usually uses.
Despite a dozen hours of research I couldn't find any package or R-code 
which would allow the use of vincentization, that's why I'm querying 
help on the R forum.

So has anyone ever used vincentization in R ?

Best regards,
#
On Wed, May 20, 2015 at 5:13 AM, Gabriel WEINDEL <gabriel.weindel at gmail.com>
wrote:
I haven't. And I failed statistics in school. But a Google search got me to
this page, which I hope might be of some help to you. If not, my apologies.

https://stat.ethz.ch/pipermail/r-help/2003-May/034272.html

  
    
#
John Kane
Kingston ON Canada
I never heard of it either and I passed a couple out of some number > 2 but we always thought the perception and cognition people strange.
I think this paper may be a lead. An email to the authors might help
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4017132/ [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4017132/]
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!
#
John Kane : I already read the paper and wrote an e-mail to the author, 
he used matlab and suggested me to ask this same question on this forum. 
But thank you for your answer.

John McKown : thanks a lot, this could be a great help to me but I have 
to take a closer look.

Again thank you for your replies.

Regards,

--
Gabriel Weindel
Master student in Neuropsychology - Aix-Marseille University (France)



Le 20/05/2015 18:41, John Kane a ?crit :
#
The paper said that they had used R !  They must have forgotten to add what may have been a minor bit of use of mintabl

I had a look at the equation in the Wiki article and I have long ago forgotten how to read such a thing but I wonder how complicated it is as an algorithm?  R is very flexible and it might be fairly easy to just write a function to do it. 

Actually I just had a very quick look at the Ratcliff paper in Psychological Bulletin 1979, Vol. 86, No. 3, 446-461 (http://star.psy.ohio-state.edu/coglab/People/roger/pdf/Papers/psychbull79.pdf)

I am tired and it is not my area of expertise but it does not look too difficult to write a function in R to do this. But I have been wrong before. :)
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
#
On 5/20/2015 6:22 PM, John Kane wrote:
A (very) brief search regarding 'vincentizing' reaction time (RT) 
suggests that it just involves binning the RTs and computing the means 
within bins (typically deciles), then analyzing how the distribution of 
means differs across experimental conditions.  This may help you get 
started.

# create some data
rt <- rnorm(100,200,50)
# create deciles for binning
decile <- as.numeric(cut(rt, quantile(rt,0:10)/10),include.lowest=TRUE))
# collect into a dataframe (not really necessary)
df <- data.frame(rt=rt, decile=decile)
#compute the bin means
aggregate(rt,list(decile),mean,data=df)


This should give you a start,

Dan
#
On Wed, 20 May 2015 18:13:17 +0800,
Hi Gabriel,

As far as I could recall, there isn't an R package that has explicitly implemented "vincentization". You definitively can find some code segments/functions that have implemented "vincentize" on the web. But you should verify if they do exactly what you wish to do.  If you could look at the question from percentile/quantle perspective, it would not take you too much time to realise that they are similar.  I would suggest you to read, as John Kane suggested, Prof. Ratcliff's 1979 paper.  Another paper that may be very helpful is Prof van Zandt's 2000 RT paper.

However, you should be aware that there are some different implementation of "vincentization", and it is debatable, if not problematic, to use it, rather than other more general quantile methods. It would help you to understand not only how to do vincentization, but also why/why not if you could read papers from Jeff Rouder's as well as from Heathcote's and Brown's lab.

Sorry that I hesitate to give you the code, because this looks like part of your course works.  It would be more rewarding for you, if you could figure out by yourself.

Yishin
Gabriel WEINDEL wrote:
#
I have one more suggestion:
Consult a local statistician. Psychology, neuroscience (and a host of
other professions that I have encountered) are full of bad statistical
practice and reinvention of wheels. "Vincentizing" sounds suspiciously
like such an example. A statistician could help you sort it out and
either validate the methodology or point you to equivalent more
standard versions (and R packages or functions that might implement
them) or other better alternatives.

Psychology and neuroscience are in particular undergoing public soul
searching regarding their research methodology and the
irreproducibility of many of their published results. Don't add to the
problem: get help from someone local with the necessary statistical
expertise.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Wed, May 20, 2015 at 1:31 PM, Gabriel WEINDEL
<gabriel.weindel at gmail.com> wrote:
#
In line

John Kane
Kingston ON Canada
While I agree the exercise is likely to be a good learning experience I don't see this as the equivalent of course work. 

If Gabriel (the OP) was tasked with implementing  "vincentization" in R then, strictly speaking it is course work but if I understand him the requirement is to do his work in R rather than Minitab.  If such a function existed in an existing R package than he could have simply plugged in the numbers et voil?, done.

The tenor of the question did not suggest this and it would require the stats instructor to know that there was no  "vincentization" function anywhere among the, what, a thousand or so packages? And if the OP was working on his own data as part of the course then the instructor might have little or no idea of exactly what functions are needed

The course  strikes me more as an effort to get psychologists away from SPSS which often seems to be the only software package anyone knows.
____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
#
Bert : Thank you for your advice, it would be a little bit difficult to 
do it for my master thesis but, if I want to go further with a PhD 
thesis (and I do want), I would probably follow your advice and get in 
touch with a statistician.

Yishin : Thank you very much for the references, I will definitively
read the papers you quote. I'm already a little bit aware of the misuses
possible with the vincentization in particular thanks to the paper of
Rouder and Speckman (2004) and it seems to fit with my design. No 
problem if you want to keep the code but I have to tell you that it's 
our first semester using R and the teacher surely didn't thought that we 
will run out of available code with our experiment. Like John guessed 
the purpose of the course was to give a first view of R to get over the 
temptation of SPSS, my bad if I want to avoid biased statistics like 
sample mean ANOVA's on RT.

Dan : Thank you for your tip, this sure will help but I'm quiet at the
beginning of my R skills so I hardly trust myself to do it on my own,
but I can sure give it a try.

John : I had the same assumption but my research director warned me that 
I might run out of time for my first presentation by doing so but fairly 
enough for my master thesis. But again like I said to Dan I'm quiet 
concerned by my actual R skill.

Anyway I have to say that I'm really glad to see how much help you can 
get by using the r-help mailing-list.

Regards,
Gabriel

Le 21/05/2015 15:52, John Kane a ?crit :
#
Hi, Gabriel,

Do I  understand the idea behind 'vincentizing' reaction times? 
I don't want to work through the Ratcliff, (1979)  paper unless I must.

Let's say we have a subject , s1, with 50 rt scores.
We sort the scores from high to low (or low to high , it makes no difference) then we split the 50 scores into quantiles (let's say deciles) and calculate the mean/decile?   

Repeat for each subject.  We now have the 'vincentized' means. 

That's it? 

Example, of what I understand for just for one subject (s1)

# install plyr package if not already installed
install.packages("plyr")
#=======================================

library(plyr)

# create some sciency looking sample data
rtmatter   <- c (seq(0.50 , 1.50, 0.01), seq(0.55, 1.55,  0.01) )
str(rtmatter)  # verify it looks sciencey 

# create one subject
s1  <-  sample(rtmatter, 50, replace = TRUE)

# calculate 'vincentized' means for s1
s1  <-  sort(s1)
c1  <-  cut(s1, 10, right = TRUE)
ss1  <-  data.frame(c1,  s1)
vince1   <-   ddply(ss1, .(c1), summarize, decile.mean = mean(s1) )
vince1


John Kane
Kingston ON Canada
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!
2 days later
#
Hi John,

Sorry for the response delay.

I found a way to do it in a slight different way : 
http://www.nicebread.de/comparing-all-quantiles-of-two-distributions-simultaneously/

You're right with the application. I just put some comments in your post.

Thank you for your time. I will now use the quantile comparison for my 
statistic test, and perform vincentization later for my thesis result. 
If I create something useful I will share it on this topic.

Gabriel
Yes, the point is to get rid of the shape blindness of, for example 
ANOVA sample mean, by using quantiles to also reduce influence of outliers.
You cut the distribution in 10, the use of vincentization fix the cut to 
n ? bins. So a formula should be used to compute it for each set of data
That's right too.
#
Thanks Gabriel, 
That new method you found looks interesting even if it is a long way from anything I am likely to be doing.

Re my code below.  It looks like  vincentization is actually straight-forward.  I used bins = 10 since it was a convenient number.  I imagine if one was to actually turn this into a function it would not be that hard to come up with some formula to calculate bin size although statisticians may be wincing when they read that last remark.

I played a little more with the idea and it really looks pretty easy to  vincentizatise a data.frame.  

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!