>>>>> <someone> on Sun, 22 Jan 2017 10:26:24 -0600 writes:
> Dear Dr Mächler, I am using runmed from R's stat > package. I understand that you are the author of this package. not of the package - but of function runmed(). I'm reply to R-help, so this answer maybe available to future web searches. > I am using the function with even length k=40 and the > function forces it to be odd as k=41. I am sure there must > be reason behind this overriding behavior. May I ask if > you could enlighten me on this? Thank you in advance. The help page - which one should really read (!) - says that k must be odd. Why? The median of an *odd* number of observations is "the middle". That's not the case with an even number, but a very desirable property, which is kept even when iterating running medians. (Further, mathematically there are as many odd numbers as integers, so odd numbers should be sufficient ;-) ;-)) Martin Maechler ETH Zurich ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.