* * Example from section 11.5, pp 379-382 * data(org=columns,unit=input) 1 20 y x 0.82 0.79 2.52 1.57 1.66 2.36 1.50 3.15 1.47 3.93 1.60 4.71 0.49 5.50 0.41 6.28 3.09 7.07 1.32 7.85 1.23 8.64 2.30 9.42 0.19 10.21 1.88 11.00 -1.71 11.78 -0.70 12.57 1.42 13.35 1.31 14.14 0.79 14.92 0.22 15.71 set truey = 1+sin(x) npreg(method=lowess,grid=input,frac=.2) y x / x y2 scatter(style=dots,overlay=lines,ovsame,ovcount=2,footer="Figure 11.11 A Simple Loess Estimate",$ key=below,klabels=||"","Loess estimate when alpha=.2","True Value"||) 3 # x y # x y2 # x truey * npreg(method=lowess,grid=input,frac=.8) y x / x y8 scatter(style=lines,footer="Figure 11.12 Importance of Neighborhood Size",key=below,$ klabels=||"True Value","Loess for alpha=.2","Loess for alpha=.8"||) 3 # x truey # x y2 # x y8