next up previous
Next: Additions Since First Release Up: Some New Developments in Previous: Some New Developments in

Introduction

Lisp-Stat [8] is a statistical computing environment based on the Lisp language (a subset of Common Lisp). Lisp-Stat includes vectorized arithmetic operations, basic statistics and linear algebra functions, and a window system interface. The window system interface provides access to standard user interface tools such as menus and dialogs, and forms the basis for dynamic graphics tools. The built-in dynamic graphs are extensible via an object-oriented programming system.

Originally Lisp-Stat was designed to allow it to be implemented on top of any Common Lisp system. However, it has proved more effective to instead use the XLISP language as a base, adding new Common Lisp features to this base as needed.

The basic system is used trough a command line interface in which Lisp expressions are typed in to the system, evaluated, and the result is printed:

> (+ 1 2)
3
> (def abrasion-loss (list 372 206 ...))
ABRASION-LOSS
> (mean abrasion-loss)
175.4667
> (standard-deviation abrasion-loss)
88.12755
> (median abrasion-loss)
165
> (log abrasion-loss)
(5.918894 5.327876 5.164786 ...)
> (- abrasion-loss (mean abrasion-loss))
(196.5333 30.53333 -0.4666667 ...)
The mean and median functions are examples of statistical functions available in the system, logarithm and location shift transformations illustrate the vectorized arithmetic operations.

Basic graphs available in the system include histograms, scatter plots, scatter plot matrices, and three-dimensional rotatable plots. Plots can be linked so that points selected in one plot are also selected in all linked plots. Figure 1 shows an example of exploring a three-dimensional relationship in a data set on abrasion loss in rubber samples by selecting, or conditioning on, low hardness values in the histogram and observing the corresponding points in the scatter plot of the two other variables, tensile strength and abrasion loss.

  
Figure 1: Linked histogram and scatter plot.
\begin{figure}
\begin{center}
 \leavevmode
 
\includegraphics [width=3.0in]{figures/linked.ps}
 \end{center}\end{figure}

Lisp-Stat also provides tools for fitting linear, generalized linear, and nonlinear models, maximizing functions, and approximating posterior distributions. These tools are also based on the object-oriented programming system.

A major objective of Lisp-Stat is to provide a framework for using and experimenting with dynamic graphical ideas. The Lisp language and the object-oriented graphics framework can be used to assemble new dynamic graphs from the building blocks provided. As a simple example, Figure 2 shows a normal probability plot of the residuals from a regression. The slider controls the power parameter in a power transformation of the response variable. The code used to produce this example is shown in Figure 3.

  
Figure 2: Animated power transformation.
\begin{figure}
 \begin{center}
 
\includegraphics [width=3.0in]{figures/regpow1.ps}
 \end{center}\end{figure}


  
Figure 3: Code for animated power transformation.
\begin{figure}
 \begin{center}
 \leavevmode\begin{verbatim}\end{verbatim}(defun ...
 ...e 1)
 (send p :add-subordinate s))))\end{smallverbatim} \end{center}\end{figure}


next up previous
Next: Additions Since First Release Up: Some New Developments in Previous: Some New Developments in
Luke Tierney
5/27/1998