| Library: | smoother |
| See also: | lpregest lpderest |
| Macro: | spfill | |
| Description: | spfill fills places of sparsity with interpolated observations to avoid the need of oversmoothing. |
| Usage: | xyaug = spfill(x,y, a, b, h, r) | |
| Input: | ||
| x | n x 1 matrix | |
| y | n x 1 matrix | |
| a | scalar, lower limit for estimation | |
| b | scalar, upper limit for estimation | |
| h | scalar, bandwidth | |
| r | scalar, scaling factor | |
| Output: | ||
| xyaug | n x 2 matrix, is the augmented and sorted data | |
library("smoother")
n = 50
x = uniform(n)
y = sin(2.*pi.*x) + 0.1.*normal(n)
a = -0.2 b = 1.2
h = 0.05 r = 2
xyaug = spfill(x,y,a,b,h,r)
estaug=lpregest(xyaug,h)
t = createdisplay(1,1)
show(t,1,1,x~y,xyaug,estaug)
Computes and plots the local linear estimator using the augmented data.
| Library: | smoother |
| See also: | lpregest lpderest |