Skip to content

bug found in predict.locfit in locfit package ( PR#8057)

1 message · Liaw, Andy

#
Apologies for the coming to this late...

1. By now I hope Somkiat has realized that R-bugs is not the place to
report problems in contributed packages.  Please direct such reports to
the package maintainer.

2. This is really user error.  predict() expect the newdata to be a data
frame containing variables with the same names as those used in the
fitting process.  E.g., you fitted the model with objects named `y',
`x1' and `x2'.  predict() will try to look for objects by those names,
first in newdata, then in the global environment.  Since you supplied
newdata as data.frame(x1new, x2new), predict() cannot find x1 and x2
there, so it ends up using the copy you have in the global environment.
You need to use newdata=data.frame(x1=x1new, x2=x2new).

FYI, thanks to help from Uwe and Brian, I now have Prof. Loader's new
version of locfit passing R CMD check (using R-2.2.0 beta).  It will be
uploaded to CRAN when Prof. Loader is OK with what I have.

Andy