Group: | Statistical Data Analysis |
Topic: | Nonparametric Methods |
See also: | sker isoreg l1line lowess |
Function: | rmed | |
Description: | rmed computes the running median of y using the optimal median smoothing algorithm of Haerdle and Steiger (1990). |
Usage: | yh = rmed (y, k) | |
Input: | ||
y | n x 1 vector | |
k | scalar | |
Output: | ||
yh | n x 1 vector |
; generate a dataset x = normal(100) ; running median with window-width 11 z = rmed(x, 11) z
//z contains the running median fit of x Contents of z [ 1,] -0.27263 [ 2,] -0.27263 [ 3,] -0.27263 ... [ 97,] -0.098969 [ 98,] -0.098969 [ 99,] -0.098969 [100,] -0.098969