![](http://tiebapic.baidu.com/forum/w%3D580/sign=bf0e961094c8a786be2a4a065708c9c7/b723d854564e92584b18b004d982d158ccbf4e28.jpg?tbpicau=2024-09-22-05_0068c134afdae6b15357979d49a9a485)
为什么我用loess函数画出的不是一条拟合曲线而是很多条线,我想得到一条拟合曲线需要怎么改?代码在下面,求各位大佬帮忙分析一下,不胜感激。
attach(Thickness1.5T_MCI2AD)
model1<-loess(LeftBankssts_fit~Dis_Years, Thickness1.5T_MCI2AD,
model = T,
span = 0.75,
degree = 2,
parametric = FALSE,
drop.square = FALSE,
normalize = TRUE,
method = 'loess',
control = loess.control(surface='direct'))
smooth1<-predict(model1,Dis_Years,interval='prediction',level=0.95)
plot(Dis_Years,LeftBankssts)
lines(Dis_Years, smooth1,col='red')
detach()