[R] multivariate local regression with locfit
Catherine Loader
catherine at research.bell-labs.com
Thu Jun 14 16:10:19 CEST 2001
>From Leu_Paul_W at cat.com Wed Jun 13 11:32 EDT 2001
>
> I've been trying to run locfit on data with 6 inputs and 1 output in
>R. Whenever I make a prediction for the same exact data that the model was
>built on though, I get significant discrepancies. I have tweaked the alpha
>parameter to no avail and played around with a lot of the other variables
>as well. Is their some kind of bug in locfit or is it just unable to do
>multivariate local regression with so many variables?
> I was able to accurately predict data using Vizier, commercialized
>software that also performs locally weighted regression.
I don't think I understand the problem properly, can you send more
details of what you're trying to do? Some possible explanations would be
(1) There usually should be discrepancies between the data and the predictions
at the data points; the only cases when there should be no discrepancy
is if the data are a polynomial (<= quadratic, for local quadratic fits).
(some authors have forced interpolation of the data by using a singular
weight function in the local regression; locfit doesn't do this).
(2) By default, the locfit() function fits the local polynomial model at a
selected set of points; the predict() function interpolates from
the fit at the selected points. So the output of predict() is not
exactly equal to the local regression surface.
This default can be overridden by giving a matrix of fitting points
as the ev argument, locfit(...,ev=...).
(3) The fitting should work in six dimensions (although I haven't extensively
tested beyond 2-3 dimensions). The interpolation used by predict()
may be problematic (as high dimensional interpolation usually is) although
the code should work.
Regards,
Catherine.
(sorry for sending this partial response to the whole list, replying
to the sender produces
Your request ``mail cat.com Leu_Paul_W '' failed (code P).
The symptom was:
Thu Jun 14 09:54:06 EDT 2001 connect to cat.com:
550 5.1.1 <Leu_Paul_W at cat.com>... User unknown
)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list