你能在R中执行内核Logistic回归吗?

时间:2014-11-24 18:59:58

标签: r logistic-regression

我正在尝试在R中执行内核逻辑回归。是否有包执行此操作?

1 个答案:

答案 0 :(得分:2)

stats::ksmooth为您提供Nadaraya-Watson内核回归:

with(cars, {
    plot(speed, dist>40)
    lines(ksmooth(speed, dist>40, "normal", bandwidth = 2), col = 2)
    lines(ksmooth(speed, dist>40, "normal", bandwidth = 6), col = 3)
})

enter image description here