I am trying to reproduce Figure 10.5 of Loader's book: Local Regression and Likelihood. The code provided in the book does not seem to work.
I have managed (a while ago) to get the accompanied R-code for the figures in the book (file called lffigs.R) from somewhere - cannot find it on the web anymore. The code in the .R script file does not work either.
Could anybody please direct me in finding an updated version of this document, or help me correct the code given in the file. The (out-of-date) code is as follows:

   data(claw54)
  fit1 <- locfit( ~ claw54, deg = 0, kern = "gauss", alpha = c(0, 0.315), ev =
    grid(100, ll = -3.5, ur = 2.7))
  fit2 <- locfit( ~ claw54, deg = 0, kern = "gauss", alpha = c(0, 0.985), ev =
    grid(100, ll = -3.5, ur = 2.7))
  x <- seq(-3.5, 2.7, length.out = 200)
  y <- dnorm(x, -1., 0.1) + dnorm(x, -0.5, 0.1) + dnorm(x, 0, 0.1) + dnorm(x,
    0.5, 0.1) + dnorm(x, 1., 0.1)
  y <- (y + 5 * dnorm(x))/10
  plot(fit1, get.data = T, main = "h=0.315", ylim = c(0, max(y)))
  lines(x, y, lty = 2)
  plot(fit2, get.data = T, main = "h=0.985", ylim = c(0, max(y)))
  lines(x, y, lty = 2)

THANKS FOR ANY ASSISTANCE.
ps: This code differs from that in the book. I have tried both, without success. Even if I just use, for example,
fit1 <- locfit( ~ claw54, deg = 0, kern = "gauss", alpha = c(0, 0.315))
I do not get the same result.

Jacob L van Wyk, Dept. of Statistics, University of Johannesburg (APK),
Box 524, Auckland Park, 2006.
Office: +27 11 559 3080, Fax: +27 11 559 2499


________________________________
This email and all contents are subject to the following disclaimer:

http://www.uj.ac.za/UJ_email_legal_disclaimer.htm

	[[alternative HTML version deleted]]


