Nonparametric kernel weights

Hi. I have panel data and I am supposed to do within transformation to remove the fixed effects. Basically, I have to create a variable $y-\Bar{y}$. I know usually I can do this using the within transformation of the plm package. However, I have to run a non-parametric regression. Therefore, my transformation should look like this:

y_{i,t}(x) = y_{i,t} - \Sigma_{s=1}^T y_{i,s} w_{i,s}

where w_{i,s} = \frac{K_H (X_{i,s}) - x}{\Sigma_{r=1}^T K_H (X_{i,r} - x)} and K is a kernel.

Any idea how I can do this?

The {np} package should be able to do this, although I haven't used it myself.

Hi. Thank you for your response. I am currently looking at {np} package and trying to understand if I can do this. I have used it for running a non-parametric regression. However, I have no idea how it can be done.