Library: | smoother |
See also: | uni tri trian epa qua gau cosi canker |
Quantlet: | canbw | |
Description: | computes canonical bandwidth and squared L2 norm for a univariate kernel function K. |
Usage: | {dK, cK, mK} = canbw(K) | |
Input: | ||
K | string, kernel function on [-1,1] or Gaussian kernel "gau" | |
Output: | ||
dK | scalar, canonical bandwidth for K. | |
cK | scalar, squared L2 norm of K. | |
mK | scalar, second moment of K. |
library("smoother") {dK, cK, mK} = canbw("qua") dK ~ 35^0.2 ; dK should be 35^0.2 cK ~ 5/7 ; cK should be 5/7 mK ~ 1/7 ; mK should be 1/7
Contents of _tmp [1,] 2.0362 2.0362 Contents of _tmp [1,] 0.71429 0.71429 Contents of _tmp [1,] 0.14286 0.14286