The main purpose here is to describe how to obtain the MATLAB software used to generate the examples in the paper. These were originally developed because none of the statistical software packages available to us had facilities for producing KDEs. This is still largely true of many of the more popular or cheaper packages. The S-PLUS package (Becker et al., 1988; Venables and Ripley, 1994) does have KDE routines and advanced programming facilities. A suite of S routines for 1-D, 2-D and 3-D KDEs, written by David Scott (Scott, 1992) is available via the StatLib service (http://lib.stat.cmu.edu), the routines being located at http://lib.stat.cmu.edu/S/ash. Undoubtedly graphics similar to those in the paper could be produced using GIS or other graphics software, though we have not explored this. An advantage of the KDE approach, however, is the theory that exists to guide the extent of smoothing.

The downloadable archive files within this section contain a suite of MATLAB M-files for investigating KDEs. The files are quite small, so downloading should be relatively speedy. Unix users should choose the tar'd file, PC users the zip'd file.

If you are downloading the zip'd file to a mainframe or Unix system and then FTPing to a PC remember to use BINARY mode when FTPing.

If your browser is set up poorly (sorry) then clicking on the
matlab.tar.gz link will take you into the actual archived file which is
gibberish. You should then choose Save As from your browser's File menu
and save the file as `kdtlbx.tar.gz`. To unpack type
`gunzip -c kdtlbx.tar.gz | tar xvf -` . This will create a
directory called `kdtlbx`

containing all the relevant M-files.

The ZIP archive includes a KDEHELP.DOC (Word) file. This is an expanded
version of the On-line help documentation (link below). Setting the
software up on your PC should simply be a case of placing the M-files in
an appropriately named directory and adding this to the MATLABPATH in the
`matlabrc.m`

file. Please let me know by email
(c.beardah@maths.ntu.ac.uk) if
you have any suggestions or problems.

It is assumed that you are running version 4.2c of MATLAB for Windows. Earlier versions of MATLAB (version 4 and above) will happily run the one- and two-dimensional demo routines, but not the three-dimensional software. Alternatively, the Student Edition of MATLAB should run the routines demonstrated here for all but the largest datasets. The Student Edition of MATLAB for MS Windows comes as a book and disk combination. The price is £32.51 (inc. VAT), ISBN: 0131 849 956.

There is also a Macintosh version. The hardware requirements for the PC version are:

- 386/486 PC preferably with a maths co-processor, though this is not essential (most 486 machines have an in-built co-pro).
- Windows 3.1 or higher.
**A minimum of 8MB RAM.**

Whether you have obtain the KDE routines by anonymous ftp, or
on the WWW, or on floppy disk, you should copy all the files to
a directory or sub-directory called **kdtlbx** on your
hard drive and add this to the matlabpath in the file **matlabrc.m**.

After these preparations have been made, restarting MATLAB and
typing **kdedemo1**, **kdedemo2** or **kdedemo3** will get you started. Note that the three-dimensional software can be quite slow on all but the most powerful PCs. You should have no such problems with the one- and two-dimensional routines.
These run quite quickly even on a low end 486 machine.

The demonstration routines showcased here are simply an attractive
front end for a whole suite of stand alone routines for performing
tasks connected with KDEs, including contouring, boundary kernels
and other advanced topics. If you have more advanced uses in
mind then you may like to look at the individual routines in the
**kdtlbx** subdirectory. Asking for **help function_name**
will give fairly detailed help and an example in most cases. Having said this, you may find that the more user friendly, GUI driven routines

The On-line help document should give you an idea of how the routines look, as well as what they can do. It is not interactive in any way. The **kdehelp.doc** file included in the distribution gives a better (more frequently updated) introduction.

This software is in a constant state of revision (the version number of the software is listed in the readme.txt file which accompanies the routines). If you are interested in this work, or in the latest versions of the routines, here are our details:

Dr Christian C. Beardah,Dr Mike Baxter,

Dept of Maths, Stats and OR,

The Nottingham Trent University,

Clifton,

Nottingham NG11 8NS

United Kingdom Tel: 0115 9418418 extension 3228.

Fax: 0115 9486690.

Email:christian.beardah@ntu.ac.uk

Email:michael.baxter@ntu.ac.uk

The software is also available on the WWW and by anonymous ftp. Try the Department's Web site at

http://euler.ntu.ac.uk/maths.html

From there it should be easy to find the ftp site or our home pages (via the "Mathematics" or "Statistics and OR" staff links) and hence the KDE software.

© Internet Archaeology
URL: http://intarch.ac.uk/journal/issue1/beardah/kdeia8.html

Last updated: Tue Sep 10 1996