Contents of the README.DOC file

PIBSIGS.LBR contains Turbo Pascal procedures whichcompute a variety of statistical distribution functions. Thedistributions include the Beta, Log Gamma, Incomplete Gamma, F, t,Chi-square, and Normal distributions. Both the forwardand inverse functions are provided. Although specific routines forthe binomial and negative binomial distribution are not given here,probabilities and percentage points for those two distributionscan be computed from the Beta distribution.

Machine-dependent constants assume that Turbo-87 is to be used.All machine-dependent constants are located in module SIGCONST.PAS,if you wish to change them. You will need to change them if you don'tuse Turbo-87.

I assume that you know something about these distributions, and whenthey should be used. If you don't, these routines may not be veryuseful to you. If you'd like to learn more about the subject ofstatistical distributions, I suggest you read the series of booksby Johnson and Kotz, covering both discrete and continuousstatistical distributions. The publisher is Houghton Mifflin.

--- File containing "(*$I" include directives for all the distribution routines:

SIGALL.PAS

All of the Pascal source modules (ending in .PAS) are squeezed, so thatthey actually appear as *.PQS in the PIBSIGS.LBR library file.For instance, SIGF.PAS appears under the name SIGF.PQS. The Pascalroutines were squeezed WITHOUT the time and date stamp, so your favoriteunsqueezer should have no difficulty. I especially recommendAlan Losoff's ALUSQ.COM.

Credits:-------

These routines are translations of Fortran and Assembler routines which Ihave used in various programs for many years. Many of the algorithmsare modified from ones which appeared in Applied Statistics or theCommunications of the ACM algorithms sections. If the algorithm comes fromone of those sources, that is mentioned in the header comments for thecorresponding routine.

I chose the algorithms included here based upon extensive experience andempirical, simulation, and theoretical studies that demonstrate theseto be among the best available in terms of speed, accuracy, and robustness.However, the area of computing for statistical distributions isa constantly changing one, and any of the methods included here may soonbe retired in favor of new and better ones.

What PIBSIGS does:------------------

PIBSIGS provides a fairly complete library of statistical distributionroutines covering the three most commonly used families of distributions:the Incomplete Beta (F, t, binomial); the Incomplete Gamma (Chi-square);and the Normal. These three distributions can also be used to approximatemany other families.

These routines may be used to compute the observed probabilities ofhypothesis tests and to compute percentage points required for theconstruction of confidence intervals.

The basic routines for the beta and gamma distributions allow you tospecify the degree of accuracy you want and the maximum number ofiterations allowed. These routines also return an accuracy indicatorshowing how many digits of precision were actually calculated. Note thatthis doesn't mean that the answers are correct to that many places,just that two successive ietratively derived values match to as manydecimal places as indicated.

The programs beginning with TEST... are brief demonstrations of how touse the lower-level routines. The test programs typically ask fora test value or probability value, and degrees of freedom. The output iseither the corresponding probability or percentage point.

Using PIBSIGS:--------------

Extract all the .PQS files from the library. For most library utilitiesthis request appears as follows:

LU A PIBSIGS.LBR or LU86 -A PIBSIGS.LBR

After extracting all the files, unsqueeze all of the .PQS files.Using an unsqueezer like Losoff's ALUSQ, this can be done asfollows:

ALUSQ *.PQS

If your unsqueezer doesn't allow wildcards, you will have to unsqueezeeach file one at a time.

To use the routines in your program, include the following routinesin this order before any others from PIBSIGS:

Then write includes for the specific routines you want. The sample programsTEST*.PAS show which modules need to be included to use a given distribution.

To get ALL of the PIBSIGS modules included, copy the file SIGALL.PAS into yourprogram. SIGALL.PAS contains include directives for all the PIBSIGS modules(except the test program, of course). Note that you can't include SIGALL.PASusing a "(*$I" directive, since Turbo Pascal doesn't allow nested includes.

Glitches:--------

These routines are designed to work with TURBO-87, the 8087 versionof Turbo Pascal. You must alter the constants in SIGCONST.PAS for thenon-8087 version. I have NOT tested the routines without the 8087.I'd appreciate some feedback on how well they perform.

I hope that there are no coding errors in the routines; if you findany, please let me know ASAP as indicated below.

I'd also appreciate any feedback on the performance of these routines,or suggestions for alternate algorithms that you have found to bevaluable -- especially algorithms for troublesome cases where thealgorithms presented here have difficulties. In particular, it wouldbe nice to have algorithms that perform accurately and efficientlyto approximate the Incomplete Beta distribution with large degreesof freedom -- greater than 100000. Such degrees of freedom DO occurquite often in approximating multivariate distributions (e.g.,Box's M test for assessing homogeneity of covariance matrices).

Usage Restrictions------------------

I've placed these routines in the public domain. You are free toadd to them, correct them, extend them, or do whatever else you wish,but PLEASE do NOT sell them as your own work. That's not nice.If you wish to use these in a commercial product, PLEASE let me knowthat you intend to do so (see below) so that I can inform you ofany needed bug fixes. You may use these routines in commercialprograms AS LONG AS you mention that I wrote them and you DO NOTINCREASE THE PROGRAM'S PRICE JUST BECAUSE THESE ROUTINES ARE INCLUDED.

Comments:--------

Send comments, suggestions, etc. to PHILIP BURNS on either of thefollowing two Chicago BBSs:

Gene Plantz's BBS: (312) 882 4227 Ron Fox's BBS: (312) 940 6496

or on the SMUG BBS:

SMUG BBS (P. Olympia): (301) 963 5249

As time permits, I will be adding other statistical distributionfunctions to these such as approximations for multivariatedistributions, non-central distributions, and so on. Your commentsand suggestions are most welcome.