简体   繁体   中英

lowess fit curve in R

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.

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)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM