Thanks to Kit Baum, a new program localp is now available from SSC. Download using
if interested. Stata 10 is required.
localp is a customised version of the existing command lpoly for kernel-weighted local polynomial smoothing of yvar as a function of xvar, but with different defaults. That's only a little deal. I wrote it primarily for teaching.
Defaults include kernel(biweight), degree(1), bwidth() given by rounding 0.2 of the range of xvar down to a nice number, at(xvar), ms(Oh) and title(, size(medium) place(w)) with text such as "local linear smooth".
R-square and RMSE statistics of the smoother are shown based on regression of smoothed on original values of yvar for the values of xvar.
I will agree, I expect, with whatever you might want to say about using those measures in this context. The larger point is to compare with the output of other commands such as aaplot (SSC) and rcspline (SSC).
The code might be of interest as an example of how to customise a program and insert your own defaults.
Code:
ssc inst localp
localp is a customised version of the existing command lpoly for kernel-weighted local polynomial smoothing of yvar as a function of xvar, but with different defaults. That's only a little deal. I wrote it primarily for teaching.
Defaults include kernel(biweight), degree(1), bwidth() given by rounding 0.2 of the range of xvar down to a nice number, at(xvar), ms(Oh) and title(, size(medium) place(w)) with text such as "local linear smooth".
R-square and RMSE statistics of the smoother are shown based on regression of smoothed on original values of yvar for the values of xvar.
I will agree, I expect, with whatever you might want to say about using those measures in this context. The larger point is to compare with the output of other commands such as aaplot (SSC) and rcspline (SSC).
The code might be of interest as an example of how to customise a program and insert your own defaults.