                 LOCFIT: Demonstration functions
                  (c) 2001 Lucent Technologies.
                        Catherine Loader
                 catherine@research.bell-labs.com
           http://cm.bell-labs.com/stat/project/locfit/


This archive contains S functions for the figures in my book,
Local Regression and Likelihood, Springer, 1999.
The figures work with Feb 2001 versions of Locfit, in S or S-Plus,
with the exceptions noted below.
They should also work in R, with the exception of functions
requiring Trellis graphics.

Usage:
(1) Start an S or S-Plus session. You must have the locfit library
    installed and attached.
(2) source in the code:
    > source("lffigs.s")
(3) Each figure has its own function, e.g fig1.1() for Figure 1.1.
    Most functions can be run as is, and will produce figures as in
    the book. For exceptions, see below.
(4) For postscript versions (with published aspect ratios etc) use
    e.g. fig1.1(ps=T).

General Exceptions/Problems:

Figure 3.3:
  Doesn't work in S4 (gam() broken) or R (no gam()). Should work in S-Plus.
Figure 5.7 and others:
  `parameters out of bounds' warning -- occurs when density estimation is
  far from the data, and underflow may occur. Not a serious problem.
Figure 6.1, 6.6, 7.5, 8.2:
  These work only in S4, S+5, S+6, due to the use of methods for operators.
Figure 8.*
  These also produce classification tables for corresponding examples.
Figure 8.1 and Figure 8.2:
  The response for the two classes is coded as 0-1 in the current distribution;
  1-2 in the book. There are corresponding minor changes to the code.
Figure 8.3, 8.4, 8.6: Warns about perfect fit (i.e. the binomial model
  has 0's and 1's separated) and OOB parameters. Not a problem for the
  fit, but may make std errors etc. questionable.
Figure 9.3:
  Warning about `constants are approximate for varying h'. The scb constants
  require the derivative of the smoothing weights, which are computed under
  the assumption that h is constant. Results for nearest neighbor bandwidths
  are therefore approximate.
Figure 10.4 and Figure 10.6: 
  The simulation results are not included in the distribution.
  To perform the simulations, call the functions as e.g.
  fig10.4(nsim=1000)
  These may be slow (like overnight). The results are stored in
  global matrices, so you don't need to redo simulations on successive calls.
Figure 11.2:
  The points are set in the function (cheating, rather!).
  Getting the points requires extra print statements in the C code.
  Also subject to...
Figure 11.2-11.7:
  Due to modifications to the adaptive optimization code, there are minor
  differences between the published figures and current code.
Figure 11.3:
  mcyc.n dataset not included.
Figure 13.1:
  May print out pages of internal diagnostics...
Figure 13.2:
  Data not included, so it won't work.
