My book,
Local Regression and Likelihood, presents many
examples using L
OCFIT.
The S subdirectory of the LOCFIT
source distribution contains the file lffigs.s.
Or download separately here:
This file contains functions to produce most of the figures in the
book. Source into S/S-Plus, and use e.g.
fig1.1() to
reproduce figures.
Errata
This page lists mistakes, additions and clarifications to my book
Local Regression and Likelihood (Springer, 1999).
Also listed are major changes to the software.
Please email me
any further issues.
- Page 39, line 7: ... based on the fit actually used, and not on ...
- Section 2.6 is, I believe, the simplest and most general presentation
of asymptotic results for local regression that there is,
although I took too much detail out
in response to reviewers. Results such as (2.38), (2.39) and (2.41)
are valid for any degree, and include boundary and near-boundary cases
with appropriate restriction of the domains of integration.
The bias formulae as stated are only for one dimension. Similar expressions
in multiple dimensions are routine but messy to derive, and are the sum of
terms for all partial derivatives of order p+1 and p+2. Ruppert and
Wand (1994) give the local quadratic result, in different notation.
The general result was given by Loader (1996b) for density
estimation; I'm unaware of a published reference for local regression.
(see pdf version for multivariate bias
expressions).
- Page 69, Example 4.6: sing should be using.
- Chapter 5 (and elsewhere):
In many of the density estimation figures (e.g. Figure 5.1)
the data should be displayed by tick marks along the bottom
-- this hasn't reproduced very well.
This is especially problematic in Figure 7.1, where censored observations
should be shown by shorter ticks.
- Page 84:
Examples 5.2 and 5.3, The mpv argument in the plot()
commands should be m.
- Page 115:
The formula in the middle of the page should be
sum_{i=1}^n wi(x)
(
ρ( (Yi-<a,A(xi-x)>) / s )
+ log(s) );
note the +log(s).
- Chapter 7: I'm told Locfit's coding of the censoring argument
(1=censored, 0=uncensored) violates the standard for survival analysis
software.
I won't change the code (to keep the book accurate), but please be careful!
- Page 128, example 7.4:
The first locfit.censor() call is overkill - either call
locfit(...,lfproc=locfit.censor) or
locfit.censor(...) with no lfproc argument.
This doesn't affect the results or Figure 7.3.
- Page 130, example 7.5:
The second line should read
P(Yi < y) = qy =
ethetai y /
(1+ethetai)y.
- Page 137, Ex 7.4:
Second line should be
E(YY*) = Phi(c/σ) = P(Y < c).
- Page 142, middle:
Code should be
> table(fitted(fit)>0.5, cl.train$y)
- Page 171:
The third formula should read
κ0 \approx \sqrt{ \frac{\int W'(v)^2 dv}{W(0)} }
ν1.
- Chapter 11:
Some of the figures in this chapter will be slightly different with the
current code, since the minimization algorithm has been improved.
- Page 204, example 11.3:
Due to over-zealous editing, the mcyc.n dataset is no longer
found in example 9.1. For distributions of Locfit after Jan 4, 2001,
the mcyc dataset has the vp variable added; use
mcyc in place of mcyc.n.
- Page 229:
The 6/sqrt(125) factor is correct only when the integrals are
evaluated over the half-line. When integrated over the full line, the
factor should be 3/sqrt(125).
This change does not affect Table 13.1.
The formula for eff4(W) correctly assumes integration
over the full line.
- Appendix A:
The installation instructions for S_Plus have changed. Follow the
instructions on the web page,
http://www.locfit.info/
Software Additions and Changes
- Specification of the evaluation structure argument has changed.
Use, for example, locfit(...,ev=rbox()). Available functions
are rbox(), grid(), dat(), xbar().
Arguments mg, flim, cut are now given to
the evaluation structure as appropriate, rather than to locfit()
directly. See the manual pages on the web site for more details.
- The smooth.lf() function provides a simple interface to
Locfit, with x and y vectors as input, and a list with smoothed
x and y as output.