This documentation is somewhat disorganised because it reflects three different versions of the tools. They have all been kept because they may all be of some use. The first and most elegant is an object-oriented set, including methods for regression-model-proto and its descendants. The second is the functions ued to implement the object methods. These would be useful for models where a method hasn't yet been written. Finally there are is a set of primitive functions for constructing factor and interaction design matrices.