我正在使用 ggplot 和 Python 来显示回归/相关性。使用 method='lm' (表示“线性模型”),我得到以下图表:
使用method='loess',我得到以下信息:
黄土法的 SE 区域宽度比 lm 法宽得多。这是预期的还是某处有错误?
以下是获取上述数字的 Python 代码:
from ggplot import *
print (ggplot(aes(x='SL', y='PW'), data=irisdf) + \
geom_point(alpha=0.3) + \
stat_smooth(colour="black", se=True, method='lm'))
# or method='loess' in above line
plt.show()