[R] Gradient field from loess

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 21 10:30:21 CET 2001

On Wed, 21 Feb 2001, Dieter Menne wrote:

> I have a two-dimensional loess fit, and need to calculate the
> gradient field from it. Even after looking at loess.c and loess.f,
> I don't understand the meaning of the returned polynomial coefficients.

You are not supposed to be able to.  The fitted object contains no
explicit description of the surface, only enough details for
predict.loess to construct it.

> Or is the brute force method of using a tangential approx
> to the fitted values the way to go?

Normally when using loess the fitted values are uninteresting: one wants
to smooth/interpolate irregular data to a grid, say.  Using some other
method to find the tangent field from the predicted values on the grid
seems to me to be the way to go.  One could use e.g. bicubic spline
interpolation, as the code in package akima does (but apparently only

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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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