Reputation: 682
This code gives me the mean, but I don't know how to get the +1sd and -1 sd lines.
y<-lowess(x[,1],x[,2],f=0.01)
Thanks for your help.
Upvotes: 1
Views: 2119
Reputation: 13280
Hmm, perhabs msir:::loess.sd() does what you want:
require(graphics)
plot(cars, main = "lowess(cars)")
require(msir)
low <- loess.sd(cars[ ,1], cars[ ,2])
lines(low$x, low$y)
lines(low$x, low$upper)
lines(low$x, low$lower)
Upvotes: 5