Scatter plot kernel smoothing: ksmooth() does not smooth my data at all
问题 Original question I want to smooth my explanatory variable, something like Speed data of a vehicle, and then use this smoothed values. I searched a lot, and find nothing that directly is my answer. I know how to calculate the kernel density estimation ( density() or KernSmooth::bkde() ) but I don't know then how to calculate the smoothed values of speed. Re-edited question Thanks to @ZheyuanLi, I am able to better explain what I have and what I want to do. So I have re-edited my question as