I'm trying to incorporate in a Fortran program a subroutine to
calculate tail probabilities for the non-central t distribution. I'm
using P.Griffiths & I.D.Hill, Applied Statistics Algorithms, Ellis
Horwood, Chichester 1985, ISBN 0-85312-772-7. Algorithm AS5 (pages
40-42) was written by B.E.Cooper to compute the lower tail for this
distribution. It uses a normal approximation for df>100, and a more
elaborate method for lower df. (The more elaborate method is not
used for larger df, for which it is said to fail.) I'm attempting to
check I've got it right using a driver program that evaluates the
tail probabilities for the central case (delta=0), using tabulated
97.5 centiles of the distribution for df=10, 20, ..., 200. I get
tail probabilities within 0.000004 of the desired 0.975 for df up to
100 (these discrepancies are attributable to using rounded values
from published tables). But for df from 110 to 200, all the
calculated tail probabilities are 0.00022 (for df=110) to 0.00012
(for df=200) too high - suggesting the normal approx. as programmed
has an inaccuracy which tends to 0 as df -> infinity, but is not
ignorable for detailed evaluation work for moderately high df. The
author claims the algorithm is accurate to more than 6 dp, but adds
the caveat, except when the df>100 algorithm is used.
Has anyone come across this flaw? Or can anyone suggest a better
algorithm (preferably still in Fortran!)?
Robert Newcombe.
..........................................
Robert G. Newcombe, PhD, CStat, Hon MFPHM
Reader in Medical Statistics
University of Wales College of Medicine
Heath Park
Cardiff CF14 4XN, UK.
Phone 029 2074 2329 or 2311
Fax 029 2074 3664
Email [log in to unmask]
Web:
http://www.uwcm.ac.uk/epidemiology_statistics/research/statistics/newc
ombe.h
tm
|