FORTRAN Source and Executable Files for Saddlepoint Approximations to the
Asymptotic Distribution of the Anderson-Darling Test Statistic

Contents

The files listed below provide the FORTAN source code and the corresponding executable files, used to calculate the various saddlepoint approximations in Table 1 of Chen & Giles (2007). The programs are written in double-precision FORTRAN, and incorporate the subroutines ERF and GAMMP (which in turn call the routines GCF, GSER and GAMMLN) from Press et al. (1992). These subroutines evaluate the error function and the incomplete gamma function, which are needed for the computation of the normal and chi-square distribution functions. The code was compiled, optimized and linked using the Compaq Visual FORTRAN (Professional edition, version 6.1) compiler, on a P.C. running an Intel Pentium 4 (3.0GHz) chip with the Windows XP Professional operating system.

There are eight source (& executable) files - i.e., 16 files in total. Four of these deal with the choice of base distribution (normal, or chi-square - with three possible degrees of freedom, α), for both the low-order and high-order approximations. The other four files cover the corresponding situations when evaluating the approximations at the mean of the distribution.

N.B.: In the case of the executable files, save the files to your hard-drive and then run them
The programs run from the command prompt, with input prompts on the screen
In general, the input information that is requested should be supplied in floating-point format - i.e., enter values such as 2.0, or 2., rather than 2
The exception to this is with the selection of the formula to be used for calculating the degrees of freedom, α, in the case of chi-square bases. Then, the program will prompt you to enter an integer value, 1, 2 or 3 (See Chen & Giles (2007) for the interpretation of these choices.)
Output will be in a file with the same name as the executable file, but with the extension .OUT

Principal Files

Low-Order Approximation:

  • Normal Base: normal.for ; normal.exe
  • Chi-Square Base: chi.for ; chi.exe
  • High-Order Approximation:

  • Normal Base: highnorm.for ; highnorm.exe
  • Chi-Square Base: highchi.for ; highchi.exe
  • Files for Evaluation at the Mean

    Low-Order Approximation:

  • Normal Base: norm_mean.for ; norm_mean.exe
  • Chi-Square Base: chi_mean.for ; chi_mean.exe
  • High-Order Approximation:

  • Normal Base: highnorm_mean.for ; highnorm_mean.exe
  • Chi-Square Base: highchi_mean.for ; highchi_mean.exe
  • References:

  • Chen, Q. & Giles, D. E. (2008). "General Saddlepoint Approximations: Application to the Anderson-Darling Test Statistic", Communications in Statistics, B, 37, 789-804.
  • Press, W. H., Teukolsky, S. A., Vetterling, W. T. & Flannery, B. P. (1992). Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge: Cambridge University Press.
  • Last Update: 25 February, 2021

    Contact: David Giles; Department of Economics, University of Victoria, CANADA. email: dgiles@uvic.ca; Tel.: +1-613-332 6833