Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: smoother
See also: lpregest lpderest

Quantlet: 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

Example:

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)

Result:

Computes and plots the local linear estimator using

the augmented data.   


Library: smoother
See also: lpregest lpderest

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Berwin Turlach & Lijian Yang, 970610
(C) MD*TECH Method and Data Technologies, 21.9.2000