[R] Density Estimation

Jacob van Wyk jlvw at na.rau.ac.za
Mon Mar 13 08:32:59 CET 2006


Hallo
I am trying to use the package LocFit to follow the example given in an
Introductory note of C Loader concerning density estimation. It involves
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 ? for
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 success.

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




More information about the R-help mailing list