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 lpderrot

Quantlet: lpderest
Description: estimates the q-th derivative of a regression function using local polynomial kernel regression. The computation uses WARPing.

Reference(s):

Usage: mh = lpderest (x, h {,q {,p {,K} {,d}}})
Input:
x n x 2, the data. In the first column the independent, in the second column the dependent variable.
h scalar, bandwidth. If not given, the rule of thumb bandwidth computed by lpderrot is used.
q integer <=4, order of derivative. If not given, q=1 (first derivative) is used.
p integer, order of polynomial. If not given, p=q+1 is used.
K string, kernel function on [-1,1] or Gaussian kernel "gau". If not given, the Quartic kernel "qua" is used.
d scalar, discretization binwidth. d must be smaller than h. If not given, the minimum of h/3 and (max(x[,1])-min(x[,1]))/100 is used.
Output:
mh m x 2 matrix, the first column is a grid and the second column contains the derivative estimate on that grid.

Example:
library("smoother")
library("plot")
;
x = read("motcyc.dat")
mh = lpderest(x,5)      ; estimate function
;
mh = setmask(mh, "line","blue")
plot(x,mh)

Result:
The derivative regession estimate (blue) using
Quartic kernel and bandwidth h=5 is pictured.



Author: M. Mueller, 20000328
(C) MD*TECH Method and Data Technologies, 05.02.2006