View Single Post
  #2  
Old 06-17-2007, 06:42 PM
Jetto2 Jetto2 is offline
Junior Member
 
Join Date: Jun 2007
Posts: 9
Default Re: Towards a Skill Ratio : is it a joke ?

Here is the little R function I write
[ QUOTE ]

> tptcor
function(x){
res<-c()
l<-length(x)
hl<-as.integer(l/2)
for (n in 1:length(x)) {
rindex<-sample(1:l,replace=FALSE)
res<-c(res,cor(x[rindex[1:hl]],x[rindex[(hl+1)2*hl)]],method="pearson"))
}
return(mean(res))
}


[/ QUOTE ]
Reply With Quote