r语言箱线图怎么拟合非线性模型

如题所述

> require(car)
> attach(women)
> #car这个包的全称是Companion to Applied Regression
> scatterplot(weight~height,lty.smooth=2,pch=19,col="red",main="Women Age 30-39",xlab="Height in Inches",ylab="Weight in Pounds")
Warning messages:
1: In plot.window(...) : "lty.smooth" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "lty.smooth" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"lty.smooth" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"lty.smooth" is not a graphical parameter
5: In box(...) : "lty.smooth" is not a graphical parameter
6: In title(...) : "lty.smooth" is not a graphical parameter
> #car这个包中的scatterplot命令的主要优势在于除了有传统的散点图之外
> #还能包含平滑拟合曲线
> #最主要的是还能够加上x与y数据的箱线图
>
>
> #用到的包是car
> #用到的数据集是women(主要是身高与体重的数据)
> #用到的命令是scatterplot()
温馨提示:答案为网友推荐,仅供参考
相似回答