Skip to content
Prev 165142 / 398503 Next

Algorithm for calculating McCall's T-scores

I seem to have solved this on my own:

t.score.table <- data.frame(T=10:90,F=pnorm(10:90,mean=50.5,sd=10))
t.score <- function(x) {
  p <- ecdf(x)
  t <- cut(p(x),breaks=c(t.score.table$F,Inf),labels=t.score.table$T)
  t <- as.numeric(levels(t))[as.integer(t)]
  return(t)
}

/S

2008/12/18 Stefan Bj?rk <stefan.bjork at gmail.com>: