Re: [R] Smoothing z-values according to their x, y positions

From: David Winsemius <>
Date: Thu, 20 Mar 2008 13:15:49 +0000 (UTC)

"Emmanuel Levy" <> wrote in

> Dear David,
> Thanks a lot for pointing out kde2d, just tried it out but the
> problem is that it indeed takes the density of points into account,
> which I dont want.
> For example, if in an region of surface S I've got 10,000 points,
> and that their average height is 0.5, and in an other region I've
> got only ten points and their average value if also 0.5, I'd like
> all these points to be transformed to the same
> 0.5 value. At the moment, it seems that it's not the case.
> For example, the range of the values I give is: 0.2 - 3.7, but the
> range of the values
> that are outputed is 0 - 0.17.

>> "Emmanuel Levy" <> wrote in
>>  > Dear Bert,
>>  >
>>  > Thanks for your reply - I indeed saw a lot of functions using: 
>>  >"smooth") 
>>  >
>>  > The problem is that most seem to not be very appropriate to what 
>>  > I'd like, or they seem extremely complicated (e.g. gma). I am 
>>  > probably missing something as I don't see how to use Loess. From
>>  > my poor understanding, it seems to be for 2D data. Here I want
>>  > to smooth the third "z" component. 

Your description of what is desired leads me to believe you were misreading the "loess" documentation. For proof I suggest you visit Deepayan Sarkar's webpage and in particular see Figure 6.8 where 3d plots of loess fits for more complex data arrangements are exemplified:
Choose Figure 6.8 (code on right side of window): <>


PNG image:

David Winsemius

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 20 Mar 2008 - 13:19:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Mar 2008 - 14:00:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive