qTukey() not very accurate.
qTukey implements an algorithm (AS 190.2, called qtrng0() in the Fortran) which was only intended to be a first approximation of Tukey's q. qtrng0 was intended to serve as a startup estimate for the more accurate routine, AS 190.1, called qtrng() in the Fortran. qtrng() uses AS 190, called prtrng() in the Fortran. ptrng() computes a p value for a given q statistic. qtrng() computes q for a desired probability p by recursively calling prtrng() and updating its estimate for q, until the desired accuracy is achieved (p within 0.001 in the Fortran code). If someone converts the Fortran routines prtrng() and qrtrng to m files, then we will have a good algorithm for estimating Tukey's q. Fortran code at http://lib.stat.cmu.edu/apstat/190.
- rosewc@udel.edu