Skip to content

Loess fit

3 messages · Chintanu, David Winsemius, Liaw, Andy

#
On May 17, 2010, at 4:47 AM, Chintanu wrote:

            
That is not needed, furthermore, you don't even use it.
That sort is not needed.
How can we tell when the inputs to these functions are not offered?
Perhaps outside the range of the loess function that was generated?

dat = matrix(rnorm(100), ncol=2); x = dat[,2]; y = dat[,1]
predicted <- predict(y.loess, newdata=x<-1:10 )
predicted
# [1] 0.1022490 0.2574732        NA        NA        NA         
NA        NA        NA
# [9]        NA        NA
#
I'm just guessing (since as David pointed out, no reproducible example
were given), but this perhaps could be the problem:

R> x <- 1:10
R> y <- rnorm(x)
R> fm <- loess(y ~ x)
R> predict(fm, data.frame(x=5:15))
 [1]  0.1830450  0.2145826 -0.2158466 -0.3051978 -0.2635318 -0.1013985
 [7]         NA         NA         NA         NA         NA

Andy 

From: David Winsemius
Notice:  This e-mail message, together with any attachme...{{dropped:11}}