Philipp Kunze
2010-Sep-23 12:16 UTC
[R] local linear and local constant kernel regression with np
Hi there, I ran into a weird problem using the np-package doing some local linear kernel regression. Whenever I run the function "npregbw(...)" with the option "regtype=ll" (local linear modelling), my optimal bandwidth is supposed to be 1278946. This is kind of funny, because my regressor data (189 data points) only runs from about 3.4 to about 5.9. So, what I get as a result is a nice and straight line, the same one I would get if I would run a normal linear regression. Whenever I set the option "regtype=lc" (i.e. local constant modelling), the optimal bandwidth is calculated as 0.795 - which sounds right to me. Any ideas / similar experiences? Thanks! Philipp