[R] Locfit package (was Density Estimation)

Jacob van Wyk jlvw at na.rau.ac.za
Mon Mar 13 09:51:16 CET 2006

Thank you for the response.
Indeed, my subject line was ill-specified. My apologies.
Yes, it seems as if "flim" should be "xlim"; also, I should have just
added the same to the plot call.

>>> Prof Brian Ripley <ripley at stats.ox.ac.uk> 03/13/06 9:58 AM >>>
Please use an informative subject line.

Your reference is vague.  There have been many versions of locfit, and

quite a lot of code in earlier documentation no longer works,
that which precedes Loader's book.

fit.of <- locfit(~geyser,xlim=c(1,6),alpha=c(0.15,0.9))
plot(fit.of, get.data=TRUE, mpv=200, xlim=c(1,6))

works for me, and I got there from the help files.

On Mon, 13 Mar 2006, Jacob van Wyk wrote:

> Hallo
> I am trying to use the package LocFit to follow the example given in
> Introductory note of C Loader concerning density estimation. It
> the "geyser" dataset (107 observations on durations, inlc in the
> package).
> I have tried the following (using the latest version of R):
> fit.of <- locfit(~geyser,flim=c(1,6),alpha=c(0.15,0.9))
> plot(fit.of,get.data=T,mpv=200)
> This produces a plot (after several warnings).
> My question is: how can I get the plot to cover the range: 1 - 6 ?
> durations. The plot covers the observed data range only.
> It appears there is a problem with
> flim=c(1,6)
> flim is not actually correct, and consequently c(1,6) is not used
> correctly. I have also tried to use "xlim=c(1,6)", but without
> I need some help on this please.
> Thanks
> Jacob
> Jacob L van Wyk
> Department of Statistics
> University of Johannesburg APK
> P O Box 524
> Auckland Park 2006
> South Africa
> Tel: +27-11-489-3080
> Fax: +27-11-489-2832

Brian D. Ripley,                  ripley at stats.ox.ac.uk 
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/ 
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list