statsmodels/statsmodels — Issue #103: ecdf and step function conventions
Author: sgenoud
Created: 2011-11-02 14:51:15+00:00
State: open

Hello,

I had a look at the ECDF implementation and I see a small problem of conventions. Step functions are usually defined with the step point as part of the previous interval. On the other hand, CDF are defined such that the step point is part of the following interval.

In the code the ECDF is defined as being a StepFunction (and then follows its convention). I would propose to change StepFunction such that it follows the cdf convention (or with an option for which convention to follow).

Simply, we could replace

tind = np.searchsorted(self.x, time) - 1

by

tind = np.searchsorted(self.x, time, 'right')

Steve