Can you do a logical regression of the kernel in R

I am trying to do a kernel logical regression in R. Is there a package that does this?

+4
source share
1 answer

stats::ksmooth gives you regression of the Nadaraya-Watson core:

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

+2
source

All Articles