[R] loess
Jukka Nyblom
jukka.nyblom at jyu.fi
Thu Jan 4 16:39:18 CET 2007
Hi,
I have tried
> for (i in 1:100) L[,i] <- loess((i = =(1:100))~I(1:100), span=.5,
degree=1)$fit
to create a matrix which gives me the smoothing weights (correctly as
far as I have experienced), eg.
> yhat <- loess(y~I(1:100), span=.5,degree=1)$fit
> yhat[30]
[1] -0.2131983
> L[30,]%*%y
[,1]
[1,] -0.2131983
But, L[30,] has 56 nonzero coefficients, not 50 that I expect with span
= 0.5. Actually the number of nonzero elements on rows varies being 49,
50, 55 or 56.
Does anyone know why?
Jukka Nyblom
More information about the R-help
mailing list