[R] loess problems

Jean Eid jeaneid at chass.utoronto.ca
Sat Feb 5 21:05:17 CET 2005


I have a problem either understanding what loess is doing or that loess
has a problem itself.

As the x-axis variables become more concentrated on a particular point,the
estimated loess tends to zero????. the examples below show what i am
talking about,  why is that? my intution tells me
that it should tend to the mean of the variable which is been smoothed.

Here's a worked up example

x <- c(seq(0,100), rep(100,1000))
y <- rnorm(length(x), mean=10, sd=2)
scatter.smooth(x,y)



Although it does give warnings, I don't understand why it is giving the
estimate as zero.


another example would be

x <- seq(0,100)
y <- rnorm(length(x), mean=50, sd=2)
scatter.smooth(x,y, span=1/length(x))


shoudn't this give just the points at which the smoothing algorithm is
applied?



thank you




More information about the R-help mailing list