Crossings


Software for evaluating boundary crossing probabilities

Boundary crossing probabilities arise in many statistical and probabilistic applications. The classic statistical application is Kolmogorov-Smirnov goodness-of-fit testing. Other common statistical applications include sequential analysis and change point problems.

To date, while theoretical work and applications are extensive, numerical work is more limited and very little software is publicly available. The Crossings package begins to remedy this situation, by providing a set of subroutines for some of the most common processes and a variety of different algorithms. Processes presently available in this software include

  1. Brownian motion and other Gaussian diffusion processes.
  2. Poisson and empirical processes.
  3. Binary random walks.
  4. Sequence matching and maximal run problems.
The subroutines are written in C. The code can be used as a linkable library, with the user writing C functions to define the boundaries, and the probabilities are computed through function calls.

Alternatively an interface for S-Plus and R is provided. Beware that this may be slow, since the boundaries are written as S functions, and extensive use is made of Call_S in the C code.

In writing these routines, I found that `simple' algorithms for computing standard densities and probability functions (e.g. the binomial distribution) were not sufficiently accurate due to round-off errors. This lead me to develop an alternative set of algorithms, based on saddle-point expansions. See my Dbinom page for more on this work.