【发布时间】:2021-02-03 12:07:25
【问题描述】:
这是基础r中的黄土平滑曲线
dat <- data.frame(RT = c(151, 160, 168, 169, 172, 175, 189, 279),
IQ = c(123, 121, 115, 110, 105, 103, 100, 120))
with(dat, scatter.smooth(IQ, RT, span = 0.8))
这是用ggplot制作的黄土曲线:
ggplot(dat, aes(x = IQ, y = RT)) +
geom_point() +
geom_smooth(method = stats::loess, se = F, span = 0.8)
它们为什么不同?
【问题讨论】: