[R] loess documentation

Derrick P. Snowden Derrick.Snowden at noaa.gov
Thu Nov 16 17:13:41 CET 2000


Yes, thanks.  The documentation is a bit clearer thanks to you and some
others.  I just wish it wasn't the case.  I would like to be able to
specify a different fixed width window along the axes of each
independent variable.  I'm smoothing data where the physical dimensions
of the independent variables are space and time.  Knowing the exact
width, in physical dimensions, of the smoothing window at each
estimation point.  It allows me to calculate a filter frequency transfer
function and say something about the frequency/wavenumber
characteristics of the estimate.  If anyone has ideas on another way to
do this or something similar I'd be all ears.  I suppose that if I knew
the weights at each estimation point I could do something similar. 
Maybe I'll have to code up the bandwidth smoother myself.  However, it
would no doubt be rudimentary and lack many of the bells and whistles of
R/S.  Incidentally this brings up a couple more questions.

1.  It looks like loess() will fit a model by making an estimate at
*every?* data point location.  And then predict() will use that model to
make a prediction at user specified points.  This seems contrary to the
philosophy of using k-d trees and blending functions to ease the
computational burden as there probably many more data points than
estiamtion points.  Do I read this right or are there approximations in
loess() just like there are in predict() (i.e. the blending functions).


2.  For anyone who's fairly familiar with the method:  What is the trace
hat value mentioned in the code of cloess?  It looks like it is used in
estimating the variance of the the errors.  tr(L'L)  where L is the NxP
matrix of weights.  This is useful information.  Is it possible in R, to
get at the full L matrix or just the trace(L'L), without digging into
the bowels of the cloess code.   (It's terribly ugly machine generated
fortran4).

3.  I understand that this type of request (bandwidth smoothing) is
probably not implemented already for good reason.  (I understand that
there are bias concerns for fixed window estimates which have few data
points inside the window etc)  However, I come from an oceanography
background not a statistics background and things like scales of
variability, decorrelation distances etc, are important quantities  in
our literature ( We're thinking in terms of representative physics as
much or more than statistical fitting of models).  Anyone care to
comment/direct me to references  on the frequency wavenumber
characteristics of various nearest neighbor smoothers and how they can
be diagnosed for specific designs?  (kernel methods, splines, loess
etc)  

For anyone who cares to respond, thank you for your input.

John Fox wrote:
> 
> Dear Derrick,
> 
> I haven't looked at this carefully, but it is possible to have a smoothing
> window wider than the data. This just means that the weights don't get to
> zero. If the window is of infinite width, then one fits a global polynomial
> rather than a local one.
> 
> I hope that this helps,
>   John
> 
> At 03:55 PM 15/11/2000 -0500, you wrote:
> >Hi all,
> >
> >I 've got a question about the usage of loess in the modreg package.
> >The documentation (loess.html) states that the smoothing window is
> >either set by span or enp.target.  If span is used,  the details section
> >of the docs state...
> >
> ><SNIP>
> >
> >DETAILS
> >
> >Fitting is done locally. That is, for the fit at point x, the fit is
> >made using points in a neighbourhood of x, weighted by their distance
> >from x (with differences in `parametric' variables being ignored when
> >computing the distance). The size of the neighbourhood is controlled by
> >&alpha; (set by span or enp.target).
> >
> >For &alpha; < 1, the neighbourhood includes proportion &alpha; of the
> >points, and these have tricubic weighting (proportional to (1 -
> >(dist/maxdist)^3)^3.
> >
> >For &alpha; > 1, all points are used, with the `maximum distance'
> >assumed to be &alpha; times the actual maximum distance.
> >
> ></SNIP>
> >
> >I understand the situation when alpha is less than one, presuming it
> >uses the same convention set forth in any number of Clevelend and Devlin
> >articles, ie, nearest neighbor smoothing.
> >
> >However, I'm interested in looking at fixed bandwidth smoothing and I'm
> >wondering if the second option, (alpha>1) is some variation of this
> >theme.  I don't understand the "alpha times actual maxdistance"
> >statement.  If my estimation point is 10 meters from the farthest data
> >point in physical space and I set my alpha = 2, then according to the
> >statement above the smoothing window would be 20m????  Obviously this
> >can't be right.  Where have I gone wrong?
> >
> >Thanks in advance for your comments.
> >
> >Derrick
> >
> >
> >--
> >Derrick Snowden
> >NOAA / AOML / PhOD
> >4301 Rickenbacker Cswy.
> >Miami, FL  33149
> >Derrick.Snowden at noaa.gov
> >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> >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
> >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 
> ________________________________
>   John Fox
>   Department of Sociology
>   McMaster University
>   email: jfox at McMaster.ca
>   web: www.socsci.mcmaster.ca/jfox
> ________________________________

-- 
Derrick Snowden
NOAA / AOML / PhOD
4301 Rickenbacker Cswy.
Miami, FL  33149
Derrick.Snowden at noaa.gov
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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